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 String |
DEFAULT_TABLE |
static String |
ID_TABLE |
static String |
MAX_LO |
static String |
PK_COLUMN_NAME |
static String |
PK_LENGTH_NAME |
static String |
PK_VALUE_NAME |
static String |
VALUE_COLUMN_NAME |
CATALOG, IDENTIFIER_NORMALIZER, PK, SCHEMA, SQL_STATEMENT_LOGGER, TABLE, TABLES
ENTITY_NAME
Constructor and Description |
---|
MultipleHiLoPerTableGenerator() |
Modifier and Type | Method and Description |
---|---|
void |
configure(Type type,
Properties params,
Dialect dialect)
Configure this instance, given the value of parameters
specified by the user as <param> elements.
|
Serializable |
doWorkInCurrentTransaction(Connection conn,
String sql)
The work to be done
|
Serializable |
generate(SessionImplementor session,
Object obj)
Generate a new identifier.
|
Object |
generatorKey()
Return a key unique to the underlying database objects.
|
String[] |
sqlCreateStrings(Dialect dialect)
The SQL required to create the underlying database objects.
|
String[] |
sqlDropStrings(Dialect dialect)
The SQL required to remove the underlying database objects.
|
doWorkInNewTransaction
public static final String ID_TABLE
public static final String PK_COLUMN_NAME
public static final String PK_VALUE_NAME
public static final String VALUE_COLUMN_NAME
public static final String PK_LENGTH_NAME
public static final String DEFAULT_TABLE
public static final String MAX_LO
public String[] sqlCreateStrings(Dialect dialect) throws HibernateException
PersistentIdentifierGenerator
sqlCreateStrings
in interface PersistentIdentifierGenerator
dialect
- The dialect against which to generate the create command(s)HibernateException
- problem creating the create command(s)public String[] sqlDropStrings(Dialect dialect) throws HibernateException
PersistentIdentifierGenerator
sqlDropStrings
in interface PersistentIdentifierGenerator
dialect
- The dialect against which to generate the drop command(s)HibernateException
- problem creating the drop command(s)public Object generatorKey()
PersistentIdentifierGenerator
generatorKey
in interface PersistentIdentifierGenerator
public Serializable doWorkInCurrentTransaction(Connection conn, String sql) throws SQLException
TransactionHelper
doWorkInCurrentTransaction
in class TransactionHelper
SQLException
public Serializable generate(SessionImplementor session, Object obj) throws HibernateException
IdentifierGenerator
generate
in interface IdentifierGenerator
obj
- the entity or toplevel collection for which the id is being generatedHibernateException
public void configure(Type type, Properties params, Dialect dialect) throws MappingException
Configurable
configure
in interface Configurable
params
- param values, keyed by parameter nameMappingException
Copyright © 2002-2015 Red Hat Middleware, LLC. All Rights Reserved