public interface SagaSqlSchema
Modifier and Type | Method and Description |
---|---|
Set<AssociationValue> |
readAssociationValues(ResultSet resultSet)
Reads a Set of AssociationValues from the given
resultSet , which has been returned by executing the
Statement returned from sql_findAssociations(Connection, String, String) . |
SerializedObject<?> |
readSerializedSaga(ResultSet resultSet)
Reads a SerializedObject from the given
resultSet , which has been returned by executing the
Statement returned from sql_loadSaga(java.sql.Connection, String)
Note: The implementation must not change the resultSet's cursor position |
String |
readToken(ResultSet resultSet)
Reads a token from the given
resultSet . |
PreparedStatement |
sql_createTableAssocValueEntry(Connection connection)
Creates a PreparedStatement that creates the table for storing Association Values for Sagas.
|
PreparedStatement |
sql_createTableSagaEntry(Connection connection)
Creates a PreparedStatement that creates the table for storing Sagas.
|
PreparedStatement |
sql_deleteAssociationEntries(Connection connection,
String sagaIdentifier)
Creates a PreparedStatement that deletes all association entries for a Saga with given
sagaIdentifier . |
PreparedStatement |
sql_deleteSagaEntry(Connection connection,
String sagaIdentifier)
Creates a PreparedStatement that deletes a Saga with given
sagaIdentifier . |
PreparedStatement |
sql_findAssociations(Connection connection,
String sagaIdentifier,
String sagaType)
Creates a PreparedStatement that finds the associations of a Saga of given
sagaType and given sagaIdentifier . |
PreparedStatement |
sql_findAssocSagaIdentifiers(Connection connection,
String key,
String value,
String sagaType)
Creates a PreparedStatement that finds identifiers of Sagas of given
sagaType associated with the
given association key and value . |
PreparedStatement |
sql_loadSaga(Connection connection,
String sagaId)
Creates a PreparedStatement that loads a single Saga, with given
sagaId . |
PreparedStatement |
sql_removeAssocValue(Connection connection,
String key,
String value,
String sagaType,
String sagaIdentifier)
Creates a PreparedStatement that removes an association value for given
sagaIdentifier , where the
association is identified with given key and value . |
PreparedStatement |
sql_storeAssocValue(Connection connection,
String key,
String value,
String sagaType,
String sagaIdentifier)
Creates a PreparedStatement that stores an association with given
key and value , for a
Saga of given type and identifier . |
PreparedStatement |
sql_storeSaga(Connection connection,
String sagaIdentifier,
String revision,
String sagaType,
byte[] serializedSaga)
Creates a PreparedStatement that inserts a Saga entry, of given
sagaType and with given
sagaIdentifier . |
PreparedStatement |
sql_updateSaga(Connection connection,
String sagaIdentifier,
byte[] serializedSaga,
String sagaType,
String revision)
Creates a PreparedStatement that updates the serialized form of an existing Saga entry, of given
sagaType and with given sagaIdentifier . |
PreparedStatement sql_loadSaga(Connection connection, String sagaId) throws SQLException
sagaId
.connection
- The connection to create the PreparedStatement forsagaId
- The identifier of the Saga to returnreadSerializedSaga(java.sql.ResultSet)
,
when executedSQLException
- when an error occurs creating the PreparedStatementPreparedStatement sql_removeAssocValue(Connection connection, String key, String value, String sagaType, String sagaIdentifier) throws SQLException
sagaIdentifier
, where the
association is identified with given key
and value
.connection
- The connection to create the PreparedStatement forkey
- The key of the association to removevalue
- The value of the association to removesagaType
- The type of saga to remove the association forsagaIdentifier
- The identifier of the Saga to remove the association forSQLException
- when an error occurs creating the PreparedStatementPreparedStatement sql_storeAssocValue(Connection connection, String key, String value, String sagaType, String sagaIdentifier) throws SQLException
key
and value
, for a
Saga of given type
and identifier
.connection
- The connection to create the PreparedStatement forkey
- The key of the association to storevalue
- The value of the association to storesagaType
- The type of saga to create the association forsagaIdentifier
- The identifier of the Saga to create the association forSQLException
- when an error occurs creating the PreparedStatementPreparedStatement sql_findAssocSagaIdentifiers(Connection connection, String key, String value, String sagaType) throws SQLException
sagaType
associated with the
given association key
and value
.connection
- The connection to create the PreparedStatement forkey
- The key of the associationvalue
- The value of the associationsagaType
- The type of saga to find associations forSQLException
- when an error occurs creating the PreparedStatementPreparedStatement sql_findAssociations(Connection connection, String sagaIdentifier, String sagaType) throws SQLException
sagaType
and given sagaIdentifier
.connection
- The connection to create the PreparedStatement forsagaIdentifier
- The identifier of the SagasagaType
- The type of saga to find associations forSQLException
- when an error occurs while creating the PreparedStatementPreparedStatement sql_deleteSagaEntry(Connection connection, String sagaIdentifier) throws SQLException
sagaIdentifier
.connection
- The connection to create the PreparedStatement forsagaIdentifier
- The identifier of the Saga to removeSQLException
- when an error occurs creating the PreparedStatementPreparedStatement sql_deleteAssociationEntries(Connection connection, String sagaIdentifier) throws SQLException
sagaIdentifier
.connection
- The connection to create the PreparedStatement forsagaIdentifier
- The identifier of the Saga to remove associations forSQLException
- when an error occurs creating the PreparedStatementPreparedStatement sql_updateSaga(Connection connection, String sagaIdentifier, byte[] serializedSaga, String sagaType, String revision) throws SQLException
sagaType
and with given sagaIdentifier
.connection
- The connection to create the PreparedStatement forsagaIdentifier
- The identifier of the Saga to updateserializedSaga
- The serialized form of the saga to updatesagaType
- The serialized type of the sagarevision
- The revision identifier of the serialized formSQLException
- when an error occurs creating the PreparedStatementPreparedStatement sql_storeSaga(Connection connection, String sagaIdentifier, String revision, String sagaType, byte[] serializedSaga) throws SQLException
sagaType
and with given
sagaIdentifier
.connection
- The connection to create the PreparedStatement forsagaIdentifier
- The identifier of the Saga to insertserializedSaga
- The serialized form of the saga to insertsagaType
- The serialized type of the sagarevision
- The revision identifier of the serialized formSQLException
- when an error occurs creating the PreparedStatementPreparedStatement sql_createTableAssocValueEntry(Connection connection) throws SQLException
connection
- The connection to create the PreparedStatement forSQLException
- when an error occurs creating the PreparedStatementPreparedStatement sql_createTableSagaEntry(Connection connection) throws SQLException
connection
- The connection to create the PreparedStatement forSQLException
- when an error occurs creating the PreparedStatementSerializedObject<?> readSerializedSaga(ResultSet resultSet) throws SQLException
resultSet
, which has been returned by executing the
Statement returned from sql_loadSaga(java.sql.Connection, String)
Note: The implementation must not change the resultSet's cursor positionresultSet
- The result set to read data from.SQLException
- when an exception occurs reading from the resultSetSet<AssociationValue> readAssociationValues(ResultSet resultSet) throws SQLException
resultSet
, which has been returned by executing the
Statement returned from sql_findAssociations(Connection, String, String)
.resultSet
- The result set to read data from.SQLException
- when an exception occurs reading from the resultSetString readToken(ResultSet resultSet)
resultSet
.resultSet
- The result set to read data from.SQLException
- when an exception occurs reading from the resultSetCopyright © 2010–2024. All rights reserved.