com.caucho.amber.idgen
Class AmberTableGenerator

java.lang.Object
  extended by com.caucho.amber.idgen.IdGenerator
      extended by com.caucho.amber.idgen.AmberTableGenerator

public class AmberTableGenerator
extends IdGenerator

Generator table.


Constructor Summary
AmberTableGenerator(AmberPersistenceUnit manager, GeneratorTableType table, java.lang.String name)
          Creates the table generator.
 
Method Summary
 long allocateGroup(AmberConnection aConn)
          Allocates the next group of ids.
 void init(AmberPersistenceUnit amberPersistenceUnit)
          Initialize the table.
 
Methods inherited from class com.caucho.amber.idgen.IdGenerator
allocate, getGroupSize, setGroupSize, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AmberTableGenerator

public AmberTableGenerator(AmberPersistenceUnit manager,
                           GeneratorTableType table,
                           java.lang.String name)
Creates the table generator.

Method Detail

allocateGroup

public long allocateGroup(AmberConnection aConn)
                   throws java.sql.SQLException
Allocates the next group of ids.

Specified by:
allocateGroup in class IdGenerator
Throws:
java.sql.SQLException

init

public void init(AmberPersistenceUnit amberPersistenceUnit)
          throws java.sql.SQLException
Initialize the table.

Throws:
java.sql.SQLException