org.ujoframework.orm
Class UjoSequencer

java.lang.Object
  extended by org.ujoframework.orm.UjoSequencer

public class UjoSequencer
extends java.lang.Object

The default sequence provider. A result value is recieved from a special database table.

Author:
Pavel Ponec

Field Summary
protected  long maxValue
          Total limit, zero means no restriction
protected  long seqLimit
          Buffer limit
protected  long sequence
          Current sequence value
protected  MetaTable table
          Basic table.
 
Constructor Summary
UjoSequencer(MetaTable table)
           
 
Method Summary
 MetaDatabase getDatabase()
          Returns model of the database
 java.lang.String getDatabaseSchema()
          Returns the database schema
 int getIncrement()
          The UJO cache is the number of pre-allocated numbers inside the OrmUjo framework.
 int getInitDbCache()
          The cache of a database sequence is zero by default.
 MetaTable getTable()
          Returns a related table or null if sequence is general for the all MetaDatabase space
 long nextValue(Session session)
          Returns the next sequence value by a synchronized method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

table

protected final MetaTable table
Basic table.


sequence

protected long sequence
Current sequence value


seqLimit

protected long seqLimit
Buffer limit


maxValue

protected long maxValue
Total limit, zero means no restriction

Constructor Detail

UjoSequencer

public UjoSequencer(MetaTable table)
Method Detail

nextValue

public long nextValue(Session session)
Returns the next sequence value by a synchronized method.


getDatabaseSchema

public java.lang.String getDatabaseSchema()
Returns the database schema


getIncrement

public int getIncrement()
The UJO cache is the number of pre-allocated numbers inside the OrmUjo framework.


getInitDbCache

public int getInitDbCache()
The cache of a database sequence is zero by default.


getDatabase

public MetaDatabase getDatabase()
Returns model of the database


getTable

public MetaTable getTable()
Returns a related table or null if sequence is general for the all MetaDatabase space



Copyright © 2010. All Rights Reserved.