wt.pds
Interface PDSIfc

All Known Implementing Classes:
SQLDatabasePds

public interface PDSIfc

This class specifies the persistent data services APIs.

Supported API: false

Extendable: false


Method Summary
 void closeConnection(WTConnection a_connection)
          This method is used to clean up the specfied WTConnection prior to freeing the underlying JDBC connection.
 boolean containSequenceColumn(ClassInfo a_classInfo)
          

Supported API: false
 int execute(WTConnection a_connection, AbstractBatchSpec a_batchSpec)
          Executes the multi-row statement specification in the datastore.
 Object executeCall(WTConnection a_connection, String a_procedureName, StatementParameter[] a_argumentValues, StatementParameter a_outputType)
          This method executes a call to a database stored procedure.
 QueryResult expand(WTConnection a_connection, Persistable a_obj, String a_otherSideRole, Class a_linkClass, boolean a_onlyOtherSide, AccessControllerProcessor a_accessControllerProcessor)
          Expand the association from the object using the specified role and link class.
 QueryResult expand(WTConnection a_connection, Persistable a_obj, String a_otherSideRole, QuerySpec a_querySpec, boolean a_onlyOtherSide, AccessControllerProcessor a_accessControllerProcessor)
          Expand the association from the object using the specified role and QuerySpec.
 DataSource getDataSource()
          

Supported API: false
 int getDefaultTransactionIsolation()
          Returns the default Transaction Isolation.
 DMLGenerator getDMLGenerator()
          

Supported API: false
 InputStream getLob(WTConnection a_connection, LobLocator a_lobLocator)
          Gets the data from the specified LOB as an InputStream.
 byte[] getLobAsByteArray(WTConnection a_connection, Object a_blob)
          Gets the Lob as a byte array.
 Object getLobAsObject(WTConnection a_connection, Object a_blob)
          Gets the Lob as an object.
 String getNextSequence(WTConnection a_connection, String a_sequenceName)
          Return the next value from the datastore sequence.
 PersistenceException handleException(Exception a_exception)
          Handles an exception specific to the PDS instance.
 void initializeConnection(WTConnection a_connection)
          This method is used to initialize the specfied WTConnection prior to making it available to use.
 void insert(WTConnection a_connection, Object a_obj, boolean a_reInsert)
          Insert an object into the datastore

Supported API: false
 int insertPageResults(WTConnection a_connection, int a_offset, int a_toIndex, long a_sessionId, List a_oidList, int a_groupFromIndex)
          Inserts results into the paging table of the datastore.
 boolean isLob(ColumnDescriptor a_columnDescriptor)
          Indicates if this is a LOB column.
 boolean isLobLocator(ColumnDescriptor a_columnDescriptor)
          Indicates if this is a LobLocator column.
 void lock(WTConnection a_connection, Object a_class, boolean a_wait)
          Perform a datastore lock on an Class table.
 Persistable lock(WTConnection a_connection, Persistable a_obj, boolean a_wait)
          Perform a datastore lock on an Object.
 void query(WTConnection a_connection, StatementSpec a_statementSpec, AccessControllerProcessor a_accessControllerProcessor, ResultProcessor a_resultProcessor)
          Query for objects in the datastore.
 Persistable refresh(WTConnection a_connection, Persistable a_obj, boolean a_inPlace, AccessControllerProcessor a_accessControllerProcessor)
          Refresh the object from the datastore.
 Persistable refresh(WTConnection a_connection, Persistable a_obj, boolean a_inPlace, AccessControllerProcessor a_accessControllerProcessor, boolean a_lock)
          Refresh the object from the datastore.
 void remove(WTConnection a_connection, Persistable a_obj)
          Remove an object from the datastore.
 long setLob(WTConnection a_connection, LobLocator a_lobLocator, InputStream a_inputStream, boolean a_updateChangeStamp)
          Set the data in the InputStream to the specified LOB.
 void setLob(WTConnection a_connection, LobLocator a_lobLocator, InputStream a_inputStream, long a_length, boolean a_updateChangeStamp)
          Set the data in the InputStream to the specified LOB.
 void setObjectAsLob(WTConnection a_connection, LobLocator a_lobLocator, Object a_object)
          Set the object as LOB.
 void update(WTConnection a_connection, Object a_obj, boolean a_changeModifyDate)
          Update an object in the datastore.
 Persistable update(WTConnection a_connection, Persistable a_obj, String a_attributeName, ObjectMappable a_attribute)
          Update an attribute of an object in the datastore (partial update).
 

Method Detail

insert

public void insert(WTConnection a_connection,
                   Object a_obj,
                   boolean a_reInsert)
            throws PersistenceException
Insert an object into the datastore

Supported API: false

Parameters:
a_connection -
a_obj - The object(s) to insert. The value can be either a Persisteable or Persistable[].
a_reInsert -
Throws:
PersistenceException

remove

public void remove(WTConnection a_connection,
                   Persistable a_obj)
            throws PersistenceException
Remove an object from the datastore.

Supported API: false

Parameters:
a_connection -
a_obj -
Throws:
PersistenceException

update

public void update(WTConnection a_connection,
                   Object a_obj,
                   boolean a_changeModifyDate)
            throws PersistenceException
Update an object in the datastore.

Supported API: false

Parameters:
a_connection -
a_obj - The object(s) to update. The value can be either a Persisteable or Persistable[].
a_changeModifyDate -
Throws:
PersistenceException

update

public Persistable update(WTConnection a_connection,
                          Persistable a_obj,
                          String a_attributeName,
                          ObjectMappable a_attribute)
                   throws PersistenceException
Update an attribute of an object in the datastore (partial update).

Supported API: false

Parameters:
a_connection -
a_obj -
a_attributeName -
a_attribute -
Returns:
Persistable
Throws:
PersistenceException

expand

public QueryResult expand(WTConnection a_connection,
                          Persistable a_obj,
                          String a_otherSideRole,
                          Class a_linkClass,
                          boolean a_onlyOtherSide,
                          AccessControllerProcessor a_accessControllerProcessor)
                   throws PersistenceException
Expand the association from the object using the specified role and link class.

Supported API: false

Parameters:
a_connection -
a_obj -
a_otherSideRole -
a_linkClass -
a_onlyOtherSide -
a_accessControllerProcessor -
Returns:
QueryResult
Throws:
PersistenceException

expand

public QueryResult expand(WTConnection a_connection,
                          Persistable a_obj,
                          String a_otherSideRole,
                          QuerySpec a_querySpec,
                          boolean a_onlyOtherSide,
                          AccessControllerProcessor a_accessControllerProcessor)
                   throws PersistenceException
Expand the association from the object using the specified role and QuerySpec.

Supported API: false

Parameters:
a_connection -
a_obj -
a_otherSideRole -
a_querySpec -
a_onlyOtherSide -
a_accessControllerProcessor -
Returns:
QueryResult
Throws:
PersistenceException

query

public void query(WTConnection a_connection,
                  StatementSpec a_statementSpec,
                  AccessControllerProcessor a_accessControllerProcessor,
                  ResultProcessor a_resultProcessor)
           throws PersistenceException
Query for objects in the datastore.

Supported API: false

Parameters:
a_connection -
a_statementSpec -
a_accessControllerProcessor -
a_resultProcessor - ResultProcessor to return objects in.
Throws:
PersistenceException

refresh

public Persistable refresh(WTConnection a_connection,
                           Persistable a_obj,
                           boolean a_inPlace,
                           AccessControllerProcessor a_accessControllerProcessor)
                    throws PersistenceException
Refresh the object from the datastore.

Supported API: false

Parameters:
a_connection -
a_obj -
a_inPlace -
a_accessControllerProcessor -
Returns:
Persistable
Throws:
PersistenceException

lock

public Persistable lock(WTConnection a_connection,
                        Persistable a_obj,
                        boolean a_wait)
                 throws PersistenceException
Perform a datastore lock on an Object.

Supported API: false

Parameters:
a_connection -
a_obj -
a_wait -
Returns:
Persistable
Throws:
PersistenceException

getNextSequence

public String getNextSequence(WTConnection a_connection,
                              String a_sequenceName)
                       throws PersistenceException
Return the next value from the datastore sequence.

Supported API: false

Parameters:
a_connection -
a_sequenceName -
Returns:
String
Throws:
PersistenceException

setLob

public void setLob(WTConnection a_connection,
                   LobLocator a_lobLocator,
                   InputStream a_inputStream,
                   long a_length,
                   boolean a_updateChangeStamp)
            throws PersistenceException
Set the data in the InputStream to the specified LOB.

Supported API: false

Parameters:
a_connection -
a_lobLocator -
a_inputStream -
a_length -
a_updateChangeStamp -
Throws:
PersistenceException

setLob

public long setLob(WTConnection a_connection,
                   LobLocator a_lobLocator,
                   InputStream a_inputStream,
                   boolean a_updateChangeStamp)
            throws PersistenceException
Set the data in the InputStream to the specified LOB.

Supported API: false

Parameters:
a_connection -
a_lobLocator -
a_inputStream -
a_updateChangeStamp -
Returns:
long
Throws:
PersistenceException

setObjectAsLob

public void setObjectAsLob(WTConnection a_connection,
                           LobLocator a_lobLocator,
                           Object a_object)
                    throws PersistenceException
Set the object as LOB.

Supported API: false

Parameters:
a_connection -
a_lobLocator -
a_object -
Throws:
PersistenceException

getLob

public InputStream getLob(WTConnection a_connection,
                          LobLocator a_lobLocator)
                   throws PersistenceException
Gets the data from the specified LOB as an InputStream.

Supported API: false

Parameters:
a_connection -
a_lobLocator -
Returns:
InputStream
Throws:
PersistenceException

handleException

public PersistenceException handleException(Exception a_exception)
Handles an exception specific to the PDS instance.

Supported API: false

Parameters:
a_exception -
Returns:
PersistenceException

getDefaultTransactionIsolation

public int getDefaultTransactionIsolation()
Returns the default Transaction Isolation.

Supported API: false

Returns:
int

getLobAsByteArray

public byte[] getLobAsByteArray(WTConnection a_connection,
                                Object a_blob)
                         throws PersistenceException
Gets the Lob as a byte array.

Supported API: false

Parameters:
a_connection -
a_blob -
Returns:
byte[]
Throws:
PersistenceException

getLobAsObject

public Object getLobAsObject(WTConnection a_connection,
                             Object a_blob)
                      throws PersistenceException
Gets the Lob as an object.

Supported API: false

Parameters:
a_connection -
a_blob -
Returns:
Object
Throws:
PersistenceException

getDataSource

public DataSource getDataSource()


Supported API: false

Returns:
DataSource

getDMLGenerator

public DMLGenerator getDMLGenerator()


Supported API: false

Returns:
DMLGenerator

insertPageResults

public int insertPageResults(WTConnection a_connection,
                             int a_offset,
                             int a_toIndex,
                             long a_sessionId,
                             List a_oidList,
                             int a_groupFromIndex)
                      throws PersistenceException
Inserts results into the paging table of the datastore. If a valid group FROM index is specified, then all OIDs specified by the index that are identical will be grouped together (i.e. the group ID value will be the same)

Supported API: false

Parameters:
a_connection - Connection to use to perform the operation
a_offset -
a_toIndex -
a_sessionId - Identification value to use to associate the results with a paging session
a_oidList - List of OID values. The elements are assumed to be an Object[]. For every OID, two array entries are assumed. The first is the object ID and the second is the classname.
a_groupFromIndex - Specifies an index into the OID list for grouping. The index is not absolute since each OID uses two array entries. For example, index 3 would specify the OIDarray entries 5 and 6.
Throws:
PersistenceException

executeCall

public Object executeCall(WTConnection a_connection,
                          String a_procedureName,
                          StatementParameter[] a_argumentValues,
                          StatementParameter a_outputType)
                   throws PersistenceException
This method executes a call to a database stored procedure. Input argument are passed as specified. The output value from the stored procedure is returned, if applicable.

Supported API: false

Parameters:
a_connection - Connection to use to perform the operation
a_procedureName - Specifies the database stored procedure to execute.
a_argumentValues - Array of input argument values
a_outputType - StatementParmeter object used to specify the return value. If null, then the stored procedure is assumed to be a procedure and a null value is returned.
Returns:
Object
Throws:
PersistenceException
See Also:
StatementParameter

initializeConnection

public void initializeConnection(WTConnection a_connection)
                          throws WTException
This method is used to initialize the specfied WTConnection prior to making it available to use.

Supported API: false

Parameters:
a_connection - Connection to initialize.
Throws:
WTException

isLob

public boolean isLob(ColumnDescriptor a_columnDescriptor)
Indicates if this is a LOB column.

Supported API: false

Parameters:
a_columnDescriptor -
Returns:
boolean

isLobLocator

public boolean isLobLocator(ColumnDescriptor a_columnDescriptor)
Indicates if this is a LobLocator column.

Supported API: false

Parameters:
a_columnDescriptor -
Returns:
boolean

lock

public void lock(WTConnection a_connection,
                 Object a_class,
                 boolean a_wait)
          throws PersistenceException
Perform a datastore lock on an Class table.

Supported API: false

Parameters:
a_connection -
a_class -
a_wait -
Throws:
PersistenceException

containSequenceColumn

public boolean containSequenceColumn(ClassInfo a_classInfo)
                              throws PersistenceException


Supported API: false

Parameters:
a_classInfo -
Returns:
boolean
Throws:
PersistenceException

refresh

public Persistable refresh(WTConnection a_connection,
                           Persistable a_obj,
                           boolean a_inPlace,
                           AccessControllerProcessor a_accessControllerProcessor,
                           boolean a_lock)
                    throws PersistenceException
Refresh the object from the datastore.

Supported API: false

Parameters:
a_connection -
a_obj -
a_inPlace -
a_accessControllerProcessor -
a_lock -
Returns:
Persistable
Throws:
PersistenceException

execute

public int execute(WTConnection a_connection,
                   AbstractBatchSpec a_batchSpec)
            throws WTException
Executes the multi-row statement specification in the datastore.

Supported API: false

Parameters:
a_connection - The connection to use for the operation.
a_batchSpec - Specifies the statements to execute.
Throws:
WTException

closeConnection

public void closeConnection(WTConnection a_connection)
                     throws WTException
This method is used to clean up the specfied WTConnection prior to freeing the underlying JDBC connection.

Supported API: false

Parameters:
a_connection - Connection to initialize.
Throws:
WTException