|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.sf.hibernate.id.SequenceGenerator
sequence
Generates long values using an oracle-style sequence. A higher
performance algorithm is SequenceHiLoGenerator.
Mapping parameters supported: sequence, parameters.
The parameters parameter is appended to the create sequence DDL.
For example (Oracle): INCREMENT BY 1 START WITH 1 MAXVALUE 100 NOCACHE.
SequenceHiLoGenerator,
TableHiLoGenerator| Field Summary | |
static String |
PARAMETERS
|
static String |
SEQUENCE
|
| Fields inherited from interface net.sf.hibernate.id.PersistentIdentifierGenerator |
PK, SCHEMA, TABLE |
| Constructor Summary | |
SequenceGenerator()
|
|
| Method Summary | |
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. |
Object |
generatorKey()
Return a key unique to the underlying database objects. |
String[] |
sqlCreateStrings(Dialect dialect)
The SQL required to create the underlying database objects. |
String |
sqlDropString(Dialect dialect)
The SQL required to remove the underlying database objects. |
| 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 |
public void configure(Type type, Properties params, Dialect dialect) throws MappingException
Configurable
configure in interface Configurableparams - param values, keyed by parameter name
MappingExceptionpublic Serializable generate(SessionImplementor session, Object obj) throws SQLException, HibernateException
IdentifierGenerator
generate in interface IdentifierGeneratorsession - obj - the entity or toplevel collection for which the id is being generated
SQLException
HibernateExceptionpublic String[] sqlCreateStrings(Dialect dialect) throws HibernateException
PersistentIdentifierGenerator
sqlCreateStrings in interface PersistentIdentifierGeneratordialect -
HibernateExceptionpublic String sqlDropString(Dialect dialect) throws HibernateException
PersistentIdentifierGenerator
sqlDropString in interface PersistentIdentifierGeneratordialect -
HibernateExceptionpublic Object generatorKey()
PersistentIdentifierGenerator
generatorKey in interface PersistentIdentifierGenerator
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||