use of org.dbflute.logic.replaceschema.takefinally.sequence.DfSequenceHandler in project dbflute-core by dbflute.
the class DfTakeFinallyProcess method incrementSequenceToDataMax.
// -----------------------------------------------------
// Increment Sequence
// ------------------
protected void incrementSequenceToDataMax() {
if (!getReplaceSchemaProperties().isIncrementSequenceToDataMax()) {
return;
}
if (_suppressSequenceIncrement) {
return;
}
_log.info("");
_log.info("* * * * * * * * * * **");
_log.info("* *");
_log.info("* Increment Sequence *");
_log.info("* *");
_log.info("* * * * * * * * * * **");
final DfSequenceIdentityProperties sequenceProp = getProperties().getSequenceIdentityProperties();
final Map<String, String> tableSequenceMap = sequenceProp.getTableSequenceMap();
final DfDatabaseTypeFacadeProp dbTypeProp = getDatabaseTypeFacadeProp();
final DfDatabaseProperties databaseProp = getDatabaseProperties();
final DfSequenceHandlerFactory factory = new DfSequenceHandlerFactory(_dataSource, dbTypeProp, databaseProp);
final DfSequenceHandler sequenceHandler = factory.createSequenceHandler();
if (sequenceHandler == null) {
String databaseType = dbTypeProp.getTargetDatabase();
String msg = "Unsupported isIncrementSequenceToDataMax at " + databaseType;
throw new UnsupportedOperationException(msg);
}
sequenceHandler.incrementSequenceToDataMax(tableSequenceMap);
}
Aggregations