|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface CaptureOperationsBackend
The CaptureOperationsBackend provides the persistence functionality required by the CaptureOperationsModule. It offers methods to store EPCIS events, vocabularies, or EPCs to the database; and provides a method to retrieve already existing vocabularies from the database. A CaptureOperationsSession object which holds the database connection is required to be passed into each of the methods.
| Method Summary | |
|---|---|
void |
dbReset(Connection dbconnection,
String dbResetScript)
Runs the dbreset SQL script. |
Long |
getVocabularyElement(CaptureOperationsSession session,
String vocabularyType,
String vocabularyElement)
Retrieves the ID (primary key) of the vocabulary with the given type that matches the given URI string. |
Long |
insertAggregationEvent(CaptureOperationsSession session,
Timestamp eventTime,
Timestamp recordTime,
String eventTimeZoneOffset,
Long bizStepId,
Long dispositionId,
Long readPointId,
Long bizLocationId,
String action,
String parentId)
Inserts a new EPCIS aggregation event into the database. |
Long |
insertBusinessTransaction(CaptureOperationsSession session,
String bizTrans,
String bizTransType)
Inserts the BusinessTransactionType and the BusinessTransactionID into the BusinessTransaction-Table if necessary. |
void |
insertBusinessTransactionsForEvent(CaptureOperationsSession session,
long eventId,
String eventType,
List<BusinessTransactionType> btts)
|
void |
insertEpcsForEvent(CaptureOperationsSession session,
long eventId,
String eventType,
List<String> epcs)
Inserts the given EPCs into the database and associates them with the EPCIS event with the given type and ID (primary key). |
void |
insertExtensionFieldsForEvent(CaptureOperationsSession session,
long eventId,
String eventType,
List<EventFieldExtension> exts)
|
Long |
insertObjectEvent(CaptureOperationsSession session,
Timestamp eventTime,
Timestamp recordTime,
String eventTimeZoneOffset,
Long bizStepId,
Long dispositionId,
Long readPointId,
Long bizLocationId,
String action)
Inserts a new EPCIS object event into the database. |
Long |
insertQuantityEvent(CaptureOperationsSession session,
Timestamp eventTime,
Timestamp recordTime,
String eventTimeZoneOffset,
Long bizStepId,
Long dispositionId,
Long readPointId,
Long bizLocationId,
Long epcClassId,
Long quantity)
Inserts a new EPCIS quantity event into the database. |
Long |
insertTransactionEvent(CaptureOperationsSession session,
Timestamp eventTime,
Timestamp recordTime,
String eventTimeZoneOffset,
Long bizStepId,
Long dispositionId,
Long readPointId,
Long bizLocationId,
String action,
String parentId)
Inserts a new EPCIS transaction event into the database. |
Long |
insertVocabularyElement(CaptureOperationsSession session,
String vocabularyType,
String vocabularyElement)
Inserts the vocabulary of the given type and the given vocabulary element URI into the database. |
CaptureOperationsSession |
openSession(DataSource dataSource)
Opens a new session for the database transaction. |
| Method Detail |
|---|
void dbReset(Connection dbconnection,
String dbResetScript)
throws SQLException,
IOException
dbconnection - The JDBC Connection object.dbResetScript - The filename of the SQL script to execute.
SQLException - If an error with the database occurred.
IOException - If an exception reading from the SQL script occurred.
CaptureOperationsSession openSession(DataSource dataSource)
throws SQLException
dataSource - The DataSource object to retrieve the database connection
from.
SQLException - If an SQL error occurred.
Long insertObjectEvent(CaptureOperationsSession session,
Timestamp eventTime,
Timestamp recordTime,
String eventTimeZoneOffset,
Long bizStepId,
Long dispositionId,
Long readPointId,
Long bizLocationId,
String action)
throws SQLException
session - The database session.eventTime - The event's 'eventTime' parameter.recordTime - The event's 'recordTime' parameter.eventTimeZoneOffset - The event's 'eventTimeZoneOffset' parameter.bizStepId - The event's 'BusinessStepID' parameter.dispositionId - The event's 'DispositionID' parameter.readPointId - The event's 'ReadPointID' parameter.bizLocationId - The event's 'BusinessLocationID' parameter.action - The event's 'action' parameter.
SQLException - If an SQL exception occurred.
Long insertTransactionEvent(CaptureOperationsSession session,
Timestamp eventTime,
Timestamp recordTime,
String eventTimeZoneOffset,
Long bizStepId,
Long dispositionId,
Long readPointId,
Long bizLocationId,
String action,
String parentId)
throws SQLException
session - The database session.eventTime - The event's 'eventTime' parameter.recordTime - The event's 'recordTime' parameter.eventTimeZoneOffset - The event's 'eventTimeZoneOffset' parameter.bizStepId - The event's 'BusinessStepID' parameter.dispositionId - The event's 'DispositionID' parameter.readPointId - The event's 'ReadPointID' parameter.bizLocationId - The event's 'BusinessLocationID' parameter.action - The event's 'action' parameter.parentId - The event's 'ParentID' parameter.
SQLException - If an SQL exception occurred.
Long insertAggregationEvent(CaptureOperationsSession session,
Timestamp eventTime,
Timestamp recordTime,
String eventTimeZoneOffset,
Long bizStepId,
Long dispositionId,
Long readPointId,
Long bizLocationId,
String action,
String parentId)
throws SQLException
session - The database session.eventTime - The event's 'eventTime' parameter.recordTime - The event's 'recordTime' parameter.eventTimeZoneOffset - The event's 'eventTimeZoneOffset' parameter.bizStepId - The event's 'BusinessStepID' parameter.dispositionId - The event's 'DispositionID' parameter.readPointId - The event's 'ReadPointID' parameter.bizLocationId - The event's 'BusinessLocationID' parameter.action - The event's 'action' parameter.parentId - The event's 'ParentID' parameter.
SQLException - If an SQL exception occurred.
Long insertQuantityEvent(CaptureOperationsSession session,
Timestamp eventTime,
Timestamp recordTime,
String eventTimeZoneOffset,
Long bizStepId,
Long dispositionId,
Long readPointId,
Long bizLocationId,
Long epcClassId,
Long quantity)
throws SQLException
session - The database session.eventTime - The event's 'eventTime' parameter.recordTime - The event's 'recordTime' parameter.eventTimeZoneOffset - The event's 'eventTimeZoneOffset' parameter.bizStepId - The event's 'BusinessStepID' parameter.dispositionId - The event's 'DispositionID' parameter.readPointId - The event's 'ReadPointID' parameter.bizLocationId - The event's 'BusinessLocationID' parameter.epcClassId - The event's 'EpcClassID' parameter.quantity - The event's 'quantity' parameter.
SQLException - If an SQL exception occurred.
void insertEpcsForEvent(CaptureOperationsSession session,
long eventId,
String eventType,
List<String> epcs)
throws SQLException
session - The database session.eventId - The ID (primary key) of the EPCIS event for which the EPCs
should be inserted.eventType - The type of the EPCIS event for which the EPCs should be
inserted.epcs - The List of EPCs to insert.
SQLException - If an SQL error occurred.
Long getVocabularyElement(CaptureOperationsSession session,
String vocabularyType,
String vocabularyElement)
throws SQLException
null will be returned.
session - The database session.vocabularyType - The type of the vocabulary to retrieve. The type determines
from which database table name the primary key will be
retrieved.vocabularyElement - The URI string of the vocabulary element to retrieve.
null if none was found.
SQLException - If an SQL error occurred.
Long insertVocabularyElement(CaptureOperationsSession session,
String vocabularyType,
String vocabularyElement)
throws SQLException
session - The database session.vocabularyType - The type of the vocabulary to insert. The type determines to
which database table name the vocabulary will be inserted.vocabularyElement - The URI string of the vocabulary element to insert.
SQLException - If an SQL error occurred.
Long insertBusinessTransaction(CaptureOperationsSession session,
String bizTrans,
String bizTransType)
throws SQLException
session - The database session.bizTrans - The BusinessTransaction to be inserted.bizTransType - The type of the business transaction to insert.
SQLException - If an SQL problem with the database occurred.
void insertBusinessTransactionsForEvent(CaptureOperationsSession session,
long eventId,
String eventType,
List<BusinessTransactionType> btts)
throws SQLException
SQLException
void insertExtensionFieldsForEvent(CaptureOperationsSession session,
long eventId,
String eventType,
List<EventFieldExtension> exts)
throws SQLException
SQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||