Class AbstractSequenceCreationTool
- java.lang.Object
-
- de.akquinet.jbosscc.guttenbase.tools.AbstractSequenceCreationTool
-
- Direct Known Subclasses:
PostgresqlSequenceCreationTool
public abstract class AbstractSequenceCreationTool extends Object
Create auto-increment sequences for table IDs.© 2012-2034 akquinet tech@spree
- Author:
- M. Dahm
Uses
TableMapperHint
UsesEntityTableCheckerHint
to look for entity classes, i.e. classes that may use an ID sequence
-
-
Field Summary
Fields Modifier and Type Field Description protected ConnectorRepository
_connectorRepository
protected ScriptExecutorTool
_scriptExecutor
-
Constructor Summary
Constructors Constructor Description AbstractSequenceCreationTool(ConnectorRepository connectorRepository)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
createSequences(String connectorId, long start, long incrementBy)
protected abstract List<String>
getCreateSequenceClauses(String tableName, String idColumn, String sequenceName, long start, long incrementBy)
protected abstract String
getIdColumn(TableMetaData tableMetaData)
protected abstract String
getSequenceName(String tableName)
-
-
-
Field Detail
-
_connectorRepository
protected final ConnectorRepository _connectorRepository
-
_scriptExecutor
protected final ScriptExecutorTool _scriptExecutor
-
-
Constructor Detail
-
AbstractSequenceCreationTool
public AbstractSequenceCreationTool(ConnectorRepository connectorRepository)
-
-
Method Detail
-
createSequences
public void createSequences(String connectorId, long start, long incrementBy) throws SQLException
- Throws:
SQLException
-
getIdColumn
protected abstract String getIdColumn(TableMetaData tableMetaData)
-
getCreateSequenceClauses
protected abstract List<String> getCreateSequenceClauses(String tableName, String idColumn, String sequenceName, long start, long incrementBy)
-
-