Package wt.fc

Class StandardPersistenceManager

java.lang.Object
wt.services.StandardManager
wt.fc.StandardPersistenceManager
All Implemented Interfaces:
Serializable, wt.fc._NetFactor, NetFactor, PersistenceManager, PersistenceManagerSvr, wt.services.Manager

public class StandardPersistenceManager extends StandardManager implements PersistenceManager, PersistenceManagerSvr, Serializable
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

See Also:
  • Method Details

    • getLob

      public InputStream getLob(LobLocator lob) throws WTException


      Supported API: true
      Specified by:
      getLob in interface PersistenceManager
      Parameters:
      lob - the Lob locator.
      Returns:
      InputStream
      Throws:
      WTException
    • refresh



      Supported API: true
      Specified by:
      refresh in interface PersistenceManager
      Returns:
      Persistable
      Throws:
      WTException
      ObjectNoLongerExistsException
    • 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. The Persistable object must already be locked in a current Transaction.

      Supported API: true
      Specified by:
      updateLob in interface PersistenceManagerSvr
      Parameters:
      obj - Persistable object containing the Lob attribute
      lob - LobLocator that identifies the Lob attribute
      stream - InputStream containing the data to update
      length - Number of bytes to update from the stream
      changeModifyDate - indicates if the modify Timestamp on the Persistable object should be updated.
      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. The Persistable object must already be locked in a current Transaction.

      Supported API: true
      Specified by:
      updateLob in interface PersistenceManagerSvr
      Parameters:
      obj - Persistable object containing the Lob attribute
      lob - LobLocator that identifies the Lob attribute
      stream - InputStream containing the data to update
      changeModifyDate - indicates if the modify Timestamp on the Persistable object should be updated.
      Returns:
      long Number of bytes updated
      Throws:
      WTException
    • execute

      public int execute(BatchSpec a_batchSpec) throws WTException
      This method executes a batch update or delete operation on the specified Batch Specification. This method directly modifies the persistent state of objects in the datastore. Dispatch of associated create, update, and delete events is not guaranteed. There is no explcit change to any in-memory Persistable objects corresponding to the affected database state.

      Supported API: true
      Specified by:
      execute in interface PersistenceManagerSvr
      Parameters:
      a_batchSpec - Batch Specification to execute.
      Returns:
      int the number of affected objects
      Throws:
      WTException