|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vinculumtech.platform.root.PersistenceSession
Each persistence engine has an associated PersistenceSession
implementation, which manages
the engine-specific state and behavior required to perform persistence operations.
The InMemoryPersistenceSession
is the default
implementation used by CarrierWave for simple object persistence and querying functinality.
PersistenceRoot
Field Summary | |
static java.lang.String |
REFERENCEABLE_NAME_FIELD
|
Constructor Summary | |
protected |
PersistenceSession()
Should be made public by sub-class. |
Method Summary | |
abstract void |
beginSession(boolean readOnly)
Initialize the session for the current Thread . |
abstract void |
commitSession()
Perform any necessary cleanup before the session is completed. |
abstract java.lang.Object |
createInstanceOf(java.lang.Class type)
Create a new persistant instance of the given type. |
abstract void |
deleteInstance(java.lang.Object object)
Delete an object. |
abstract java.util.List |
findAllInstancesOf(java.lang.Class type,
boolean excludeSubclasses)
Return a List of all objects of the given type.If no object is found, an empty List is returned. |
java.util.List |
findAllInstancesOf(PersistenceCollectionFinder finder)
Return all objects that match the criteria specified by the given PersistenceCollectionFinder .If no object is found, an empty List is returned. |
abstract java.lang.Object |
findInstanceOf(java.lang.Class type,
java.lang.Object objectId)
Return the existing object of the specified type with the given id. If no object is found, null is returned. |
abstract java.lang.Object |
findInstanceOf(java.lang.Class type,
java.lang.String referenceableName)
Return the existing object of the specified type with the given referenceableName. Referenceable names are names that are more durable than the persistence tool object id, and are suitable for explicit referencing by remote applications. |
java.lang.Object |
findInstanceOf(PersistenceObjectFinder finder)
Find the single object instance that matches the criteria specified by the given PersistenceObjectFinder .If no object is found, null is returned. |
java.lang.Object |
getIdentityOf(java.lang.Object object)
|
static java.lang.String |
getReferenceableNameField()
|
java.lang.String |
getReferenceableNameOf(java.lang.Object object)
|
abstract void |
rollbackSession()
Rollback the current session. |
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 REFERENCEABLE_NAME_FIELD
Constructor Detail |
protected PersistenceSession()
Method Detail |
public static java.lang.String getReferenceableNameField()
public abstract void beginSession(boolean readOnly)
Thread
.
readOnly
- Specifies whether this session will make modifications to domain objects or notpublic abstract void rollbackSession()
public abstract void commitSession()
public abstract java.lang.Object findInstanceOf(java.lang.Class type, java.lang.Object objectId)
type
- objectId
-
public abstract java.lang.Object findInstanceOf(java.lang.Class type, java.lang.String referenceableName)
REFERENCEABLE_NAME_FIELD
when searching
for the applicable object. Or it should use a custom naming scheme.
type
- referenceableName
-
public java.lang.Object findInstanceOf(PersistenceObjectFinder finder)
PersistenceObjectFinder
.
finder
-
public abstract java.util.List findAllInstancesOf(java.lang.Class type, boolean excludeSubclasses)
List
of all objects of the given type.
type
-
public java.util.List findAllInstancesOf(PersistenceCollectionFinder finder)
PersistenceCollectionFinder
.
finder
-
public abstract java.lang.Object createInstanceOf(java.lang.Class type)
type
-
public abstract void deleteInstance(java.lang.Object object)
object
- public java.lang.Object getIdentityOf(java.lang.Object object)
public java.lang.String getReferenceableNameOf(java.lang.Object object)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |