Package com.newstep.solid.persistence

 
Subpackages Summary
config 
db 

 
Package Diagram Summary
persistence 
 
Class Summary
ConnectionFactory 
ConstraintException 
DataSourceConnectionFactory 
KeeperFactory 
ObjectNotFoundException 
PagedQuery 
PersistenceContext 
PersistenceException 
PoolingDataSourceConnectionFactory 
ReadOnlyException 
TransactionManager 
TransactionManagerFactory 
UniqueConstraintException 
UniqueIdGeneratorFactory 

 
Interface Summary
BatchCRUDKeeper 
CRUDKeeper 
PostQueryCriteria 
PreQueryCriteria 
Transaction 
UniqueIdGenerator 

 
Package Summary
config 
db 
Package Elements Detail
BatchCRUDKeeper
Batch update/create CRUDKeeper.
Author:
msimonsen
 
Links:
Generalization Generalization Link
to Interface CRUDKeeper
Batch update/create CRUDKeeper.
Author:
msimonsen
 

 
Generalization Summary
Generalization LinkBatch update/create CRUDKeeper.

 
Operation Summary
create 
update 

 
Template Signature Summary
Unknown Name 

create
 
Abstract.
Throws:
PersistenceException
 

 
Parameter Summary
col 
context 
return 

col
 

context
 

return
 

Generalization Link
Batch update/create CRUDKeeper.
Author:
msimonsen
 

Unknown Name
 

 
Template Parameter Summary
T 

T
Parameter Metaclass:
Class20
 

 
Class Summary
T 

T
Final.
Custom properties
templateParameterString:
T
 

update
 
Abstract.
Throws:
PersistenceException
 

 
Parameter Summary
col 
context 
return 

col
 

context
 

return
 

CRUDKeeper
A templated Create/Retrieve/Update/Delete Keeper, with
querying capabilities.

Consider making the ID an object or String, that allows
greater flexibility for the persistence mechanism.
Version:
1.0
Author:
msimonsen
Custom properties
param:
 

 
Operation Summary
createAdd an object.
deleteDelete an object
getGet an object by its id.
getAllGets all records.
getBeanClass 
queryWill perform filtering internally based on the Post query criteria.
queryWill build the appropriate external query so that the underlying
persistence mechanism provides the filtering.
queryByBeanBuilds an "AND"ed query based on the sample bean object egObject.
queryEntityByBeanBuilds 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.
updateUpdate an object

 
Template Signature Summary
Unknown Name 

create
 
Add an object.
Parameters:
obj
context
Return:
The keeper
Abstract.
Throws:
PersistenceException
 

 
Parameter Summary
context 
obj 
return 

context
 

obj
 

return
 

delete
 
Delete an object
Parameters:
obj
context
Abstract.
Throws:
PersistenceException
 

 
Parameter Summary
context 
obj 

context
 

obj
 

get
 
Get an object by its id.
Parameters:
id
context
Abstract.
Throws:
PersistenceException
Custom properties
return The:
keeper
 

 
Parameter Summary
context 
id 
return 

context
 

id
 

return
 

getAll
 
Gets all records.
Parameters:
context
Return:
A collection of all objects
Abstract.
Throws:
PersistenceException
 

 
Parameter Summary
context 
return 

context
 

return
 

getBeanClass
 
Abstract.
 

 
Parameter Summary
return 

return
 

query
 
Will perform filtering internally based on the Post query criteria.
Parameters:
query - An initiated/populated postQuery criteria
context - Persistence context
Return:
A collection based on query.
Abstract.
Throws:
PersistenceException
 

 
Parameter Summary
context 
query 
return 

context
 

query
 

return
 

query
 
Will build the appropriate external query so that the underlying
persistence mechanism provides the filtering.
Parameters:
query - An initiated/populated query
context - The persistence context.
Abstract.
Throws:
PersistenceException
Custom properties
return A:
collection based on query.
 

 
Parameter Summary
context 
query 
return 

context
 

query
 

return
 

queryByBean
 
Builds an "AND"ed query based on the sample bean object egObject.
Parameters:
bean - the object to filter against
context
Return:
A collection based on query.
Abstract.
Throws:
PersistenceException
 

 
Parameter Summary
attributeNames 
bean 
context 
return 

attributeNames
 

bean
 

context
 

return
 

