java.lang.Object
org.seasar.doma.jdbc.id.AbstractIdGenerator
org.seasar.doma.jdbc.id.AbstractPreGenerateIdGenerator
org.seasar.doma.jdbc.id.BuiltinTableIdGenerator
- All Implemented Interfaces:
IdGenerator,TableIdGenerator
public class BuiltinTableIdGenerator
extends AbstractPreGenerateIdGenerator
implements TableIdGenerator
The built-in implementation for
TableIdGenerator.-
Nested Class Summary
Nested classes/interfaces inherited from class org.seasar.doma.jdbc.id.AbstractPreGenerateIdGenerator
AbstractPreGenerateIdGenerator.IdContext -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected Stringprotected Stringprotected PreparedSqlprotected PreparedSqlprotected StringFields inherited from class org.seasar.doma.jdbc.id.AbstractPreGenerateIdGenerator
allocationSize, idContextMap, initialValue -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Stringprotected Stringprotected Stringprotected StringReturns the generation type.protected longgetNewInitialValue(IdGenerationConfig config) Return the next initial value.voidInitializes this generator.protected longselectId(IdGenerationConfig config, PreparedSql sql) voidsetPkColumnName(String pkColumnName) Sets the column name of the primary key.voidsetPkColumnValue(String pkColumnValue) Sets the column value of the primary key.voidsetQualifiedTableName(String qualifiedTableName) Sets the qualified name of the table.voidsetValueColumnName(String valueColumnName) Sets the column name of the identity value.protected voidupdateId(IdGenerationConfig config, PreparedSql sql) Methods inherited from class org.seasar.doma.jdbc.id.AbstractPreGenerateIdGenerator
generatePostInsert, generatePreInsert, generateValuesPreInsert, getIdContext, includesIdentityColumn, includesIdentityColumn, setAllocationSize, setInitialValue, supportsAutoGeneratedKeys, supportsBatchMethods inherited from class org.seasar.doma.jdbc.id.AbstractIdGenerator
getGeneratedValue, getGeneratedValue, setupOptionsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.seasar.doma.jdbc.id.IdGenerator
generatePostInsert, generatePreInsert, generateValuesPostInsert, generateValuesPreInsert, includesIdentityColumn, includesIdentityColumn, supportsAutoGeneratedKeys, supportsBatchMethods inherited from interface org.seasar.doma.jdbc.id.TableIdGenerator
setAllocationSize, setInitialValue
-
Field Details
-
qualifiedTableName
-
pkColumnName
-
pkColumnValue
-
valueColumnName
-
updateSql
-
selectSql
-
-
Constructor Details
-
BuiltinTableIdGenerator
public BuiltinTableIdGenerator()
-
-
Method Details
-
setQualifiedTableName
Description copied from interface:TableIdGeneratorSets the qualified name of the table.- Specified by:
setQualifiedTableNamein interfaceTableIdGenerator- Parameters:
qualifiedTableName- the qualified name of the table
-
setPkColumnName
Description copied from interface:TableIdGeneratorSets the column name of the primary key.- Specified by:
setPkColumnNamein interfaceTableIdGenerator- Parameters:
pkColumnName- the column name of the primary key
-
setPkColumnValue
Description copied from interface:TableIdGeneratorSets the column value of the primary key.- Specified by:
setPkColumnValuein interfaceTableIdGenerator- Parameters:
pkColumnValue- the column value of the primary key
-
setValueColumnName
Description copied from interface:TableIdGeneratorSets the column name of the identity value.- Specified by:
setValueColumnNamein interfaceTableIdGenerator- Parameters:
valueColumnName- the column name of the identity value
-
initialize
public void initialize()Description copied from interface:TableIdGeneratorInitializes this generator.- Specified by:
initializein interfaceTableIdGenerator
-
createUpdateRawSql
-
createUpdateFormattedSql
-
createSelectRawSql
-
createSelectFormattedSql
-
getNewInitialValue
Description copied from class:AbstractPreGenerateIdGeneratorReturn the next initial value.- Specified by:
getNewInitialValuein classAbstractPreGenerateIdGenerator- Parameters:
config- the configuration- Returns:
- the new initial value
-
updateId
-
selectId
-
getGenerationType
Description copied from interface:IdGeneratorReturns the generation type.- Specified by:
getGenerationTypein interfaceIdGenerator- Returns:
- the generation type
-