public class MultipleHiLoPerTableGenerator extends TransactionHelper implements PersistentIdentifierGenerator, Configurable
This implementation is not compliant with a user connection
Allowed parameters (all of them are optional):
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_TABLE |
static java.lang.String |
ID_TABLE |
static java.lang.String |
MAX_LO |
static java.lang.String |
PK_COLUMN_NAME |
static java.lang.String |
PK_LENGTH_NAME |
static java.lang.String |
PK_VALUE_NAME |
static java.lang.String |
VALUE_COLUMN_NAME |
CATALOG, IDENTIFIER_NORMALIZER, PK, SCHEMA, SQL_STATEMENT_LOGGER, TABLE, TABLESENTITY_NAME| Constructor and Description |
|---|
MultipleHiLoPerTableGenerator() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(Type type,
java.util.Properties params,
Dialect dialect)
Configure this instance, given the value of parameters
specified by the user as <param> elements.
|
java.io.Serializable |
doWorkInCurrentTransaction(java.sql.Connection conn,
java.lang.String sql)
The work to be done
|
java.io.Serializable |
generate(SessionImplementor session,
java.lang.Object obj)
Generate a new identifier.
|
java.lang.Object |
generatorKey()
Return a key unique to the underlying database objects.
|
java.lang.String[] |
sqlCreateStrings(Dialect dialect)
The SQL required to create the underlying database objects.
|
java.lang.String[] |
sqlDropStrings(Dialect dialect)
The SQL required to remove the underlying database objects.
|
doWorkInNewTransactionpublic static final java.lang.String ID_TABLE
public static final java.lang.String PK_COLUMN_NAME
public static final java.lang.String PK_VALUE_NAME
public static final java.lang.String VALUE_COLUMN_NAME
public static final java.lang.String PK_LENGTH_NAME
public static final java.lang.String DEFAULT_TABLE
public static final java.lang.String MAX_LO
public java.lang.String[] sqlCreateStrings(Dialect dialect) throws HibernateException
PersistentIdentifierGeneratorsqlCreateStrings in interface PersistentIdentifierGeneratordialect - The dialect against which to generate the create command(s)HibernateException - problem creating the create command(s)public java.lang.String[] sqlDropStrings(Dialect dialect) throws HibernateException
PersistentIdentifierGeneratorsqlDropStrings in interface PersistentIdentifierGeneratordialect - The dialect against which to generate the drop command(s)HibernateException - problem creating the drop command(s)public java.lang.Object generatorKey()
PersistentIdentifierGeneratorgeneratorKey in interface PersistentIdentifierGeneratorpublic java.io.Serializable doWorkInCurrentTransaction(java.sql.Connection conn,
java.lang.String sql)
throws java.sql.SQLException
TransactionHelperdoWorkInCurrentTransaction in class TransactionHelperjava.sql.SQLExceptionpublic java.io.Serializable generate(SessionImplementor session, java.lang.Object obj) throws HibernateException
IdentifierGeneratorgenerate in interface IdentifierGeneratorobj - the entity or toplevel collection for which the id is being generatedHibernateExceptionpublic void configure(Type type, java.util.Properties params, Dialect dialect) throws MappingException
Configurableconfigure in interface Configurableparams - param values, keyed by parameter nameMappingExceptionCopyright © 2013. All Rights Reserved.