queryEntityByBean
 
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
Return:
A collection based on query.
Abstract.
Throws:
PersistenceException
 

 
Parameter Summary
attributeNames 
bean 
context 
return 

attributeNames
 

bean
 

context
 

return
 

Unknown Name
 

 
Template Parameter Summary
T 

T
Parameter Metaclass:
Class20
 

 
Class Summary
T 

T
Final.
Custom properties
templateParameterString:
T
 

update
 
Update an object
Parameters:
obj
context
Abstract.
Throws:
PersistenceException
 

 
Parameter Summary
context 
obj 

context
 

obj
 

PostQueryCriteria
A filtering criteria that is executed once results are returned
from a query that retrieves all results.
This could be potentially expensive query
if the Keeper returns a large number of records.
Version:
1.0
Author:
msimonsen
 

 
Operation Summary
matchesPerforms post query evaluation to determine the
a filtered collection being returned.

matches
 
Performs post query evaluation to determine the
a filtered collection being returned.
Parameters:
bean
Return:
true if a match is found
Abstract.
 

 
Parameter Summary
bean 
return 

bean
 

return
 

PreQueryCriteria
A query that builds a interpretable syntax for
allowing the underlying persistence mechanism
DB/LDAP/FILE(unlikely) filtering before results are
returned to the persistence application.
Author:
msimonsen
 

 
Operation Summary
buildQueryReturns an appropriate query OR clause.

buildQuery
 
Returns an appropriate query OR clause.
Return:
A String that represents a parsable statement that
the persistence mechanism can use to query.
Abstract.
 

 
Parameter Summary
return 

return
 

Transaction
Abstraction of the transaction concept allowing console to operate using
multiple persistence mechanisms/vendors
 

 
Operation Summary
beginStarts the transaction
commitcommits the updates performed within the transaction
Note: must be called after begin() and prior to end()
endEnds the transaction
Note: transaction should be commited or rolledback prior to calling end
rollbackRolls back the persistence state prior to the transaction begin()
Note: must be called after begin() and before end()


begin
 
Starts the transaction
Exceptions:
PersistenceException if an error occurs starting the transaction
Abstract.
Throws:
PersistenceException
 

commit
 
commits the updates performed within the transaction
Note: must be called after begin() and prior to end()
Exceptions:
PersistenceException if an error occurs commiting the transaction
Abstract.
Throws:
PersistenceException
 

DEFAULT_ISOLATION_LEVEL
Final.
Multiplicity:
1
Static.
 

end
 
Ends the transaction
Note: transaction should be commited or rolledback prior to calling end
Exceptions:
PersistenceException if an error occurs ending the transaction
Abstract.
Throws:
PersistenceException
 

READ_COMMITTED
Final.
Multiplicity:
1
Static.
 

READ_UNCOMMITTED
Final.
Multiplicity:
1
Static.
 

REPEATABLE_READ
Final.
Multiplicity:
1
Static.
 

rollback
 
Rolls back the persistence state prior to the transaction begin()
Note: must be called after begin() and before end()
Exceptions:
PersistenceException if an error occurs performing the transaction rollback
Abstract.
Throws:
PersistenceException
 

SERIALIZED
Final.
Multiplicity:
1
Static.
 

UniqueIdGenerator
A generic interface abstracting the various persistence mechanisms
for generating unique keys. This abstraction allows migration to
different persistence mechanisms/vendors though interface implementations
 

 
Operation Summary
getCurrentUniqueIdGets the current UID for the specified sequence
getNextUniqueIdGenerates the next valid unique id for the specified sequence

 
Property Summary
INVALID_ID 

getCurrentUniqueId
 
Gets the current UID for the specified sequence
Parameters:
uidName the name of the sequence
transaction the transaction in which the id retrieval should participate
Exceptions:
PersistenceException Description of the Exception
Return:
The currentUID value
Abstract.
Throws:
PersistenceException
 

 
Parameter Summary
return 
transaction 
uidName 

return
 

transaction
 

uidName
 

getNextUniqueId
 
Generates the next valid unique id for the specified sequence
Parameters:
uidName the name of the sequence
transaction the transaction in which the id generation should participate
Exceptions:
PersistenceException if an error occurs generating the next UID
Return:
The next UID value
Abstract.
Throws:
PersistenceException
 

 
Parameter Summary
return 
transaction 
uidName 

return
 

transaction
 

uidName
 

INVALID_ID
Final.
Multiplicity:
1
Static.