com.sun.mdm.index.ops
Class TransactionObjectDB

java.lang.Object
  extended bycom.sun.mdm.index.ops.ObjectPersistenceService
      extended bycom.sun.mdm.index.ops.TransactionObjectDB
All Implemented Interfaces:
java.io.Serializable

public final class TransactionObjectDB
extends ObjectPersistenceService

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.sun.mdm.index.ops.ObjectPersistenceService
DATEFORMAT, DBDATEFORMAT
 
Constructor Summary
TransactionObjectDB()
          default constructor
 
Method Summary
 void create(java.sql.Connection con, TransactionObject tObj)
          Persists a TransactionObject into the database.
 TransactionObject[] findTransactionObject(java.sql.Connection conn, java.lang.String euid, java.util.Date beginTS)
          Retrieves an array of TransactionObjects by EUID.
 TransactionObject[] findTransactionObject(java.sql.Connection conn, java.lang.String euid, java.util.Date beginTS, java.util.Date endTS)
          Retrieves an array of TransactionObjects by EUID.
 TransactionObject[] findTransactionObject(java.sql.Connection conn, java.lang.String systemcode, java.lang.String lid, java.util.Date beginTS, java.util.Date endTS)
          Retrieves an array of TransactionObjects by SystemCode and LocalID.
 TransactionObject[] findTransactionObject(java.sql.Connection conn, TransactionObject tObj, java.util.Date beginTS, java.util.Date endTS)
          Retrieves an array of TransactionObjects by TransactionObject.
 TransactionObject[] findTransactionObject(java.sql.Connection conn, TransactionObject tObj, java.util.Date beginTS, java.util.Date endTS, java.lang.String orderBy)
          Retrieves array of TransactionObjects by TransactionObject.
 TransactionObject[] findTransactionObjectForRecovery(java.sql.Connection conn, java.lang.String euid, java.util.Date beginTS)
          Retrieves array of TransactionObjects by by EUID and after a specified timestamp for recovery.
 TransactionObject get(java.sql.Connection conn, java.lang.String transactionnumber)
          Retrieves TransactionObject by TransactionNumber.
 TransactionObject getNext(java.sql.Connection conn, java.lang.String transactionnumber, java.lang.String EUID)
          Retrieves the next TransactionObject for an EUID.
 
Methods inherited from class com.sun.mdm.index.ops.ObjectPersistenceService
addobject, addobject, addobject, addobject, addobject, addobject, finalize, getStatement, getValue, init, log, setParam, setParamBlob, setParamBlob, sql2str, strfmt
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionObjectDB

public TransactionObjectDB()
                    throws OPSException
default constructor

Throws:
OPSException - if an error is encountered.
Method Detail

create

public void create(java.sql.Connection con,
                   TransactionObject tObj)
            throws OPSException
Persists a TransactionObject into the database.

Parameters:
tObj - TransactionObject
Throws:
OPSException - if an error is encountered.

findTransactionObject

public TransactionObject[] findTransactionObject(java.sql.Connection conn,
                                                 java.lang.String euid,
                                                 java.util.Date beginTS)
                                          throws OPSException
Retrieves an array of TransactionObjects by EUID. If the starting time is specified, it is added to the search criteria.

Parameters:
conn - JDBC connection.
euid - EUID.
beginTS - Starting timestamp.
Returns:
an array of TransactionObject instances.
Throws:
OPSException - if an error is encountered.

findTransactionObject

public TransactionObject[] findTransactionObject(java.sql.Connection conn,
                                                 java.lang.String euid,
                                                 java.util.Date beginTS,
                                                 java.util.Date endTS)
                                          throws OPSException
Retrieves an array of TransactionObjects by EUID. If starting or ending times are specified, they are added to the search criteria.

Parameters:
conn - JDBC connection.
euid - EUID.
beginTS - Starting timestamp.
endTS - Ending timestamp.
Returns:
an array of TransactionObject instances.
Throws:
OPSException - if an error is encountered.

findTransactionObject

public TransactionObject[] findTransactionObject(java.sql.Connection conn,
                                                 java.lang.String systemcode,
                                                 java.lang.String lid,
                                                 java.util.Date beginTS,
                                                 java.util.Date endTS)
                                          throws OPSException
Retrieves an array of TransactionObjects by SystemCode and LocalID. If starting or ending times are specified, they are added to the search criteria.

Parameters:
conn - JDBC connection.
systemcode - System code.
lid - Local ID.
beginTS - Starting timestamp.
endTS - Ending timestamp.
Returns:
an array of TransactionObject instances.
Throws:
OPSException - if an error is encountered.

findTransactionObject

public TransactionObject[] findTransactionObject(java.sql.Connection conn,
                                                 TransactionObject tObj,
                                                 java.util.Date beginTS,
                                                 java.util.Date endTS)
                                          throws OPSException
Retrieves an array of TransactionObjects by TransactionObject. A dynamic Statement is going to be created according to what's populated in the TransactionObject. The only operator supported is '='. If starting or ending times are specified, they are added to the search criteria.

Parameters:
conn - JDBC connection.
tObj - TransactionObject.
beginTS - Starting timestamp.
endTS - Ending timestamp.
Returns:
an array of TransactionObject instances.
Throws:
OPSException - if an error is encountered.

findTransactionObject

public TransactionObject[] findTransactionObject(java.sql.Connection conn,
                                                 TransactionObject tObj,
                                                 java.util.Date beginTS,
                                                 java.util.Date endTS,
                                                 java.lang.String orderBy)
                                          throws OPSException
Retrieves array of TransactionObjects by TransactionObject. A dynamic Statement is going to be created according to what's populated in the TransactionObject. The only operator supported is '='. If starting or ending times are specified, they are added to the search criteria.

Parameters:
conn - JDBC connection.
tObj - TransactionObject
beginTS - Starting timestamp.
endTS - Ending timestamp.
orderBy - Sort order.
Returns:
an array of TransactionObject instances.
Throws:
OPSException - if an error is encountered.

findTransactionObjectForRecovery

public TransactionObject[] findTransactionObjectForRecovery(java.sql.Connection conn,
                                                            java.lang.String euid,
                                                            java.util.Date beginTS)
                                                     throws OPSException
Retrieves array of TransactionObjects by by EUID and after a specified timestamp for recovery.

Parameters:
conn - JDBC connection.
beginTS - Starting timestamp.
Returns:
an array of TransactionObject instances.
Throws:
OPSException - if an error is encountered.

get

public TransactionObject get(java.sql.Connection conn,
                             java.lang.String transactionnumber)
                      throws OPSException
Retrieves TransactionObject by TransactionNumber.

Parameters:
conn - JDBC connection.
transactionnumber - TransactionNumber.
Returns:
TransactionObject.
Throws:
OPSException - if an error is encountered.

getNext

public TransactionObject getNext(java.sql.Connection conn,
                                 java.lang.String transactionnumber,
                                 java.lang.String EUID)
                          throws OPSException
Retrieves the next TransactionObject for an EUID.

Parameters:
conn - JDBC connection.
transactionnumber - TransactionNumber.
Returns:
TransactionObject.
Throws:
OPSException - if an error is encountered.


Sun Microsystems, Inc.