|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SagaSqlSchema
Interface describing the SQL statements that the JdbcSagaRepository needs to execute against the underlying database.
Method Summary | |
---|---|
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 |
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_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 . |
Method Detail |
---|
PreparedStatement sql_loadSaga(Connection connection, String sagaId) throws SQLException
sagaId
.
connection
- The connection to create the PreparedStatement forsagaId
- The identifier of the Saga to return
readSerializedSaga(java.sql.ResultSet)
,
when executed
SQLException
- 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 for
SQLException
- 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 for
SQLException
- 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 for
SQLException
- when an error occurs 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 remove
SQLException
- 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 for
SQLException
- 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 form
SQLException
- 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 form
SQLException
- when an error occurs creating the PreparedStatementPreparedStatement sql_createTableAssocValueEntry(Connection connection) throws SQLException
connection
- The connection to create the PreparedStatement for
SQLException
- when an error occurs creating the PreparedStatementPreparedStatement sql_createTableSagaEntry(Connection connection) throws SQLException
connection
- The connection to create the PreparedStatement for
SQLException
- 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 position
resultSet
- The result set to read data from.
SQLException
- when an exception occurs reading from the resultSet
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |