SequenceStyleGenerator
instead.@Deprecated public class TableGenerator extends Object implements PersistentIdentifierGenerator, Configurable
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, columnTableHiLoGenerator
Modifier and Type | Field and Description |
---|---|
static String |
COLUMN
Deprecated.
The column parameter
|
static String |
DEFAULT_COLUMN_NAME
Deprecated.
Default column name
|
static String |
DEFAULT_TABLE_NAME
Deprecated.
Default table name
|
static String |
TABLE
Deprecated.
The table parameter
|
CATALOG, IDENTIFIER_NORMALIZER, PK, SCHEMA, TABLES
ENTITY_NAME, JPA_ENTITY_NAME
Constructor and Description |
---|
TableGenerator()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected IntegralDataTypeHolder |
buildHolder()
Deprecated.
|
void |
configure(Type type,
Properties params,
Dialect dialect)
Deprecated.
Configure this instance, given the value of parameters
specified by the user as <param> elements.
|
Serializable |
generate(SessionImplementor session,
Object object)
Deprecated.
Generate a new identifier.
|
protected IntegralDataTypeHolder |
generateHolder(SessionImplementor session)
Deprecated.
|
Object |
generatorKey()
Deprecated.
Return a key unique to the underlying database objects.
|
String[] |
sqlCreateStrings(Dialect dialect)
Deprecated.
The SQL required to create the underlying database objects.
|
String[] |
sqlDropStrings(Dialect dialect)
Deprecated.
The SQL required to remove the underlying database objects.
|
public static final String COLUMN
public static final String DEFAULT_COLUMN_NAME
public static final String TABLE
public static final String DEFAULT_TABLE_NAME
public void configure(Type type, Properties params, Dialect dialect)
Configurable
configure
in interface Configurable
params
- param values, keyed by parameter namepublic Serializable generate(SessionImplementor session, Object object)
IdentifierGenerator
generate
in interface IdentifierGenerator
session
- The session from which the request originatesobject
- the entity or collection (idbag) for which the id is being generatedprotected IntegralDataTypeHolder generateHolder(SessionImplementor session)
public String[] sqlCreateStrings(Dialect dialect) throws HibernateException
PersistentIdentifierGenerator
sqlCreateStrings
in interface PersistentIdentifierGenerator
dialect
- The dialect against which to generate the create command(s)HibernateException
- problem creating the create command(s)public String[] sqlDropStrings(Dialect dialect)
PersistentIdentifierGenerator
sqlDropStrings
in interface PersistentIdentifierGenerator
dialect
- The dialect against which to generate the drop command(s)public Object generatorKey()
PersistentIdentifierGenerator
generatorKey
in interface PersistentIdentifierGenerator
protected IntegralDataTypeHolder buildHolder()
Copyright © 2001-2015 Red Hat, Inc. All Rights Reserved.