|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vinculumtech.platform.root.PersistenceRoot
PersistenceRoot
is responsible for life cycle management of all persistent
objects, and is the sole interface to the persistence engine.
A PersistenceSession
must be created and destroyed for each Thread
at the server boundaries.
PersistenceSession
Field Summary | |
static java.lang.String |
PERSISTENCE_SESSION_PROPERTY
The property name specifying the PersistenceSession implementation to use. |
Method Summary | |
static void |
beginSession(boolean readOnly)
Create a PersistenceSession for the current Thread . |
static void |
commitSession()
Destroy the PersistenceSession for the current Thread . |
static java.lang.Object |
createInstanceOf(java.lang.Class type)
Create a new object of the specified type. |
static void |
deleteInstance(java.lang.Object object)
Delete a persisted object. |
static java.util.List |
findAllInstancesOf(java.lang.Class type,
boolean excludeSubclasses)
Return the a List of all objects of the given type |
static java.util.List |
findAllInstancesOf(PersistenceCollectionFinder finder)
Return a List of all objects meeting the criteria specified
by the given CollectionFinder . |
static java.lang.Object |
findInstanceOf(java.lang.Class type)
Return the existing object of the specified type. |
static java.lang.Object |
findInstanceOf(java.lang.Class type,
java.lang.Object objectId)
Return the existing object of the specified type with the given id. |
static java.lang.Object |
findInstanceOf(java.lang.Class type,
java.lang.String referenceableName)
Return the existing object of the specified type with the given name. |
static java.lang.Object |
findInstanceOf(PersistenceObjectFinder finder)
Find the existing object using the query represented by the specified ObjectFinder . |
static java.lang.Object |
getIdentityOf(java.lang.Object object)
|
protected static PersistenceSession |
getPersistenceSession()
Get the PersistenceSession for the current Thread . |
static java.lang.String |
getReferenceableNameOf(java.lang.Object object)
|
static boolean |
isInSession()
Test whether this thread has an available PersistenceSession . |
static void |
rollbackSession()
Destroy the PersistenceSession for the current Thread . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String PERSISTENCE_SESSION_PROPERTY
PersistenceSession
implementation to use.
Method Detail |
public static final void beginSession(boolean readOnly)
Thread
. This must be
done before any other persistence methods are invoked.
readOnly
- Specifies whether this session will make modifications to domain objects or not.public static final void rollbackSession()
PersistenceSession
for the current Thread
. Each
call into the server must destroy it's session before returning.
public static final void commitSession()
PersistenceSession
for the current Thread
. Each
call into the server must destroy it's session before returning.
public static final boolean isInSession()
PersistenceSession
.
protected static final PersistenceSession getPersistenceSession()
PersistenceSession
for the current Thread
.
java.lang.IllegalStateException
- if no PersistenceSession is active for the current threadpublic static final java.lang.Object findInstanceOf(java.lang.Class type)
Use this method with Singleton type instances.
public static final java.lang.Object findInstanceOf(java.lang.Class type, java.lang.Object objectId)
public static final java.lang.Object findInstanceOf(java.lang.Class type, java.lang.String referenceableName)
public static final java.lang.Object findInstanceOf(PersistenceObjectFinder finder)
ObjectFinder
.
public static final java.util.List findAllInstancesOf(java.lang.Class type, boolean excludeSubclasses)
List
of all objects of the given type
public static final java.util.List findAllInstancesOf(PersistenceCollectionFinder finder)
List
of all objects meeting the criteria specified
by the given CollectionFinder
.
public static final java.lang.Object createInstanceOf(java.lang.Class type) throws PersistenceException
PersistenceException
public static final void deleteInstance(java.lang.Object object) throws PersistenceException
PersistenceException
public static final java.lang.Object getIdentityOf(java.lang.Object object) throws PersistenceException
PersistenceException
public static java.lang.String getReferenceableNameOf(java.lang.Object object)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |