|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectwt.services.StandardManager
wt.fc.StandardPersistenceManager
public class StandardPersistenceManager
StandardPersistenceManager is a concrete persistent manager targeted for WTObject classes.
Use the newStandardPersistenceManager static factory method(s),
not the StandardPersistenceManager constructor, to construct
instances of this class. Instances must be constructed using the static
factory(s), in order to ensure proper initialization of the instance.
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. |
int |
execute(AbstractBatchSpec a_batchSpec)
This method executes a batch update or delete operation on the specified Batch Specification. |
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. |
QueryResult |
query(StatementSpec a_statementSpec)
Retrieves persistable objects from the datastore given the specified statement. |
void |
query(StatementSpec a_statementSpec,
ResultProcessor a_resultProcessor)
Retrieves persistable objects from the datastore for the specified statement. |
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. |
Persistable |
store(Persistable obj,
Timestamp createDate,
Timestamp modifyDate)
Stores the given Persistable object in the datastore with the given timestamps. |
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. |
| Methods inherited from class wt.services.StandardManager |
|---|
getManagerService, getManagerStatus, getName, getStartupType |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public 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.
delete in interface PersistenceManagerobj - The object to be deleted from the datastore.
WTException
public QueryResult find(QuerySpec criteria)
throws WTException
find in interface PersistenceManagercriteria - The search criteria to use for the find
WTException
public QueryResult find(Class targetLinkClass,
Persistable obj1,
String obj1Role,
Persistable obj2)
throws WTException
find in interface PersistenceManagertargetLinkClass - obj1 - obj1Role - obj2 -
WTException
public QueryResult find(Class targetLinkClass,
ObjectIdentifier obj1Oid,
String obj1Role,
ObjectIdentifier obj2Oid)
throws WTException,
InvalidRoleException
find in interface PersistenceManagertargetLinkClass - obj1Oid - obj1Role - obj2Oid -
WTException
InvalidRoleException
public InputStream getLob(wt.fc.LobLocator lob)
throws WTException
getLob in interface PersistenceManagerlob - the Lob locator.
WTException
public 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.
modify in interface PersistenceManagerobj - The object to be modified in the datastore
WTException
public QueryResult navigate(Persistable obj,
String role,
Class linkClass)
throws WTException
navigate in interface PersistenceManagerobj - The persistable object to navigate.role - The role to navigate tolinkClass - The link class to navigate
WTException
public QueryResult navigate(Persistable obj,
String role,
Class linkClass,
boolean onlyOtherSide)
throws WTException
navigate in interface PersistenceManagerobj - 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
public QueryResult navigate(Persistable obj,
String role,
QuerySpec criteria)
throws WTException
navigate in interface PersistenceManagerobj - 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
public QueryResult navigate(Persistable obj,
String role,
QuerySpec criteria,
boolean onlyOtherSide)
throws WTException
navigate in interface PersistenceManagerobj - 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
public Persistable refresh(Persistable obj,
boolean fullRefresh)
throws WTException,
ObjectNoLongerExistsException
refresh in interface PersistenceManagerobj - The persistable object to be refreshedfullRefresh - Set to true if the object references for the target object should be refreshed as well.
WTException
ObjectNoLongerExistsException
public Persistable refresh(Persistable obj)
throws WTException,
ObjectNoLongerExistsException
refresh in interface PersistenceManagerobj - The persistable object to be refreshed
WTException
ObjectNoLongerExistsException
public Persistable refresh(ObjectIdentifier objId)
throws WTException,
ObjectNoLongerExistsException
refresh in interface PersistenceManagerobjId -
WTException
ObjectNoLongerExistsException
public Persistable save(Persistable obj)
throws WTException
save in interface PersistenceManagerobj - The persistable object to be saved
WTException
public 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.
store in interface PersistenceManagerobj - The object to be stored in the datastore
WTException
public Persistable modify(Persistable obj,
String attrName,
ObjectMappable objAttr)
throws WTException
modify in interface PersistenceManagerobj - attrName - objAttr -
WTException
public QueryResult find(StatementSpec a_statementSpec)
throws WTException
find in interface PersistenceManagera_statementSpec - The search criteria to use for the find
WTException
public Persistable refresh(Persistable obj,
boolean fullRefresh,
boolean inPlace)
throws WTException,
ObjectNoLongerExistsException
refresh in interface PersistenceManagerobj - 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
public ResultProcessor find(StatementSpec a_statementSpec,
ResultProcessor a_resultProcessor)
throws WTException
find in interface PersistenceManagera_statementSpec - a_resultProcessor -
WTException
public Persistable refresh(Persistable obj,
boolean fullRefresh,
boolean inPlace,
boolean lock)
throws WTException,
ObjectNoLongerExistsException
refresh in interface PersistenceManagerobj - 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
public 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.
store in interface PersistenceManagera_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
public 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.
modify in interface PersistenceManagera_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
public 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.
delete in interface PersistenceManagera_objects - The objects to be deleted from the datastore.
WTException
public WTCollection save(WTCollection objects)
throws WTException
save in interface PersistenceManagerobjects - The persistable objects to be saved
WTException
public String getNextSequence(Class a_class)
throws WTException
getNextSequence in interface PersistenceManagera_class -
WTException
public Persistable refresh(ObjectIdentifier objId,
boolean lock)
throws WTException,
ObjectNoLongerExistsException
refresh in interface PersistenceManagerobjId - lock -
WTException
ObjectNoLongerExistsException
public 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.
store in interface PersistenceManagera_objects - The objects to be stored in the datastore
WTException
public 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.
modify in interface PersistenceManagera_objects - The objects to be modified in the datastore
WTException
public QueryResult query(StatementSpec a_statementSpec)
throws WTException
query in interface PersistenceManagerSvra_statementSpec - The statement instance specifying the query to execute.
WTException
public Persistable store(Persistable obj,
Timestamp createDate,
Timestamp modifyDate)
throws WTException
store in interface PersistenceManagerSvrobj - createDate - modifyDate -
WTException
public void query(StatementSpec a_statementSpec,
ResultProcessor a_resultProcessor)
throws WTException
query in interface PersistenceManagerSvra_statementSpec - a_resultProcessor -
WTException
public int execute(AbstractBatchSpec a_batchSpec)
throws WTException
execute in interface PersistenceManagerSvra_batchSpec - Batch Specification to execute.
WTException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||