Class
Tree
          
SUMMARY: INNER | FIELD | CONSTR | METHODDETAIL: FIELD | CONSTR | METHOD
 

com.newstep.solid.persistence.db
Class DbCRUDKeeperImpl
com.newstep.solid.persistence.db.DbKeeper
  |
  +--com.newstep.solid.persistence.db.DbCRUDKeeperImpl
All Implemented Interfaces:
       BatchCRUDKeeper

public class DbCRUDKeeperImpl < T >
Represents an externally configured Keeper.


It also is an implmentation of the simple keeper:
com.newstep.solid.persistence.CRUDKeeper


This class is meant to be extended for greater quering capabilities
for your intended Keeper interface..
Author:
msimonsen
Implements:
BatchCRUDKeeper
 
Links:
Kernel Association Association Link
to Class DbKeeperConfig
Associates type:
association
Client cardinality:
1
Client navigability:
NOT NAVIGABLE
Client visibility:
private
Supplier cardinality:
1
Supplier navigability:
NAVIGABLE
Supplier visibility:
private
 
Kernel Association Association Link
to Interface UniqueIdGenerator
Associates type:
association
Client cardinality:
1
Client navigability:
NOT NAVIGABLE
Client visibility:
private
Supplier cardinality:
1
Supplier navigability:
NAVIGABLE
Supplier visibility:
private
 
Generalization Generalization Link
to Class DbKeeper
Represents an externally configured Keeper.


It also is an implmentation of the simple keeper:
com.newstep.solid.persistence.CRUDKeeper


This class is meant to be extended for greater quering capabilities
for your intended Keeper interface..
Author:
msimonsen
 
Implementation Implementation Link
to Interface BatchCRUDKeeper
Represents an externally configured Keeper.


It also is an implmentation of the simple keeper:
com.newstep.solid.persistence.CRUDKeeper


This class is meant to be extended for greater quering capabilities
for your intended Keeper interface..
Author:
msimonsen
 
 

Template Parameters
Class20 T
Nested Class Summary
Final class
Field Summary
private final static String
private Object
private static Logger
Method Summary
public T
public boolean
create(Collection col, PersistenceContext context)
public void
public T
get(Integer id, PersistenceContext context)
public Collection
public Class
protected DbKeeperConfig
protected String
protected String
protected String
protected String
protected String
public void
init(DbKeeperConfig keeperConfig)
public Collection
public Collection
public Collection
queryByBean(T bean, PersistenceContext context, String fieldNames)
public T
queryEntityByBean(T bean, PersistenceContext context, String fieldNames)
protected void
public boolean
update(Collection col, PersistenceContext context)
public void
Template Parameter Detail
Unknown Name
 

 
Template Parameter Summary
T 

T
Parameter Metaclass:
Class20
 

 
Class Summary
T 

T
Final.
Custom properties
templateParameterString:
T
 
Field Detail
className
private final static String className
Final.
Multiplicity:
1
Static.
 

config
private DbKeeperConfig config
Multiplicity:
1
 

configObj
private Object configObj
Multiplicity:
1
 

generator
private UniqueIdGenerator generator
Multiplicity:
1
 

logger
private static Logger logger
Multiplicity:
1
Static.
 
Method Detail
create
public T create (T obj, PersistenceContext context)
 
Throws:
PersistenceException
 

create
public boolean create (Collection col, PersistenceContext context)
 
Throws:
PersistenceException
 

delete
public void delete (T obj, PersistenceContext context)
 
Only the unique id of the the object is required.
Parameters:
context
Throws:
PersistenceException
Custom properties
param obj.
 

get
public T get (Integer id, PersistenceContext context)
 
Throws:
PersistenceException
 

getAll
public Collection getAll (PersistenceContext context)
 
Throws:
PersistenceException
 

getBeanClass
public Class getBeanClass ()
 
 

getConfig
protected DbKeeperConfig getConfig ()
 
 

getPrimaryKeyCol
protected String getPrimaryKeyCol ()
 
 

getSchema
protected String getSchema ()
 
 

getSequence
protected String getSequence ()
 
 

getTable
protected String getTable ()
 
 

getVOClassName
protected String getVOClassName ()
 
 

init
public void init (DbKeeperConfig keeperConfig)
 
Throws:
PersistenceException
 

query
public Collection query (PostQueryCriteria query, PersistenceContext context)
 
Throws:
PersistenceException
 

query
public Collection query (PreQueryCriteria query, PersistenceContext context)
 
Throws:
PersistenceException
 

queryByBean
public Collection queryByBean (T bean, PersistenceContext context, String fieldNames)
 
Builds an "AND"ed query based on the sample bean object egObject.
Parameters:
bean - the object to filter against
context
Return:
A collection of queried objects.
Throws:
PersistenceException
 

queryEntityByBean
public T queryEntityByBean (T bean, PersistenceContext context, String fieldNames)
 
Builds an "AND"ed query based on the sample bean object egObject to query
a single instance that respects all the conditions. If none found,
ObjectNotFoundException is thrown. The function is built to be used by
retrieveByName.
Parameters:
bean -
the object to filter against
context *
fieldNames
Return:
A collection of queried objects.
Throws:
PersistenceException
 

setUidGenerator
protected void setUidGenerator (PersistenceContext context)
 
Sets the uid generator if its found not to be set in context
Parameters:
context
 

update
public boolean update (Collection col, PersistenceContext context)
 
Throws:
PersistenceException
 

update
public void update (T obj, PersistenceContext context)
 
Throws:
PersistenceException
 

Class
Tree
          
SUMMARY: INNER | FIELD | CONSTR | METHODDETAIL: FIELD | CONSTR | METHOD