Save This Page
Home » Hibernate-3.3.2.GA » org.hibernate » id » [javadoc | source]
org.hibernate.id
public class: MultipleHiLoPerTableGenerator [javadoc | source]
java.lang.Object
   org.hibernate.engine.TransactionHelper
      org.hibernate.id.MultipleHiLoPerTableGenerator

All Implemented Interfaces:
    Configurable, PersistentIdentifierGenerator

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):

Field Summary
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     
Method from org.hibernate.id.MultipleHiLoPerTableGenerator Summary:
configure,   doWorkInCurrentTransaction,   generate,   generatorKey,   sqlCreateStrings,   sqlDropStrings
Methods from org.hibernate.engine.TransactionHelper:
doWorkInCurrentTransaction,   doWorkInNewTransaction
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.hibernate.id.MultipleHiLoPerTableGenerator Detail:
 public  void configure(Type type,
    Properties params,
    Dialect dialect) throws MappingException 
 public Serializable doWorkInCurrentTransaction(Connection conn,
    String sql) throws SQLException 
 public synchronized Serializable generate(SessionImplementor session,
    Object obj) throws HibernateException 
 public Object generatorKey() 
 public String[] sqlCreateStrings(Dialect dialect) throws HibernateException 
 public String[] sqlDropStrings(Dialect dialect) throws HibernateException