wt.pom
Interface POMIfc

All Known Implementing Classes:
PersistentObjectManager

public interface POMIfc

The persistent object manager interface for managing persistent objects.

Supported API: false

Extendable: false


Method Summary
 void addTransactionListener(TransactionListener listener)
          Add a listener to the current transaction
 void commitTransaction(int transactionHandle)
          Commit a transaction flushing changes to the datastore.
 InputStream getLob(LobLocator aLobLocator)
          Retrieve a LOB from the datastore as an input stream
 String getNextSequence(String sequenceName)
          Get the next Sequence number - sequence must already exist
 void insert(Persistable persistentObj)
          Insert a persistent object in a datastore.
 void insert(Persistable persistentObj, Timestamp createDate, Timestamp modifyDate)
          Insert a persistent object in a datastore.
 void lock(Persistable persistentObj)
          Lock a persistent object in the datastore.
 void lock(Persistable persistentObj, boolean wait)
          Lock a persistent object in the datastore.
 QueryResult query(StatementSpec aStatementSpec, AccessControllerProcessor anAccessControllerProcessor)
          Execute a query
 void remove(Persistable persistentObj)
          Remove a persistent object from the datastore.
 void removeTransactionListener(TransactionListener listener)
          Remove a listener from the current transaction
 void rollbackTransaction()
          Rollback the current transaction
 void rollbackTransaction(int transactionHandle)
          Rollback a transaction
 void update(Persistable persistentObj, boolean changeModifyDate)
          Update a persistent object in the datastore.
 void update(Persistable aPersistentObj, String attrName, ObjectMappable objAttr)
          Update a persistent object in the datastore.
 long updateLob(Persistable anObj, LobLocator aLobLocator, InputStream aStream, boolean updateChangeStamp)
          Store a LOB in the datastore from an input stream of unknown length
 void updateLob(Persistable anObj, LobLocator aLobLocator, InputStream aStream, long length, boolean updateChangeStamp)
          Store a LOB in the datastore from an input stream
 

Method Detail

commitTransaction

public void commitTransaction(int transactionHandle)
                       throws PersistenceException
Commit a transaction flushing changes to the datastore.

Parameters:
transactionHandle - The transaction identifier provided by the startTransaction method.
Throws:
PersistenceException - Occurs if the persistent object manager cannot end the transaction.

rollbackTransaction

public void rollbackTransaction(int transactionHandle)
                         throws PersistenceException
Rollback a transaction

Parameters:
transactionHandle - The transaction identifier provided by the startTransaction method.
Throws:
PersistenceException - Occurs if the persistent object manager cannot drop the transaction.

rollbackTransaction

public void rollbackTransaction()
                         throws PersistenceException
Rollback the current transaction

Throws:
PersistenceException - Occurs if the persistent object manager cannot drop the transaction.

addTransactionListener

public void addTransactionListener(TransactionListener listener)
                            throws PersistenceException
Add a listener to the current transaction

Throws:
PersistenceException - Occurs if the persistent object manager cannot find an active transaction.

removeTransactionListener

public void removeTransactionListener(TransactionListener listener)
                               throws PersistenceException
Remove a listener from the current transaction

Throws:
PersistenceException - Occurs if the persistent object manager cannot find an active transaction.

insert

public void insert(Persistable persistentObj)
            throws PersistenceException
Insert a persistent object in a datastore.

Parameters:
persistentObj - The object to be made persistent.
Throws:
PersistenceException - Occurs if the persistent object manager cannot insert the persistent object.

insert

public void insert(Persistable persistentObj,
                   Timestamp createDate,
                   Timestamp modifyDate)
            throws PersistenceException
Insert a persistent object in a datastore.

Parameters:
persistentObj - The object to be made persistent.
createDate - explicit create Timestamp to set (if null, current time is used)
modifyDate - explicit modify Timestamp to set (if null, current time is used)
Throws:
PersistenceException - Occurs if the persistent object manager cannot insert the persistent object.

update

public void update(Persistable persistentObj,
                   boolean changeModifyDate)
            throws PersistenceException
Update a persistent object in the datastore.

Parameters:
persistentObj - The persistent object to be modified.
Throws:
PersistenceException - Occurs if the persistent object manager cannot update the persistent object.

update

public void update(Persistable aPersistentObj,
                   String attrName,
                   ObjectMappable objAttr)
            throws PersistenceException
Update a persistent object in the datastore.

Parameters:
attrName - The name of the attribute to be modified.
objAttr - The attribute to be modified.
Throws:
PersistenceException - Occurs if the persistent object manager cannot update the persistent object.

remove

public void remove(Persistable persistentObj)
            throws PersistenceException
Remove a persistent object from the datastore.

Parameters:
persistentObj - The persistent object to be removed.
Throws:
PersistenceException - Occurs if the persistent object manager cannot remove the persistent object.

lock

public void lock(Persistable persistentObj)
          throws PersistenceException
Lock a persistent object in the datastore.

Parameters:
persistentObj - The persistent objects to be locked.
Throws:
PersistenceException - Occurs if the persistent object manager cannot lock the persistent object.

lock

public void lock(Persistable persistentObj,
                 boolean wait)
          throws PersistenceException
Lock a persistent object in the datastore.

Parameters:
persistentObj - The persistent objects to be locked.
wait - boolean whether to wait for lock or not
Throws:
PersistenceException - Occurs if the persistent object manager cannot lock the persistent object.

query

public QueryResult query(StatementSpec aStatementSpec,
                         AccessControllerProcessor anAccessControllerProcessor)
                  throws PersistenceException
Execute a query

Parameters:
aStatementSpec - - selection criteria
Throws:
PersistenceException - Occurs if the persistent object manager cannot execute the query.

getLob

public InputStream getLob(LobLocator aLobLocator)
                   throws PersistenceException
Retrieve a LOB from the datastore as an input stream

Parameters:
aLobLocator - the locator for the LOB
Throws:
PersistenceException - Occurs if the persistent object manager cannot retrieve the large object

updateLob

public void updateLob(Persistable anObj,
                      LobLocator aLobLocator,
                      InputStream aStream,
                      long length,
                      boolean updateChangeStamp)
               throws PersistenceException
Store a LOB in the datastore from an input stream

Parameters:
anObj - the object holding the LOB
aLobLocator - the locator for the LOB
aStream - the stream to store
Throws:
PersistenceException - Occurs if the persistent object manager cannot store the large object

updateLob

public long updateLob(Persistable anObj,
                      LobLocator aLobLocator,
                      InputStream aStream,
                      boolean updateChangeStamp)
               throws PersistenceException
Store a LOB in the datastore from an input stream of unknown length

Parameters:
anObj - the object holding the LOB
aLobLocator - the locator for the LOB
aStream - the stream to store
Returns:
the length of the LOB
Throws:
PersistenceException - Occurs if the persistent object manager cannot store the large object

getNextSequence

public String getNextSequence(String sequenceName)
                       throws PersistenceException
Get the next Sequence number - sequence must already exist

Returns:
aSequenceNumber - aSequenceName.nextval
Throws:
PersistenceException