|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.axonframework.saga.repository.jdbc.GenericSagaSqlSchema
public class GenericSagaSqlSchema
Generic SagaSqlSchema implementation, for use in most databases. This implementation can be overridden to account for differences in dialect between database implementations.
| Field Summary | |
|---|---|
protected SchemaConfiguration |
schemaConfiguration
|
| Constructor Summary | |
|---|---|
GenericSagaSqlSchema()
Initialize a GenericSagaSqlSchema using default settings. |
|
GenericSagaSqlSchema(SchemaConfiguration schemaConfiguration)
Initialize a GenericSagaSqlSchema. |
|
| Method Summary | |
|---|---|
SerializedObject<byte[]> |
readSerializedSaga(ResultSet resultSet)
Reads a SerializedObject from the given resultSet, which has been returned by executing the
Statement returned from SagaSqlSchema.sql_loadSaga(java.sql.Connection, String)
Note: The implementation must not change the resultSet's cursor position |
PreparedStatement |
sql_createTableAssocValueEntry(Connection conn)
Creates a PreparedStatement that creates the table for storing Association Values for Sagas. |
PreparedStatement |
sql_createTableSagaEntry(Connection conn)
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final SchemaConfiguration schemaConfiguration
| Constructor Detail |
|---|
public GenericSagaSqlSchema()
public GenericSagaSqlSchema(SchemaConfiguration schemaConfiguration)
schemaConfiguration - | Method Detail |
|---|
public PreparedStatement sql_loadSaga(Connection connection,
String sagaId)
throws SQLException
SagaSqlSchemasagaId.
sql_loadSaga in interface SagaSqlSchemaconnection - The connection to create the PreparedStatement forsagaId - The identifier of the Saga to return
SagaSqlSchema.readSerializedSaga(java.sql.ResultSet),
when executed
SQLException - when an error occurs creating the PreparedStatement
public PreparedStatement sql_removeAssocValue(Connection connection,
String key,
String value,
String sagaType,
String sagaIdentifier)
throws SQLException
SagaSqlSchemasagaIdentifier, where the
association is identified with given key and value.
sql_removeAssocValue in interface SagaSqlSchemaconnection - 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 PreparedStatement
public PreparedStatement sql_storeAssocValue(Connection connection,
String key,
String value,
String sagaType,
String sagaIdentifier)
throws SQLException
SagaSqlSchemakey and value, for a
Saga of given type and identifier.
sql_storeAssocValue in interface SagaSqlSchemaconnection - 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 PreparedStatement
public PreparedStatement sql_findAssocSagaIdentifiers(Connection connection,
String key,
String value,
String sagaType)
throws SQLException
SagaSqlSchemasagaType associated with the
given association key and value.
sql_findAssocSagaIdentifiers in interface SagaSqlSchemaconnection - 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 PreparedStatement
public PreparedStatement sql_deleteSagaEntry(Connection connection,
String sagaIdentifier)
throws SQLException
SagaSqlSchemasagaIdentifier.
sql_deleteSagaEntry in interface SagaSqlSchemaconnection - The connection to create the PreparedStatement forsagaIdentifier - The identifier of the Saga to remove
SQLException - when an error occurs creating the PreparedStatement
public PreparedStatement sql_deleteAssociationEntries(Connection connection,
String sagaIdentifier)
throws SQLException
SagaSqlSchemasagaIdentifier.
sql_deleteAssociationEntries in interface SagaSqlSchemaconnection - The connection to create the PreparedStatement forsagaIdentifier - The identifier of the Saga to remove associations for
SQLException - when an error occurs creating the PreparedStatement
public PreparedStatement sql_updateSaga(Connection connection,
String sagaIdentifier,
byte[] serializedSaga,
String sagaType,
String revision)
throws SQLException
SagaSqlSchemasagaType and with given sagaIdentifier.
sql_updateSaga in interface SagaSqlSchemaconnection - 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 PreparedStatement
public PreparedStatement sql_storeSaga(Connection connection,
String sagaIdentifier,
String revision,
String sagaType,
byte[] serializedSaga)
throws SQLException
SagaSqlSchemasagaType and with given
sagaIdentifier.
sql_storeSaga in interface SagaSqlSchemaconnection - The connection to create the PreparedStatement forsagaIdentifier - The identifier of the Saga to insertrevision - The revision identifier of the serialized formsagaType - The serialized type of the sagaserializedSaga - The serialized form of the saga to insert
SQLException - when an error occurs creating the PreparedStatement
public PreparedStatement sql_createTableAssocValueEntry(Connection conn)
throws SQLException
SagaSqlSchema
sql_createTableAssocValueEntry in interface SagaSqlSchemaconn - The connection to create the PreparedStatement for
SQLException - when an error occurs creating the PreparedStatement
public PreparedStatement sql_createTableSagaEntry(Connection conn)
throws SQLException
SagaSqlSchema
sql_createTableSagaEntry in interface SagaSqlSchemaconn - The connection to create the PreparedStatement for
SQLException - when an error occurs creating the PreparedStatement
public SerializedObject<byte[]> readSerializedSaga(ResultSet resultSet)
throws SQLException
SagaSqlSchemaresultSet, which has been returned by executing the
Statement returned from SagaSqlSchema.sql_loadSaga(java.sql.Connection, String)
Note: The implementation must not change the resultSet's cursor position
readSerializedSaga in interface SagaSqlSchemaresultSet - 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 | |||||||||