|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Persistence
Core persistence implementation interface. This interface describes the methods that the Core must expose in order to support persistence. The methods exposed also describe the contract between this package and the Core - this package provides a Service implementation for each.
| Method Summary | ||
|---|---|---|
void |
closePersistenceSession()
Close the open session associated with the current thread and commit. |
|
|
create(T object)
Create a persistent copy of an object. |
|
void |
delete(Type object)
Delete one or more objects from persistent storage. |
|
|
load(java.lang.Class<T> type,
long systemId)
Load a specific instance of a type by ID. |
|
void |
openPersistenceSession()
Initiate a persistence session. |
|
java.util.List<?> |
query(java.lang.String queryName,
java.lang.Object... queryArgs)
Query persistent storage for the collection of objects returned by a query. |
|
Type |
queryUnique(java.lang.String queryName,
java.lang.Object... queryArgs)
Query persistent storage for the single object returned by a query. |
|
|
update(T object)
Update the persistent copy of an object from its in memory copy. |
|
| Method Detail |
|---|
<T extends Type> T create(T object)
The - object to be persisted.
java.util.List<?> query(java.lang.String queryName,
java.lang.Object... queryArgs)
queryName - The name of the query to be executed.queryArgs - Arguments to be used by the query.
VersionException - The version argument is either badly defined, or relates to a version that does not exist.
Type queryUnique(java.lang.String queryName,
java.lang.Object... queryArgs)
queryName - The name of the query to be executed.queryArgs - Arguments to be used by the query.
VersionException - The version argument is either badly defined, or relates to a version that does not exist.
<T extends Type> T load(java.lang.Class<T> type,
long systemId)
type - The type to be loadedsystemId - the systemId of the instance to load.
<T extends Type> T update(T object)
object - The object to be written to persistent storage.
void delete(Type object)
object - Object to be deleted
VersionException - If the version object is badly defined, or relates to a version that does not exist.void openPersistenceSession()
closePersistenceSession() are performed within
one transaction.
void closePersistenceSession()
openPersistenceSession()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||