public class OgmTableGenerator extends OgmGeneratorBase implements Configurable
TableGenerator. Refer to its JavaDoc for some design
considerations.
| NAME | DEFAULT | DESCRIPTION |
TABLE_PARAM |
DEF_TABLE |
The name of the table to use to store/retrieve values |
VALUE_COLUMN_PARAM |
DEF_VALUE_COLUMN |
The name of column which holds the sequence value for the given segment |
SEGMENT_COLUMN_PARAM |
DEF_SEGMENT_COLUMN |
The name of the column which holds the segment key |
SEGMENT_VALUE_PARAM |
DEF_SEGMENT_VALUE |
The value indicating which segment is used by this generator; refers to values in the
SEGMENT_COLUMN_PARAM column |
OgmGeneratorBase.INITIAL_PARAM |
OgmGeneratorBase.DEFAULT_INITIAL_VALUE |
The initial value to be stored for the given segment |
OgmGeneratorBase.INCREMENT_PARAM |
OgmGeneratorBase.DEFAULT_INCREMENT_SIZE |
The increment size for the underlying segment; see the discussion on Optimizer
for more details. |
OgmGeneratorBase.OPT_PARAM |
depends on defined increment size | Allows explicit definition of which optimization strategy to use |
| Modifier and Type | Field and Description |
|---|---|
static String |
CONFIG_PREFER_SEGMENT_PER_ENTITY |
static String |
DEF_SEGMENT_COLUMN |
static String |
DEF_SEGMENT_VALUE |
static String |
DEF_TABLE |
static String |
DEF_VALUE_COLUMN |
static String |
SEGMENT_COLUMN_PARAM |
static String |
SEGMENT_VALUE_PARAM |
static String |
TABLE_PARAM |
static String |
VALUE_COLUMN_PARAM |
DEFAULT_INCREMENT_SIZE, DEFAULT_INITIAL_VALUE, INCREMENT_PARAM, INITIAL_PARAM, OPT_PARAMENTITY_NAME, JPA_ENTITY_NAME| Constructor and Description |
|---|
OgmTableGenerator() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(Type type,
Properties params,
ServiceRegistry serviceRegistry) |
IdSourceKeyMetadata |
getGeneratorKeyMetadata()
Returns an identifier representing the persistent structure which this generator is based upon, e.g.
|
Type |
getIdentifierType()
Type mapping for the identifier.
|
String |
getSegmentColumnName()
The name of the column in which we store the segment to which each row
belongs.
|
String |
getTableName()
The name of the table in which we store this generator's persistent state.
|
generate, getIncrementSize, getInitialValuepublic static final String CONFIG_PREFER_SEGMENT_PER_ENTITY
public static final String TABLE_PARAM
public static final String DEF_TABLE
public static final String VALUE_COLUMN_PARAM
public static final String DEF_VALUE_COLUMN
public static final String SEGMENT_COLUMN_PARAM
public static final String DEF_SEGMENT_COLUMN
public static final String SEGMENT_VALUE_PARAM
public static final String DEF_SEGMENT_VALUE
public IdSourceKeyMetadata getGeneratorKeyMetadata()
PersistentNoSqlIdentifierGeneratorgetGeneratorKeyMetadata in interface PersistentNoSqlIdentifierGeneratorpublic final Type getIdentifierType()
public final String getTableName()
public final String getSegmentColumnName()
public void configure(Type type, Properties params, ServiceRegistry serviceRegistry) throws MappingException
configure in interface Configurableconfigure in class OgmGeneratorBaseMappingExceptionCopyright © 2010-2017 Red Hat, Inc., Emmanuel Bernard and various contributors. All Rights Reserved.