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 seqLimit
           
protected  long sequence
           
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.
 java.lang.String getSequenceName()
          Returns the sequence name
 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

seqLimit

protected long seqLimit
Constructor Detail

UjoSequencer

public UjoSequencer(MetaTable table)
Method Detail

nextValue

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


getSequenceName

public java.lang.String getSequenceName()
Returns the sequence name


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 © 2009. All Rights Reserved.