Class AbstractSequenceUpdateTool
- java.lang.Object
-
- de.akquinet.jbosscc.guttenbase.tools.AbstractSequenceUpdateTool
-
- Direct Known Subclasses:
PostgresqlSequenceUpdateTool
public abstract class AbstractSequenceUpdateTool extends Object
Update auto-increment sequences for table IDs. By default the sequence is updated to SELECT(MAX(ID) + 1) FROM table© 2012-2034 akquinet tech@spree
- Author:
- M. Dahm
Uses
EntityTableCheckerHint
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 MinMaxIdSelectorTool
_minMaxIdSelector
protected ScriptExecutorTool
_scriptExecutor
-
Constructor Summary
Constructors Constructor Description AbstractSequenceUpdateTool(ConnectorRepository connectorRepository)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract String
getSequenceName(String tableName)
abstract String
getUpdateSequenceClause(String sequenceName, long sequenceValue)
void
updateSequences(String connectorId)
-
-
-
Field Detail
-
_connectorRepository
protected final ConnectorRepository _connectorRepository
-
_scriptExecutor
protected final ScriptExecutorTool _scriptExecutor
-
_minMaxIdSelector
protected final MinMaxIdSelectorTool _minMaxIdSelector
-
-
Constructor Detail
-
AbstractSequenceUpdateTool
public AbstractSequenceUpdateTool(ConnectorRepository connectorRepository)
-
-
Method Detail
-
updateSequences
public void updateSequences(String connectorId) throws SQLException
- Throws:
SQLException
-
getUpdateSequenceClause
public abstract String getUpdateSequenceClause(String sequenceName, long sequenceValue)
-
-