wt.fc
Interface PersistenceManagerSvr

All Known Implementing Classes:
StandardPersistenceManager

public interface PersistenceManagerSvr

The PersistenceManagerSvr interface identifies the set of PersistentManager methods that are invokable only from classes running in the method server

Supported API: true

Extendable: false


Method Summary
 BinaryLink copyLink(BinaryLink linkToCopy, Persistable roleObject, String roleObjectRole, Persistable otherRoleObject)
          Copies a link by duplicating it, replacing the role members, and persisting the new link using a server-side insert.
 WTValuedHashMap copyLink(WTValuedHashMap linksToCopy)
          Copies links in the specified Map for each key (original copy) by persisting the associated value (new link) using a server-side insert.
 int execute(AbstractBatchSpec a_batchSpec)
          This method executes a batch update or delete operation on the specified Batch Specification.
 QueryResult expand(Persistable obj, String role, Class linkClass, boolean onlyOtherSide)
          Retrieves objects related to the given persistable object given a role and link class.
 QueryResult expand(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.
 void insert(Persistable obj)
          Stores the given Persistable object into the datastore.
 void insert(Persistable obj, Timestamp createDate, Timestamp modifyDate)
          Stores the given Persistable object into the datastore.
 void insert(WTCollection a_objects)
          Stores the given Persistable object into the datastore.
 void lock(Object a_class)
          Performs a database lock on the given class table.
 void lock(Persistable obj)
          Performs a database lock on the given Persistable's row.
 void lock(Persistable obj, boolean wait)
          Performs a database lock on the given Persistable's row.
 void lock(Persistable obj, int retry, int sleepIntervalSeconds)
          Performs a database lock on the given Persistable's row.
 QueryResult query(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 query(Class targetLinkClass, Persistable obj1, String obj1Role, Persistable obj2)
          Retrieves any and all link objects that exist between two given Persistable objects.
 QueryResult query(QuerySpec qs)
          Retrieves persistable objects from the datastore given the specified selection criteria.
 QueryResult query(StatementSpec a_statementSpec)
          Retrieves persistable objects from the datastore given the specified statement.
 QueryResult query(StatementSpec a_statementSpec, AccessControllerProcessor a_accessControllerProcessor)
          

Supported API: false
 void query(StatementSpec a_statementSpec, AccessControllerProcessor a_accessControllerProcessor, ResultProcessor a_resultProcessor)
          This method queries the persistent datastore.
 void query(StatementSpec a_statementSpec, ResultProcessor a_resultProcessor)
          Retrieves persistable objects from the datastore for the specified statement.
 void remove(Persistable obj)
          Removes the given persistable object from the datastore.
 void remove(WTSet a_objects)
          Removes the specified objects from the datastore.
 Persistable restore(ObjectIdentifier objId)
          Retrieves a Persistable object from the database given its object identifier.
 Persistable restore(ObjectIdentifier objId, boolean checkFreshness)
          Retrieves a Persistable object from the database given its object identifier.
 Persistable restore(ObjectIdentifier objId, boolean checkFreshness, boolean lock)
          Retrieves a Persistable object from the database given its object identifier.
 Persistable restore(Persistable obj)
          Retrieves the given Persistable object from the database to restore its state.
 Persistable restore(Persistable obj, boolean fullRestore)
          Retrieves the given Persistable object from the database to restore its state.
 Persistable restore(Persistable obj, boolean fullRestore, boolean inPlace)
          Retrieves the given Persistable object from the database to restore its state.
 Persistable restore(Persistable obj, boolean fullRestore, boolean inPlace, boolean checkFreshness)
          Retrieves the given Persistable object from the database to restore its state.
 Persistable restore(Persistable obj, boolean fullRestore, boolean inPlace, boolean checkFreshness, boolean lock)
          Retrieves the given Persistable object from the database to restore its state.
 Persistable store(Persistable obj, Timestamp createDate, Timestamp modifyDate)
          Stores the given Persistable object in the datastore with the given timestamps.
 void update(Persistable obj)
          Updates the given Persistable object in the datastore.
 void update(Persistable obj, boolean changeModifyDate)
          Updates the given Persistable object in the datastore.
 void update(Persistable obj, String attrName, ObjectMappable objAttr)
          

Supported API: false
 void update(WTCollection a_objects)
          Updates the specified objects in the datastore.
 void update(WTCollection a_objects, boolean changeModifyDate)
          Updates the specified objects in the datastore.
 long updateLob(Persistable obj, LobLocator lob, InputStream stream, boolean changeModifyDate)
          Saves the specified input stream of unknown length as a Lob of the given Persistable object.
 void updateLob(Persistable obj, LobLocator lob, InputStream stream, long length, boolean changeModifyDate)
          Saves the specified input stream as a Lob of the given Persistable object.
 

Method Detail

expand

public QueryResult expand(Persistable obj,
                          String role,
                          Class linkClass,
                          boolean onlyOtherSide)
                   throws WTException
Retrieves objects related to the given persistable object given a role and link class. This method provides low level access to the database and bypasses access control operations.

Supported API: false

Parameters:
obj - The persistable object to navigate
role - The role to navigate to
linkClass - The link class to navigate
onlyOtherSide -
Returns:
QueryResult
Throws:
WTException

expand

public QueryResult expand(Persistable obj,
                          String role,
                          QuerySpec criteria,
                          boolean onlyOtherSide)
                   throws WTException
Retrieves objects related to the given persistable object given a role, an association name and selection criteria. This method provides low level access to the database and bypasses access control operations.

Supported API: false

Parameters:
obj - The persistable object to navigate
role - The role to navigate to
criteria - Selection criteria for the navigate. This QuerySpec must contain the target and link class at class index 0 and 1, respectively.
onlyOtherSide -
Returns:
QueryResult
Throws:
WTException

insert

public void insert(Persistable obj)
            throws WTException
Stores the given Persistable object into the datastore. A transaction is started if one does not already exist. This method provides low level access to the database and bypasses access control operations.

Supported API: false

Parameters:
obj - The object to be inserted into the datastore
Throws:
WTException

query

public QueryResult query(QuerySpec qs)
                  throws WTException
Retrieves persistable objects from the datastore given the specified selection criteria. This method provides low level access to the database and bypasses access control operations.

Supported API: false

Parameters:
qs -
Returns:
QueryResult
Throws:
WTException

query

public QueryResult query(Class targetLinkClass,
                         Persistable obj1,
                         String obj1Role,
                         Persistable obj2)
                  throws WTException
Retrieves any and all link objects that exist between two given Persistable objects.

Supported API: false

Parameters:
targetLinkClass -
obj1 -
obj1Role -
obj2 -
Returns:
QueryResult
Throws:
WTException

query

public QueryResult query(Class targetLinkClass,
                         ObjectIdentifier obj1Oid,
                         String obj1Role,
                         ObjectIdentifier obj2Oid)
                  throws WTException,
                         InvalidRoleException
Retrieves any and all link objects that exist between two Persistable objects given their object identifiers. The method validates the resulting set of link objects retrieved from the database before returning them to the invoking method.

Supported API: false

Parameters:
targetLinkClass -
obj1Oid -
obj1Role -
obj2Oid -
Returns:
QueryResult
Throws:
WTException
InvalidRoleException

remove

public void remove(Persistable obj)
            throws WTException
Removes the given persistable object from the datastore. A transaction is started if one does not already exist. This method provides low level access to the database and bypasses access control operations.

Supported API: false

Parameters:
obj -
Throws:
WTException

restore

public Persistable restore(Persistable obj,
                           boolean fullRestore)
                    throws WTException,
                           ObjectNoLongerExistsException
Retrieves the given Persistable object from the database to restore its state. The object is not refreshed in place. This method provides low level access to the database and bypasses access control operations.

Supported API: false

Parameters:
obj -
fullRestore - Set to true if the object references for the target object should be refreshed as well.
Returns:
Persistable
Throws:
WTException
ObjectNoLongerExistsException

restore

public Persistable restore(Persistable obj)
                    throws WTException,
                           ObjectNoLongerExistsException
Retrieves the given Persistable object from the database to restore its state. Object references for the target object are not refreshed and the object is not refreshed in place. This method provides low level access to the database and bypasses access control operations

Supported API: false

Parameters:
obj -
Returns:
Persistable
Throws:
WTException
ObjectNoLongerExistsException

restore

public Persistable restore(ObjectIdentifier objId)
                    throws WTException,
                           ObjectNoLongerExistsException
Retrieves a Persistable object from the database given its object identifier. Object references for the target object are not refreshed. This method provides low level access to the database and bypasses access control operations.

Supported API: false

Parameters:
objId - The object identifier of the persistable object to be restored
Returns:
Persistable
Throws:
WTException
ObjectNoLongerExistsException

restore

public Persistable restore(ObjectIdentifier objId,
                           boolean checkFreshness)
                    throws WTException,
                           ObjectNoLongerExistsException
Retrieves a Persistable object from the database given its object identifier. Object references for the target object are not refreshed. This method provides low level access to the database and bypasses access control operations.

Supported API: false

Parameters:
objId - The object identifier of the persistable object to be restored
checkFreshness - Set to true if the target object should be checked for freshness to determine whether it is an expired or stale proxy.
Returns:
Persistable
Throws:
WTException
ObjectNoLongerExistsException

update

public void update(Persistable obj)
            throws WTException
Updates the given Persistable object in the datastore. A transaction is started if one does not already exist. This method provides low level access to the database and bypasses access control operations.

Supported API: false

Parameters:
obj -
Throws:
WTException

update

public void update(Persistable obj,
                   boolean changeModifyDate)
            throws WTException
Updates the given Persistable object in the datastore. A transaction is started if one does not already exist. This method provides low level access to the database and bypasses access control operations.

Supported API: false

Parameters:
obj - The object to be modified
changeModifyDate - Set to true if the modifyTimestamp is to be updated.
Throws:
WTException

update

public void update(Persistable obj,
                   String attrName,
                   ObjectMappable objAttr)
            throws WTException


Supported API: false

Parameters:
obj -
attrName -
objAttr -
Throws:
WTException

updateLob

public void updateLob(Persistable obj,
                      LobLocator lob,
                      InputStream stream,
                      long length,
                      boolean changeModifyDate)
               throws WTException
Saves the specified input stream as a Lob of the given Persistable object.

Supported API: false

Parameters:
obj -
lob -
stream -
length -
changeModifyDate -
Throws:
WTException

updateLob

public long updateLob(Persistable obj,
                      LobLocator lob,
                      InputStream stream,
                      boolean changeModifyDate)
               throws WTException
Saves the specified input stream of unknown length as a Lob of the given Persistable object.

Supported API: false

Parameters:
obj -
lob -
stream -
changeModifyDate -
Returns:
long
Throws:
WTException

lock

public void lock(Persistable obj)
          throws WTException
Performs a database lock on the given Persistable's row. Throws ObjectLockedException if the given object is already locked by another datastore connection.

Supported API: false

Parameters:
obj -
Throws:
WTException

lock

public void lock(Persistable obj,
                 boolean wait)
          throws WTException
Performs a database lock on the given Persistable's row. If the wait boolean is true, the statement will wait until the row is unlocked. If the wait boolean is false, the statement will throw ObjectLockedException if the given object is already locked by another datastore connection. If the wait boolean is true, the statement may throw a DeadlockDetectedException.

Supported API: false

Parameters:
obj -
wait -
Throws:
WTException

lock

public void lock(Persistable obj,
                 int retry,
                 int sleepIntervalSeconds)
          throws WTException
Performs a database lock on the given Persistable's row. If the given object is locked by another datastore connection, this thread will sleep for the given sleepIntervalSeconds and will retry the given number of times. If the object is still locked after retrying, an ObjectLockedException will be thrown.

Supported API: false

Parameters:
obj -
retry -
sleepIntervalSeconds -
Throws:
WTException

copyLink

public BinaryLink copyLink(BinaryLink linkToCopy,
                           Persistable roleObject,
                           String roleObjectRole,
                           Persistable otherRoleObject)
                    throws WTException,
                           InvalidRoleException
Copies a link by duplicating it, replacing the role members, and persisting the new link using a server-side insert. A COPY_LINK event is then sent with the eventTarget (or target) set to the original link (the linkToCopy) and the associatedLink set to the newly persisted link.

Supported API: false

Parameters:
linkToCopy - The original link to copy.
roleObject - The object on the "roleObjectRole" side to assign. If left null, the "linkToCopy"'s role object is not replaced.
roleObjectRole - The role the "roleObject" plays in the association.
otherRoleObject - The object on the other side of the "roleObjectRole" side to assign. If left null, the "linkToCopy"'s other side role object is not replaced.
Returns:
BinaryLink
Throws:
WTException
InvalidRoleException

query

public QueryResult query(StatementSpec a_statementSpec)
                  throws WTException
Retrieves persistable objects from the datastore given the specified statement. This method provides low level access to the database and bypasses access control operations.

Supported API: true

Parameters:
a_statementSpec - The statement instance specifying the query to execute.
Returns:
QueryResult
Throws:
WTException

restore

public Persistable restore(Persistable obj,
                           boolean fullRestore,
                           boolean inPlace)
                    throws WTException,
                           ObjectNoLongerExistsException
Retrieves the given Persistable object from the database to restore its state. This method provides low level access to the database and bypasses access control operations.

Supported API: false

Parameters:
obj -
fullRestore - 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.
Returns:
Persistable
Throws:
WTException
ObjectNoLongerExistsException
See Also:
In-place restore

restore

public Persistable restore(Persistable obj,
                           boolean fullRestore,
                           boolean inPlace,
                           boolean checkFreshness)
                    throws WTException,
                           ObjectNoLongerExistsException
Retrieves the given Persistable object from the database to restore its state. Refreshing object references for the target object, refreshing the object in place, and checking the object for freshness are all options controlled by boolean parameters. This method provides low level access to the database and bypasses access control operations.

Supported API: false

Parameters:
obj -
fullRestore - 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.
checkFreshness - Set to true if the target object should be checked for freshness to determine whether it is an expired or stale proxy.
Returns:
Persistable
Throws:
WTException
ObjectNoLongerExistsException
See Also:
In-place restore

insert

public void insert(Persistable obj,
                   Timestamp createDate,
                   Timestamp modifyDate)
            throws WTException
Stores the given Persistable object into the datastore. A transaction is started if one does not already exist. This method provides low level access to the database and bypasses access control operations. The object's initial creation and modification timestamps are explicitly set to the specified values.

Supported API: false

Parameters:
obj - The object to be inserted into the datastore
createDate -
modifyDate -
Throws:
WTException

store

public Persistable store(Persistable obj,
                         Timestamp createDate,
                         Timestamp modifyDate)
                  throws WTException
Stores the given Persistable object in the datastore with the given timestamps. The store method ensures that the operation is valid before storing the Persistable object in the datastore.

Supported API: true

Parameters:
obj -
createDate -
modifyDate -
Returns:
Persistable
Throws:
WTException

query

public void query(StatementSpec a_statementSpec,
                  ResultProcessor a_resultProcessor)
           throws WTException
Retrieves persistable objects from the datastore for the specified statement. The objects are returned via the specified ResultProcessor. This method provides low level access to the database and bypasses access control operations.

Supported API: true

Parameters:
a_statementSpec -
a_resultProcessor -
Throws:
WTException

query

public QueryResult query(StatementSpec a_statementSpec,
                         AccessControllerProcessor a_accessControllerProcessor)
                  throws WTException


Supported API: false

Parameters:
a_statementSpec -
a_accessControllerProcessor -
Returns:
QueryResult
Throws:
WTException

lock

public void lock(Object a_class)
          throws WTException
Performs a database lock on the given class table. The statement may throw a DeadlockDetectedException.

Supported API: false

Parameters:
a_class - The String representation of class name or Class
Throws:
WTException

restore

public Persistable restore(Persistable obj,
                           boolean fullRestore,
                           boolean inPlace,
                           boolean checkFreshness,
                           boolean lock)
                    throws WTException,
                           ObjectNoLongerExistsException
Retrieves the given Persistable object from the database to restore its state. Refreshing object references for the target object, refreshing the object in place, checking the object for freshness, and locking the object are all options controlled by boolean parameters. This method provides low level access to the database and bypasses access control operations.

Supported API: false

Parameters:
obj -
fullRestore - 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.
checkFreshness - Set to true if the target object should be checked for freshness to determine whether it is an expired or stale proxy.
lock - Specifies whether the object should be locked as part of the restore.
Returns:
Persistable
Throws:
WTException
ObjectNoLongerExistsException
See Also:
In-place restore

execute

public int execute(AbstractBatchSpec a_batchSpec)
            throws WTException
This method executes a batch update or delete operation on the specified Batch Specification.

Supported API: true

Parameters:
a_batchSpec - Batch Specification to execute.
Returns:
int
Throws:
WTException

insert

public void insert(WTCollection a_objects)
            throws WTException
Stores the given Persistable object into the datastore. A transaction is started if one does not already exist. This method provides low level access to the database and bypasses access control operations.

Supported API: false

Parameters:
a_objects - The objects to be inserted into the datastore. The collection should contain full Persistable objects.
Throws:
WTException

update

public void update(WTCollection a_objects)
            throws WTException
Updates the specified objects in the datastore. The collection is assumed to contain full Persistable objects. A transaction is started if one does not already exist. This method provides low level access to the database and bypasses access control operations.

Supported API: false

Parameters:
a_objects - Objects to update in the datastore.
Throws:
WTException

remove

public void remove(WTSet a_objects)
            throws WTException
Removes the specified objects from the datastore. A transaction is started if one does not already exist. This method provides low level access to the database and bypasses access control operations.

Supported API: false

Parameters:
a_objects - Objects to remove from the datastore.
Throws:
WTException

copyLink

public WTValuedHashMap copyLink(WTValuedHashMap linksToCopy)
                         throws WTException
Copies links in the specified Map for each key (original copy) by persisting the associated value (new link) using a server-side insert. A mulit-object COPY_LINK event is then dispatched with the Map as the eventTarget. The PersistenceServerHelper contains methods for assistance in building the copy-link Map.

Supported API: false

Parameters:
linksToCopy - Map of original link objects (keys) and associated new link objects (values).
Returns:
WTValuedHashMap
Throws:
WTException
See Also:
PersistenceServerHelper.newCopyLink(BinaryLink,Persistable,String,Persistable), PersistenceServerHelper.buildCopyLinkMap(WTList,WTList,List,WTList)

update

public void update(WTCollection a_objects,
                   boolean changeModifyDate)
            throws WTException
Updates the specified objects in the datastore. The collection is assumed to contain full Persistable objects. A transaction is started if one does not already exist. This method provides low level access to the database and bypasses access control operations.

Supported API: false

Parameters:
a_objects - Objects to update in the datastore.
changeModifyDate - Set to true if the modifyTimestamp is to be updated.
Throws:
WTException

restore

public Persistable restore(ObjectIdentifier objId,
                           boolean checkFreshness,
                           boolean lock)
                    throws WTException,
                           ObjectNoLongerExistsException
Retrieves a Persistable object from the database given its object identifier. Object references for the target object are not refreshed. This method provides low level access to the database and bypasses access control operations.

Supported API: false

Parameters:
objId - The object identifier of the persistable object to be restored
checkFreshness - Set to true if the target object should be checked for freshness to determine whether it is an expired or stale proxy.
lock -
Returns:
Persistable
Throws:
WTException
ObjectNoLongerExistsException

query

public void query(StatementSpec a_statementSpec,
                  AccessControllerProcessor a_accessControllerProcessor,
                  ResultProcessor a_resultProcessor)
           throws WTException
This method queries the persistent datastore.

Supported API: false

Parameters:
a_statementSpec - Statement to use for the query.
a_accessControllerProcessor - Access Control to apply to the results.
a_resultProcessor - Processes the results of the query.
Throws:
WTException