|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hibernate.id.SequenceGenerator
public class SequenceGenerator
sequence
Generates long values using an oracle-style sequence. A higher
performance algorithm is SequenceHiLoGenerator.
Mapping parameters supported: sequence, parameters.
SequenceHiLoGenerator| Field Summary | |
|---|---|
static String |
PARAMETERS
The parameters parameter, appended to the create sequence DDL. |
static String |
SEQUENCE
The sequence parameter |
| Fields inherited from interface org.hibernate.id.PersistentIdentifierGenerator |
|---|
CATALOG, IDENTIFIER_NORMALIZER, PK, SCHEMA, TABLE, TABLES |
| Fields inherited from interface org.hibernate.id.IdentifierGenerator |
|---|
ENTITY_NAME, JPA_ENTITY_NAME |
| Constructor Summary | |
|---|---|
SequenceGenerator()
|
|
| Method Summary | |
|---|---|
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. |
String |
determineBulkInsertionIdentifierGenerationSelectFragment(Dialect dialect)
Return the select expression fragment, if any, that generates the identifier values. |
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. |
boolean |
supportsBulkInsertionIdentifierGeneration()
Given the configuration of this generator, is identifier generation as part of bulk insertion supported? IMPL NOTE : Mainly here to allow stuff like SequenceStyleGenerator which *can* support this based on configuration |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String SEQUENCE
public static final String PARAMETERS
| Constructor Detail |
|---|
public SequenceGenerator()
| Method Detail |
|---|
protected Type getIdentifierType()
public Object generatorKey()
PersistentIdentifierGenerator
generatorKey in interface PersistentIdentifierGeneratorpublic String getSequenceName()
public void configure(Type type,
Properties params,
Dialect dialect)
throws MappingException
Configurable
configure in interface Configurableparams - param values, keyed by parameter name
MappingException
public Serializable generate(SessionImplementor session,
Object obj)
IdentifierGenerator
generate in interface IdentifierGeneratorobj - the entity or toplevel collection for which the id is being generated
protected IntegralDataTypeHolder generateHolder(SessionImplementor session)
protected IntegralDataTypeHolder buildHolder()
public String[] sqlCreateStrings(Dialect dialect)
throws HibernateException
PersistentIdentifierGenerator
sqlCreateStrings 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
PersistentIdentifierGenerator
sqlDropStrings in interface PersistentIdentifierGeneratordialect - The dialect against which to generate the drop command(s)
HibernateException - problem creating the drop command(s)public boolean supportsBulkInsertionIdentifierGeneration()
BulkInsertionCapableIdentifierGenerator
supportsBulkInsertionIdentifierGeneration in interface BulkInsertionCapableIdentifierGeneratortrue if bulk insertions are supported; false otherwise.public String determineBulkInsertionIdentifierGenerationSelectFragment(Dialect dialect)
BulkInsertionCapableIdentifierGenerator
determineBulkInsertionIdentifierGenerationSelectFragment in interface BulkInsertionCapableIdentifierGeneratordialect - The dialect against which the insert will be performed.
null indicates that no fragment is needed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||