com.caucho.amber.idgen
Class SequenceIdGenerator

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

public class SequenceIdGenerator
extends IdGenerator

Generator table.


Constructor Summary
SequenceIdGenerator(AmberPersistenceUnit manager, java.lang.String name, int size)
          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

SequenceIdGenerator

public SequenceIdGenerator(AmberPersistenceUnit manager,
                           java.lang.String name,
                           int size)
                    throws ConfigException
Creates the table generator.

Throws:
ConfigException
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