public class TableSeqGenerator
extends org.hibernate.id.enhanced.SequenceStyleGenerator
1)具有较好的数据库移植性,支持没有sequence的数据库。
2)可以通过设置优化起进行优化
3)可以按照表名进行自动命名序列名,模式{table}_seq
| Modifier and Type | Field and Description |
|---|---|
static TableNamingStrategy |
namingStrategy
Updated by OverrideConfiguration.secondPass
|
CONFIG_PREFER_SEQUENCE_PER_ENTITY, CONFIG_SEQUENCE_PER_ENTITY_SUFFIX, DEF_SEQUENCE_NAME, DEF_SEQUENCE_SUFFIX, DEF_VALUE_COLUMN, DEFAULT_INCREMENT_SIZE, DEFAULT_INITIAL_VALUE, FORCE_TBL_PARAM, INCREMENT_PARAM, INITIAL_PARAM, OPT_PARAM, SEQUENCE_PARAM, VALUE_COLUMN_PARAM| Constructor and Description |
|---|
TableSeqGenerator() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(org.hibernate.type.Type type,
Properties params,
org.hibernate.dialect.Dialect dialect)
If the parameters do not contain a
SequenceGenerator.SEQUENCE name, we assign one
based on the table name. |
String |
getSequencePattern() |
void |
setSequencePattern(String sequencePattern) |
buildDatabaseStructure, determineAdjustedIncrementSize, determineBulkInsertionIdentifierGenerationSelectFragment, determineIncrementSize, determineInitialValue, determineOptimizationStrategy, determineSequenceName, determineValueColumnName, generate, generatorKey, getDatabaseStructure, getIdentifierType, getOptimizer, sqlCreateStrings, sqlDropStrings, supportsBulkInsertionIdentifierGenerationpublic static TableNamingStrategy namingStrategy
public void configure(org.hibernate.type.Type type,
Properties params,
org.hibernate.dialect.Dialect dialect)
SequenceGenerator.SEQUENCE name, we assign one
based on the table name.configure in interface org.hibernate.id.Configurableconfigure in class org.hibernate.id.enhanced.SequenceStyleGeneratorpublic String getSequencePattern()
public void setSequencePattern(String sequencePattern)
Copyright © 2005–2014 The Beangle Software Group. All rights reserved.