|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface PersistenceManager
The PersistenceManager interface identifies the set of methods that applications
use to manage the persistent state of their business objects. While
all of the methods declared by this interface execute on the server,
they are accessable to client application through a helper class. See
PersistenceHelper.
Supported API: true
Extendable: false
| Method Summary | |
|---|---|
Persistable |
delete(Persistable obj)
Removes the given persistable object from the datastore. |
WTSet |
delete(WTSet a_objects)
Removes the specified persistable objects from the datastore. |
QueryResult |
find(Class targetLinkClass,
ObjectIdentifier obj1Oid,
String obj1Role,
ObjectIdentifier obj2Oid)
Retrieves any and all link objects that exist between two Persistable objects given their object identifiers. |
QueryResult |
find(Class targetLinkClass,
Persistable obj1,
String obj1Role,
Persistable obj2)
Retrieves any and all link objects that exist between two given Persistable objects. |
QueryResult |
find(QuerySpec criteria)
Deprecated. as of R8.0, use find(StatementSpec). |
QueryResult |
find(StatementSpec a_statementSpec)
Retrieves persistable objects from the datastore given the specified statement. |
ResultProcessor |
find(StatementSpec a_statementSpec,
ResultProcessor a_resultProcessor)
Retrieves persistable objects from the datastore for the specified statement. |
InputStream |
getLob(wt.fc.LobLocator lob)
Returns an input stream to the Lob associated with the given lob locator. |
String |
getNextSequence(Class a_class)
Given the sequence class as input, return the next value. |
Persistable |
modify(Persistable obj)
Updates the given Persistable object in the datastore. |
Persistable |
modify(Persistable obj,
String attrName,
ObjectMappable objAttr)
Updates the given Persistable object in the datastore with the values specified in the ObjectMappable attribute. |
WTCollection |
modify(WTCollection a_objects)
Updates the specified Persistable objects in the datastore. |
WTCollection |
modify(WTCollection a_objects,
wt.fc.WTCollectionExceptionHandler a_handler)
Updates the specified Persistable objects in the datastore. |
QueryResult |
navigate(Persistable obj,
String role,
Class linkClass)
Retrieves objects related to the given persistable object given a role and link class. |
QueryResult |
navigate(Persistable obj,
String role,
Class linkClass,
boolean onlyOtherSide)
Retrieves objects related to the given persistable object given a role and link class. |
QueryResult |
navigate(Persistable obj,
String role,
QuerySpec criteria)
Retrieves objects related to the given persistable object given a role, an association name and selection criteria. |
QueryResult |
navigate(Persistable obj,
String role,
QuerySpec criteria,
boolean onlyOtherSide)
Retrieves objects related to the given persistable object given a role, an association name and selection criteria. |
Persistable |
refresh(ObjectIdentifier objId)
Retrieves a Persistable object from the database given its object identifier. |
Persistable |
refresh(ObjectIdentifier objId,
boolean lock)
Retrieves a Persistable object from the database given its object identifier. |
Persistable |
refresh(Persistable obj)
Retrieves the given Persistable object from the database to restore its state. |
Persistable |
refresh(Persistable obj,
boolean fullRefresh)
Retrieves the given Persistable object from the database to restore its state. |
Persistable |
refresh(Persistable obj,
boolean fullRefresh,
boolean inPlace)
Retrieves the given Persistable object from the database to restore its state. |
Persistable |
refresh(Persistable obj,
boolean fullRefresh,
boolean inPlace,
boolean lock)
Retrieves the given Persistable object from the database to restore its state. |
Persistable |
save(Persistable obj)
Invokes the modify method if the given object is persistent, otherwise the save method invokes the store method. |
WTCollection |
save(WTCollection objects)
Invokes the modify method on the objects that are already persisted, otherwise invokes the store method. |
Persistable |
store(Persistable obj)
Stores the specified Persistable object in the datastore. |
WTCollection |
store(WTCollection a_objects)
Stores the specified collection of Persistable objects in the datastore. |
WTCollection |
store(WTCollection a_objects,
wt.fc.WTCollectionExceptionHandler a_handler)
Stores the specified collection of Persistable objects in the datastore. |
| Method Detail |
|---|
Persistable delete(Persistable obj)
throws WTException
The target for this operations dispatched event is the specified Persistable object for a single object event listener and a WTCollection containing the specified Persistable object for a multiple object event listener. Note that the PRE_REMOVE event is not supported for a single object event listener.
The delete performs the following operations.
PersistenceManagerEvent.PRE_DELETE event.
Persistable.checkAttributes()).
BinaryLink objects that are owned
by the role object that is being deleted.
PersistenceManagerEvent.CLEANUP_LINK event.
PersistenceManagerEvent.PRE_REMOVE event.
PersistenceManagerEvent.REMOVE event.
BinaryLink, then any cascaded
role objects are deleted.
PersistenceManagerEvent.POST_DELETE event.
Before the commit of the transaction that this delete operation occurs
in, the persistence service verifies that no BinaryLink
objects exist that reference any of the removed objects.
obj - The object to be deleted from the datastore.
WTException
QueryResult find(QuerySpec criteria)
throws WTException
criteria - The search criteria to use for the find
WTException
QueryResult find(Class targetLinkClass,
Persistable obj1,
String obj1Role,
Persistable obj2)
throws WTException
targetLinkClass - obj1 - obj1Role - obj2 -
WTException
QueryResult find(Class targetLinkClass,
ObjectIdentifier obj1Oid,
String obj1Role,
ObjectIdentifier obj2Oid)
throws WTException,
InvalidRoleException
targetLinkClass - obj1Oid - obj1Role - obj2Oid -
WTException
InvalidRoleException
InputStream getLob(wt.fc.LobLocator lob)
throws WTException
lob - the Lob locator.
WTException
Persistable modify(Persistable obj)
throws WTException
The target for this operations dispatched event is the specified Persistable object for a single object event listener and a WTCollection containing the specified Persistable object for a multiple object event listener.
The modify method performs the following operations.
PersistenceManagerEvent.PRE_MODIFY event.
Persistable.checkAttributes()).
PersistenceManagerEvent.UPDATE event.
PersistenceManagerEvent.POST_MODIFY event.
obj - The object to be modified in the datastore
WTException
QueryResult navigate(Persistable obj,
String role,
Class linkClass)
throws WTException
obj - The persistable object to navigate.role - The role to navigate tolinkClass - The link class to navigate
WTException
QueryResult navigate(Persistable obj,
String role,
Class linkClass,
boolean onlyOtherSide)
throws WTException
obj - role - linkClass - The link class for the association to navigateonlyOtherSide - Indicates that only the other side objects of the association should be returned. If false, then the link objects are returned (the other side object can be obtained via the link object's getter method).
WTException
QueryResult navigate(Persistable obj,
String role,
QuerySpec criteria)
throws WTException
obj - The persistable object to navigaterole - The role to navigate tocriteria - Selection criteria for the navigate. This QuerySpec must contain the target and link class at class index 0 and 1, respectively.
WTException
QueryResult navigate(Persistable obj,
String role,
QuerySpec criteria,
boolean onlyOtherSide)
throws WTException
obj - The persistable object to navigaterole - The role to navigate tocriteria - Selection criteria for the navigate. This QuerySpec must contain the target and link class at class index 0 and 1, respectively.onlyOtherSide - Indicates that only the other side objects of the association should be returned. If false, then the link objects are returned (the other side object can be obtained via the link object's getter method).
WTException
Persistable refresh(Persistable obj,
boolean fullRefresh)
throws WTException,
ObjectNoLongerExistsException
obj - The persistable object to be refreshedfullRefresh - Set to true if the object references for the target object should be refreshed as well.
WTException
ObjectNoLongerExistsException
Persistable refresh(Persistable obj)
throws WTException,
ObjectNoLongerExistsException
obj - The persistable object to be refreshed
WTException
ObjectNoLongerExistsException
Persistable refresh(ObjectIdentifier objId)
throws WTException,
ObjectNoLongerExistsException
objId -
WTException
ObjectNoLongerExistsException
Persistable save(Persistable obj)
throws WTException
obj - The persistable object to be saved
WTException
Persistable store(Persistable obj)
throws WTException
The target for this operations dispatched event is the specified Persistable object for a single object event listener and a WTCollection containing the specified Persistable object for a multiple object event listener.
The store method performs the following operations.
PersistenceManagerEvent.PRE_STORE event.
Persistable.checkAttributes()).
PersistenceManagerEvent.INSERT event.
PersistenceManagerEvent.POST_STORE event.
obj - The object to be stored in the datastore
WTException
Persistable modify(Persistable obj,
String attrName,
ObjectMappable objAttr)
throws WTException
obj - attrName - objAttr -
WTException
QueryResult find(StatementSpec a_statementSpec)
throws WTException
a_statementSpec - The search criteria to use for the find
WTException
Persistable refresh(Persistable obj,
boolean fullRefresh,
boolean inPlace)
throws WTException,
ObjectNoLongerExistsException
obj - The persistable object to be refreshedfullRefresh - Set to true if the object references for the target object should be refreshed as well.inPlace - Set to true if the target object should be refreshed in place.
WTException
ObjectNoLongerExistsException
ResultProcessor find(StatementSpec a_statementSpec,
ResultProcessor a_resultProcessor)
throws WTException
a_statementSpec - a_resultProcessor -
WTException
Persistable refresh(Persistable obj,
boolean fullRefresh,
boolean inPlace,
boolean lock)
throws WTException,
ObjectNoLongerExistsException
obj - The persistable object to be refreshedfullRefresh - Set to true if the object references for the target object should be refreshed as well.inPlace - Set to true if the target object should be refreshed in place.lock - Specifies whether the object should be locked as part of the refresh. This value should only be true when the call is within the context of a server-side transaction.
WTException
ObjectNoLongerExistsException
WTCollection store(WTCollection a_objects,
wt.fc.WTCollectionExceptionHandler a_handler)
throws WTException
The target for this operations dispatched event is a Persistable object for a single object event listener (the listener is called once for each object in the collection) and the specified collection of Persistable objects for a multiple object event listener.
The store method performs the following operations.
PersistenceManagerEvent.PRE_STORE event.
Persistable.checkAttributes()
for each object).
PersistenceManagerEvent.INSERT event.
PersistenceManagerEvent.POST_STORE event.
a_objects - The objects to be stored in the datastorea_handler - Specifies a custom handler for processing any exceptions that occur. If null, then default processing will be used.
WTException
WTCollection modify(WTCollection a_objects,
wt.fc.WTCollectionExceptionHandler a_handler)
throws WTException
The target for this operations dispatched event is the specified Persistable object for a single object event listener (the listener is called once for each object in the collection) and a WTCollection containing the specified Persistable object for a multiple object event listener.
The modify method performs the following operations.
PersistenceManagerEvent.PRE_MODIFY event.
Persistable.checkAttributes()
for each object).
PersistenceManagerEvent.UPDATE event.
PersistenceManagerEvent.POST_MODIFY event.
a_objects - The objects to be modified in the datastorea_handler - Specifies a custom handler for processing any exceptions that occur. If null, then default processing will be used.
WTException
WTSet delete(WTSet a_objects)
throws WTException
The target for this operations dispatched event is the specified Persistable object for a single object event listener (the listener is called once for each object in the collection) and a WTCollection containing the specified Persistable object for a multiple object event listener. Note that the PRE_REMOVE event is not supported for a single object event listener.
The delete performs the following operations.
PersistenceManagerEvent.PRE_DELETE event.
Persistable.checkAttributes()
for each object).
BinaryLink objects that are owned
by the role objects that are being deleted.
PersistenceManagerEvent.CLEANUP_LINK event.
PersistenceManagerEvent.PRE_REMOVE event.
PersistenceManagerEvent.REMOVE event.
BinaryLink, cascaded
role objects are deleted.
PersistenceManagerEvent.POST_DELETE event.
Before the commit of the transaction that this delete operation occurs
in, the persistence service verifies that no BinaryLink
objects exist that reference any of the removed objects.
a_objects - The objects to be deleted from the datastore.
WTException
WTCollection save(WTCollection objects)
throws WTException
objects - The persistable objects to be saved
WTException
String getNextSequence(Class a_class)
throws WTException
a_class -
WTException
Persistable refresh(ObjectIdentifier objId,
boolean lock)
throws WTException,
ObjectNoLongerExistsException
objId - lock -
WTException
ObjectNoLongerExistsException
WTCollection store(WTCollection a_objects)
throws WTException
The target for this operations dispatched event is a Persistable object for a single object event listener (the listener is called once for each object in the collection) and the specified collection of Persistable objects for a multiple object event listener.
The store method performs the following operations.
PersistenceManagerEvent.PRE_STORE event.
Persistable.checkAttributes()
for each object).
PersistenceManagerEvent.INSERT event.
PersistenceManagerEvent.POST_STORE event.
a_objects - The objects to be stored in the datastore
WTException
WTCollection modify(WTCollection a_objects)
throws WTException
The target for this operations dispatched event is the specified Persistable object for a single object event listener (the listener is called once for each object in the collection) and a WTCollection containing the specified Persistable object for a multiple object event listener.
The modify method performs the following operations.
PersistenceManagerEvent.PRE_MODIFY event.
Persistable.checkAttributes()
for each object).
PersistenceManagerEvent.UPDATE event.
PersistenceManagerEvent.POST_MODIFY event.
a_objects - The objects to be modified in the datastore
WTException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||