org.hibernate.id
Class SequenceGenerator
java.lang.Object
org.hibernate.id.SequenceGenerator
- Configurable, IdentifierGenerator, PersistentIdentifierGenerator
public class SequenceGenerator
extends java.lang.Object
sequence
Generates long values using an oracle-style sequence. A higher
performance algorithm is SequenceHiLoGenerator.
Mapping parameters supported: sequence, parameters.
static String | PARAMETERS - The parameters parameter, appended to the create sequence DDL.
|
static String | SEQUENCE - The sequence parameter
|
PARAMETERS
public static final String PARAMETERS
The parameters parameter, appended to the create sequence DDL.
For example (Oracle): INCREMENT BY 1 START WITH 1 MAXVALUE 100 NOCACHE.
SEQUENCE
public static final String SEQUENCE
The sequence parameter
configure
public void configure(Type type,
Properties params,
Dialect dialect)
throws MappingException
Configure this instance, given the value of parameters
specified by the user as <param> elements.
This method is called just once, following instantiation.
- configure in interface Configurable
params
- param values, keyed by parameter name
getSequenceName
public String getSequenceName()