public class SequenceGenerator extends java.lang.Object implements PersistentIdentifierGenerator, Configurable
SequenceHiLoGenerator
,
TableHiLoGenerator
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PARAMETERS
The parameters parameter, appended to the create sequence DDL.
|
static java.lang.String |
SEQUENCE
The sequence parameter
|
CATALOG, IDENTIFIER_NORMALIZER, PK, SCHEMA, SQL_STATEMENT_LOGGER, TABLE, TABLES
ENTITY_NAME
Constructor and Description |
---|
SequenceGenerator() |
Modifier and Type | Method and Description |
---|---|
protected IntegralDataTypeHolder |
buildHolder() |
void |
configure(Type type,
java.util.Properties params,
Dialect dialect)
Configure this instance, given the value of parameters
specified by the user as <param> elements.
|
java.io.Serializable |
generate(SessionImplementor session,
java.lang.Object obj)
Generate a new identifier.
|
protected IntegralDataTypeHolder |
generateHolder(SessionImplementor session) |
java.lang.Object |
generatorKey()
Return a key unique to the underlying database objects.
|
protected Type |
getIdentifierType() |
java.lang.String |
getSequenceName() |
java.lang.String[] |
sqlCreateStrings(Dialect dialect)
The SQL required to create the underlying database objects.
|
java.lang.String[] |
sqlDropStrings(Dialect dialect)
The SQL required to remove the underlying database objects.
|
public static final java.lang.String SEQUENCE
public static final java.lang.String PARAMETERS
protected Type getIdentifierType()
public void configure(Type type, java.util.Properties params, Dialect dialect) throws MappingException
Configurable
configure
in interface Configurable
params
- param values, keyed by parameter nameMappingException
public java.io.Serializable generate(SessionImplementor session, java.lang.Object obj)
IdentifierGenerator
generate
in interface IdentifierGenerator
obj
- the entity or toplevel collection for which the id is being generatedprotected IntegralDataTypeHolder generateHolder(SessionImplementor session)
protected IntegralDataTypeHolder buildHolder()
public java.lang.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 java.lang.String[] sqlDropStrings(Dialect dialect) throws HibernateException
PersistentIdentifierGenerator
sqlDropStrings
in interface PersistentIdentifierGenerator
dialect
- The dialect against which to generate the drop command(s)HibernateException
- problem creating the drop command(s)public java.lang.Object generatorKey()
PersistentIdentifierGenerator
generatorKey
in interface PersistentIdentifierGenerator
public java.lang.String getSequenceName()
Copyright © 2013. All Rights Reserved.