|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fosstrak.epcis.repository.capture.CaptureOperationsBackendSQL
public class CaptureOperationsBackendSQL
The CaptureOperationsBackendSQL uses basic SQL statements (actually
PreparedStatements) to implement the CaptureOperationsBackend
interface.
| Constructor Summary | |
|---|---|
CaptureOperationsBackendSQL()
|
|
| 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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CaptureOperationsBackendSQL()
| Method Detail |
|---|
public void dbReset(Connection dbconnection,
String dbResetScript)
throws SQLException,
IOException
dbReset in interface CaptureOperationsBackenddbconnection - 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.
public CaptureOperationsSession openSession(DataSource dataSource)
throws SQLException
openSession in interface CaptureOperationsBackenddataSource - The DataSource object to retrieve the database connection
from.
SQLException - If an SQL error occurred.
public Long insertObjectEvent(CaptureOperationsSession session,
Timestamp eventTime,
Timestamp recordTime,
String eventTimeZoneOffset,
Long bizStepId,
Long dispositionId,
Long readPointId,
Long bizLocationId,
String action)
throws SQLException
insertObjectEvent in interface CaptureOperationsBackendsession - 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.
public Long insertTransactionEvent(CaptureOperationsSession session,
Timestamp eventTime,
Timestamp recordTime,
String eventTimeZoneOffset,
Long bizStepId,
Long dispositionId,
Long readPointId,
Long bizLocationId,
String action,
String parentId)
throws SQLException
insertTransactionEvent in interface CaptureOperationsBackendsession - 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.
public Long insertAggregationEvent(CaptureOperationsSession session,
Timestamp eventTime,
Timestamp recordTime,
String eventTimeZoneOffset,
Long bizStepId,
Long dispositionId,
Long readPointId,
Long bizLocationId,
String action,
String parentId)
throws SQLException
insertAggregationEvent in interface CaptureOperationsBackendsession - 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.
public Long insertQuantityEvent(CaptureOperationsSession session,
Timestamp eventTime,
Timestamp recordTime,
String eventTimeZoneOffset,
Long bizStepId,
Long dispositionId,
Long readPointId,
Long bizLocationId,
Long epcClassId,
Long quantity)
throws SQLException
insertQuantityEvent in interface CaptureOperationsBackendsession - 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.
public void insertEpcsForEvent(CaptureOperationsSession session,
long eventId,
String eventType,
List<String> epcs)
throws SQLException
insertEpcsForEvent in interface CaptureOperationsBackendsession - 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.
public Long getVocabularyElement(CaptureOperationsSession session,
String vocabularyType,
String vocabularyElement)
throws SQLException
null will be returned.
getVocabularyElement in interface CaptureOperationsBackendsession - 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.
public Long insertVocabularyElement(CaptureOperationsSession session,
String vocabularyType,
String vocabularyElement)
throws SQLException
insertVocabularyElement in interface CaptureOperationsBackendsession - 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.
public Long insertBusinessTransaction(CaptureOperationsSession session,
String bizTrans,
String bizTransType)
throws SQLException
insertBusinessTransaction in interface CaptureOperationsBackendsession - 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.
public void insertBusinessTransactionsForEvent(CaptureOperationsSession session,
long eventId,
String eventType,
List<BusinessTransactionType> btts)
throws SQLException
insertBusinessTransactionsForEvent in interface CaptureOperationsBackendSQLException
public void insertExtensionFieldsForEvent(CaptureOperationsSession session,
long eventId,
String eventType,
List<EventFieldExtension> exts)
throws SQLException
insertExtensionFieldsForEvent in interface CaptureOperationsBackendSQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||