public abstract class AbstractIdGenerator extends java.lang.Object implements IdGenerator
IdGenerator interface.| Constructor and Description |
|---|
AbstractIdGenerator() |
| Modifier and Type | Method and Description |
|---|---|
protected long |
getGeneratedValue(IdGenerationConfig config,
java.sql.ResultSet resultSet)
Retrieves a generated identity from the
ResultSet object. |
protected long |
getGeneratedValue(IdGenerationConfig config,
Sql<?> sql)
Executes the SQL and gets a generated identity.
|
protected void |
setupOptions(IdGenerationConfig config,
java.sql.PreparedStatement preparedStatement)
Set up options for the
preparedStatement object. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgeneratePostInsert, generatePreInsert, getGenerationType, includesIdentityColumn, supportsAutoGeneratedKeys, supportsBatchprotected long getGeneratedValue(IdGenerationConfig config, Sql<?> sql)
config - the configuration for identity generationsql - the SQL to get the generated identityLJdbcException - if a JDBC related error occursprotected void setupOptions(IdGenerationConfig config, java.sql.PreparedStatement preparedStatement) throws java.sql.SQLException
preparedStatement object.config - the configuration for identity generationpreparedStatement - the prepared statementjava.sql.SQLException - if operations for the preparedStatement are failedprotected long getGeneratedValue(IdGenerationConfig config, java.sql.ResultSet resultSet)
ResultSet object.config - the configuration for identity generationresultSet - the result setJdbcException - if a JDBC related error occurs