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