Class AbstractEventTableFactory
java.lang.Object
org.axonframework.eventsourcing.eventstore.jdbc.AbstractEventTableFactory
- All Implemented Interfaces:
EventTableFactory
- Direct Known Subclasses:
HsqlEventTableFactory,MySqlEventTableFactory,Oracle11EventTableFactory,PostgresEventTableFactory
Abstract implementation of an
EventTableFactory that provides Jdbc "create table" statements compatible with
most databases.- Since:
- 3.0
- Author:
- Rene de Waele
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateDomainEventTable(Connection connection, EventSchema schema) Creates a PreparedStatement that allows for the creation of the table to store Event entries.createSnapshotEventTable(Connection connection, EventSchema schema) Creates a PreparedStatement that allows for the creation of the table to store Snapshots.protected abstract StringReturns the sql to register the auto incrementing global sequence column.protected abstract StringReturns the sql to describe the type of payload column.protected StringReturns the sql to describe the type of timestamp column.
-
Constructor Details
-
AbstractEventTableFactory
public AbstractEventTableFactory()
-
-
Method Details
-
createDomainEventTable
public PreparedStatement createDomainEventTable(Connection connection, EventSchema schema) throws SQLException Description copied from interface:EventTableFactoryCreates a PreparedStatement that allows for the creation of the table to store Event entries.- Specified by:
createDomainEventTablein interfaceEventTableFactory- Parameters:
connection- The connection to create the PreparedStatement forschema- The event schema with the name of the table and its columns- Returns:
- The statement to create the table, ready to be executed
- Throws:
SQLException- when an exception occurs while creating the prepared statement
-
createSnapshotEventTable
public PreparedStatement createSnapshotEventTable(Connection connection, EventSchema schema) throws SQLException Description copied from interface:EventTableFactoryCreates a PreparedStatement that allows for the creation of the table to store Snapshots.- Specified by:
createSnapshotEventTablein interfaceEventTableFactory- Parameters:
connection- The connection to create the PreparedStatement forschema- The event schema with the name of the table and its columns- Returns:
- The statement to create the table, ready to be executed
- Throws:
SQLException- when an exception occurs while creating the prepared statement
-
idColumnType
Returns the sql to register the auto incrementing global sequence column.- Returns:
- the sql for the global id column
-
payloadType
Returns the sql to describe the type of payload column.- Returns:
- the sql for the payload column
-
timestampType
Returns the sql to describe the type of timestamp column.- Returns:
- the sql for the timestamp column
-