public class AutoIncrementIdGenerator extends AbstractIdGenerator
adapter, databaseName| Constructor and Description |
|---|
AutoIncrementIdGenerator(Adapter adapter,
String databaseName)
Creates an IdGenerator which will work with the specified database.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isConnectionRequired()
A flag to determine whether a Connection is required to
generate an id.
|
boolean |
isGetGeneratedKeysSupported()
A flag to determine whether Statement#getGeneratedKeys()
should be used.
|
boolean |
isPostInsert()
A flag to determine the timing of the id generation
|
boolean |
isPriorToInsert()
A flag to determine the timing of the id generation
|
getId, getIdAsBigDecimal, getIdAsInt, getIdAsLong, getIdAsString, getIdSqlpublic AutoIncrementIdGenerator(Adapter adapter, String databaseName)
adapter - the adapter that knows the correct sql syntax.databaseName - The name of the databaseName to find the correct
schema.public boolean isPriorToInsert()
isPriorToInsert in interface IdGeneratorisPriorToInsert in class AbstractIdGeneratorboolean valuepublic boolean isPostInsert()
isPostInsert in interface IdGeneratorisPostInsert in class AbstractIdGeneratorboolean valuepublic final boolean isConnectionRequired()
isConnectionRequired in interface IdGeneratorisConnectionRequired in class AbstractIdGeneratorboolean valuepublic boolean isGetGeneratedKeysSupported()
isGetGeneratedKeysSupported in interface IdGeneratorisGetGeneratedKeysSupported in class AbstractIdGeneratorboolean valueCopyright © 2000–2020 The Apache Software Foundation. All rights reserved.