public abstract class AbstractEventTableFactory extends Object implements EventTableFactory
EventTableFactory
that provides Jdbc "create table" statements compatible with
most databases.Constructor and Description |
---|
AbstractEventTableFactory() |
Modifier and Type | Method and Description |
---|---|
PreparedStatement |
createDomainEventTable(Connection connection,
EventSchema schema)
Creates a PreparedStatement that allows for the creation of the table to store Event entries.
|
PreparedStatement |
createSnapshotEventTable(Connection connection,
EventSchema schema)
Creates a PreparedStatement that allows for the creation of the table to store Snapshots.
|
protected abstract String |
idColumnType()
Returns the sql to register the auto incrementing global sequence column.
|
protected abstract String |
payloadType()
Returns the sql to describe the type of payload column.
|
protected String |
timestampType()
Returns the sql to describe the type of timestamp column.
|
public PreparedStatement createDomainEventTable(Connection connection, EventSchema schema) throws SQLException
EventTableFactory
createDomainEventTable
in interface EventTableFactory
connection
- The connection to create the PreparedStatement forschema
- The event schema with the name of the table and its columnsSQLException
- when an exception occurs while creating the prepared statementpublic PreparedStatement createSnapshotEventTable(Connection connection, EventSchema schema) throws SQLException
EventTableFactory
createSnapshotEventTable
in interface EventTableFactory
connection
- The connection to create the PreparedStatement forschema
- The event schema with the name of the table and its columnsSQLException
- when an exception occurs while creating the prepared statementprotected abstract String idColumnType()
protected abstract String payloadType()
protected String timestampType()
Copyright © 2010–2023. All rights reserved.