IntegralDataTypeHolder
The value MUST be fetched in a separate transaction
from that of the main session
transaction so the generator must be able to obtain a new
connection and commit it. Hence this implementation may only
be used when Hibernate is fetching connections, not when the
user is supplying connections.
Again, the return types supported here are any of the ones
supported by IntegralDataTypeHolder. This is new
as of 3.5. Prior to that this generator only returned Integer
values.
Mapping parameters supported: table, column
TableHiLoGenerator
| Modifier and Type | Field and Description |
|---|---|
| public static final String | COLUMN
The column parameter |
| private String | |
| public static final String | DEFAULT_COLUMN_NAME
Default column name |
| public static final String | DEFAULT_TABLE_NAME
Default table name |
| private Type | |
| private static final Logger | |
| private String | |
| public static final String | TABLE
The table parameter
|
| private String | |
| private String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected IntegralDataTypeHolder | |
| public void | configure(Type type, Properties
param values, keyed by parameter name params, Dialect dialect)Implements org. |
| public Serializable | Returns: Prior to 3.5 this method returned anInteger. Since 3.5 it now
returns a IntegralDataTypeHolderThe sql connection to use. conn, String n/a sql)Implements abstract org. |
| public synchronized Serializable | generate(SessionImplementor session, Object
the entity or toplevel collection for which the id is being generated object)Implements org. |
| protected IntegralDataTypeHolder | |
| public Object | generatorKey()
Implements org. |
| public String[] | sqlCreateStrings(Dialect
The dialect against which to generate the create command(s) dialect)Implements org. |
| public String[] | sqlDropStrings(Dialect
The dialect against which to generate the drop command(s) dialect)Implements org. |
| COLUMN | back to summary |
|---|---|
| public static final String COLUMN The column parameter | |
| columnName | back to summary |
|---|---|
| private String columnName | |
| DEFAULT_COLUMN_NAME | back to summary |
|---|---|
| public static final String DEFAULT_COLUMN_NAME Default column name | |
| DEFAULT_TABLE_NAME | back to summary |
|---|---|
| public static final String DEFAULT_TABLE_NAME Default table name | |
| identifierType | back to summary |
|---|---|
| private Type identifierType | |
| log | back to summary |
|---|---|
| private static final Logger log | |
| query | back to summary |
|---|---|
| private String query | |
| TABLE | back to summary |
|---|---|
| public static final String TABLE Hides org. The table parameter | |
| tableName | back to summary |
|---|---|
| private String tableName | |
| update | back to summary |
|---|---|
| private String update | |
| TableGenerator | back to summary |
|---|---|
| public TableGenerator() | |
| buildHolder | back to summary |
|---|---|
| protected IntegralDataTypeHolder buildHolder() | |
| configure | back to summary |
|---|---|
| public void configure(Type type, Properties params, Dialect dialect) Implements org. Doc from org. Configure this instance, given the value of parameters specified by the user as <param> elements. This method is called just once, following instantiation.
| |
| doWorkInCurrentTransaction | back to summary |
|---|---|
| public Serializable doWorkInCurrentTransaction(Connection conn, String sql) throws SQLException Implements abstract org. Get the next value.
| |
| generate | back to summary |
|---|---|
| public synchronized Serializable generate(SessionImplementor session, Object object) Implements org. Doc from org. Generate a new identifier.
| |
| generateHolder | back to summary |
|---|---|
| protected IntegralDataTypeHolder generateHolder(SessionImplementor session) | |
| generatorKey | back to summary |
|---|---|
| public Object generatorKey() Implements org. Doc from org. Return a key unique to the underlying database objects. Prevents us from trying to create/remove them multiple times.
| |
| sqlCreateStrings | back to summary |
|---|---|
| public String[] sqlCreateStrings(Dialect dialect) throws HibernateException Implements org. Doc from org. The SQL required to create the underlying database objects.
| |
| sqlDropStrings | back to summary |
|---|---|
| public String[] sqlDropStrings(Dialect dialect) Implements org. Doc from org. The SQL required to remove the underlying database objects. | |