| java.lang.Object | ||
| ↳ | org.hibernate.engine.TransactionHelper | |
| ↳ | org.hibernate.id.MultipleHiLoPerTableGenerator | |
A hilo IdentifierGenerator that returns a Long, constructed using
 a hi/lo algorithm. The hi value MUST be fetched in a seperate transaction
 to the Session transaction so the generator must be able to obtain
 a new connection and commit it. Hence this implementation may not
 be used  when the user is supplying connections. In this
 case a SequenceHiLoGenerator would be a better choice (where
 supported).
 
 A hilo IdentifierGenerator that uses a database
 table to store the last generated values. A table can contains
 several hi values. They are distinct from each other through a key
 
This implementation is not compliant with a user connection
Allowed parameters (all of them are optional):
| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| String | DEFAULT_TABLE | ||||||||||
| String | ID_TABLE | ||||||||||
| String | MAX_LO | ||||||||||
| String | PK_COLUMN_NAME | ||||||||||
| String | PK_LENGTH_NAME | ||||||||||
| String | PK_VALUE_NAME | ||||||||||
| String | VALUE_COLUMN_NAME | ||||||||||
| 
  [Expand]
   Inherited Constants  | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
   From interface
org.hibernate.id.IdentifierGenerator
 | |||||||||||
   From interface
org.hibernate.id.PersistentIdentifierGenerator
 | |||||||||||
| 
  [Expand]
   Inherited Fields  | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
   From interface
org.hibernate.id.PersistentIdentifierGenerator
 | |||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Configure this instance, given the value of parameters
 specified by the user as <param> elements. 
  
   | |||||||||||
The work to be done
 
  
   | |||||||||||
Generate a new identifier. 
  
   | |||||||||||
Return a key unique to the underlying database objects. 
  
   | |||||||||||
The SQL required to create the underlying database objects. 
  
   | |||||||||||
The SQL required to remove the underlying database objects. 
  
   | |||||||||||
| 
  [Expand]
   Inherited Methods  | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
   
From class
  org.hibernate.engine.TransactionHelper
 | |||||||||||
   
From class
  java.lang.Object
 | |||||||||||
   
From interface
  org.hibernate.id.Configurable
 | |||||||||||
   
From interface
  org.hibernate.id.IdentifierGenerator
 | |||||||||||
   
From interface
  org.hibernate.id.PersistentIdentifierGenerator
 | |||||||||||
Configure this instance, given the value of parameters specified by the user as <param> elements. This method is called just once, following instantiation.
| params | param values, keyed by parameter name | 
|---|
| MappingException | 
|---|
The work to be done
| SQLException | 
|---|
Generate a new identifier.
| obj | the entity or toplevel collection for which the id is being generated | 
|---|
| HibernateException | 
|---|
Return a key unique to the underlying database objects. Prevents us from trying to create/remove them multiple times.
The SQL required to create the underlying database objects.
| dialect | The dialect against which to generate the create command(s) | 
|---|
| HibernateException | 
|---|
The SQL required to remove the underlying database objects.
| dialect | The dialect against which to generate the drop command(s) | 
|---|
| HibernateException | 
|---|