public class BuiltinTableIdGenerator extends AbstractPreGenerateIdGenerator implements TableIdGenerator
TableIdGenerator.AbstractPreGenerateIdGenerator.IdContext| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
pkColumnName |
protected java.lang.String |
pkColumnValue |
protected java.lang.String |
qualifiedTableName |
protected PreparedSql |
selectSql |
protected PreparedSql |
updateSql |
protected java.lang.String |
valueColumnName |
allocationSize, idContextMap, initialValue| Constructor and Description |
|---|
BuiltinTableIdGenerator() |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
createSelectFormattedSql() |
protected java.lang.String |
createSelectRawSql() |
protected java.lang.String |
createUpdateFormattedSql() |
protected java.lang.String |
createUpdateRawSql() |
GenerationType |
getGenerationType()
Returns the generation type.
|
protected long |
getNewInitialValue(IdGenerationConfig config)
Return the next initial value.
|
void |
initialize()
Initializes this generator.
|
protected long |
selectId(IdGenerationConfig config,
PreparedSql sql) |
void |
setPkColumnName(java.lang.String pkColumnName)
Sets the column name of the primary key.
|
void |
setPkColumnValue(java.lang.String pkColumnValue)
Sets the column value of the primary key.
|
void |
setQualifiedTableName(java.lang.String qualifiedTableName)
Sets the qualified name of the table.
|
void |
setValueColumnName(java.lang.String valueColumnName)
Sets the column name of the identity value.
|
protected void |
updateId(IdGenerationConfig config,
PreparedSql sql) |
generatePostInsert, generatePreInsert, getIdContext, includesIdentityColumn, setAllocationSize, setInitialValue, supportsAutoGeneratedKeys, supportsBatchgetGeneratedValue, getGeneratedValue, setupOptionsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetAllocationSize, setInitialValuegeneratePostInsert, generatePreInsert, includesIdentityColumn, supportsAutoGeneratedKeys, supportsBatchprotected java.lang.String qualifiedTableName
protected java.lang.String pkColumnName
protected java.lang.String pkColumnValue
protected java.lang.String valueColumnName
protected PreparedSql updateSql
protected PreparedSql selectSql
public void setQualifiedTableName(java.lang.String qualifiedTableName)
TableIdGeneratorsetQualifiedTableName in interface TableIdGeneratorqualifiedTableName - the qualified name of the tablepublic void setPkColumnName(java.lang.String pkColumnName)
TableIdGeneratorsetPkColumnName in interface TableIdGeneratorpkColumnName - the column name of the primary keypublic void setPkColumnValue(java.lang.String pkColumnValue)
TableIdGeneratorsetPkColumnValue in interface TableIdGeneratorpkColumnValue - the column value of the primary keypublic void setValueColumnName(java.lang.String valueColumnName)
TableIdGeneratorsetValueColumnName in interface TableIdGeneratorvalueColumnName - the column name of the identity valuepublic void initialize()
TableIdGeneratorinitialize in interface TableIdGeneratorprotected java.lang.String createUpdateRawSql()
protected java.lang.String createUpdateFormattedSql()
protected java.lang.String createSelectRawSql()
protected java.lang.String createSelectFormattedSql()
protected long getNewInitialValue(IdGenerationConfig config)
AbstractPreGenerateIdGeneratorgetNewInitialValue in class AbstractPreGenerateIdGeneratorconfig - the configurationprotected void updateId(IdGenerationConfig config, PreparedSql sql)
protected long selectId(IdGenerationConfig config, PreparedSql sql)
public GenerationType getGenerationType()
IdGeneratorgetGenerationType in interface IdGenerator