org.hibernate.id.enhanced
Class TableGenerator
- Configurable, IdentifierGenerator, PersistentIdentifierGenerator
public class TableGenerator
An enhanced version of explicit table-based generator. The main basis
conceptualization is similiar to the legacy
MultipleHiLoPerTableGenerator
in terms of the
underlying storage structure (namely a single table capable of holding
multiple generator values). The differentiator is, as with
SequenceStyleGenerator
as well, the externalization of the notion
of an optimizer.
Configuration parameters:
DEFAULT_INCREMENT_SIZE
public static final int DEFAULT_INCREMENT_SIZE
DEFAULT_INITIAL_VALUE
public static final int DEFAULT_INITIAL_VALUE
DEF_SEGMENT_COLUMN
public static final String DEF_SEGMENT_COLUMN
DEF_SEGMENT_LENGTH
public static final int DEF_SEGMENT_LENGTH
DEF_SEGMENT_VALUE
public static final String DEF_SEGMENT_VALUE
DEF_TABLE
public static final String DEF_TABLE
DEF_VALUE_COLUMN
public static final String DEF_VALUE_COLUMN
INCREMENT_PARAM
public static final String INCREMENT_PARAM
INITIAL_PARAM
public static final String INITIAL_PARAM
OPT_PARAM
public static final String OPT_PARAM
SEGMENT_COLUMN_PARAM
public static final String SEGMENT_COLUMN_PARAM
SEGMENT_LENGTH_PARAM
public static final String SEGMENT_LENGTH_PARAM
SEGMENT_VALUE_PARAM
public static final String SEGMENT_VALUE_PARAM
TABLE_PARAM
public static final String TABLE_PARAM
VALUE_COLUMN_PARAM
public static final String VALUE_COLUMN_PARAM
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
getIdentifierType
public Type getIdentifierType()
getIncrementSize
public int getIncrementSize()
getInitialValue
public int getInitialValue()
getSegmentColumnName
public String getSegmentColumnName()
getSegmentValue
public String getSegmentValue()
getSegmentValueLength
public int getSegmentValueLength()
getTableAccessCount
public long getTableAccessCount()
getTableName
public String getTableName()
getValueColumnName
public String getValueColumnName()