org.ujorm.orm
Class NativeDbSequencer

java.lang.Object
  extended by org.ujorm.orm.UjoSequencer
      extended by org.ujorm.orm.NativeDbSequencer

public class NativeDbSequencer
extends UjoSequencer

Support for the native database sequences. The sequence name can be specified in the parameter Table.sequence().


Field Summary
 
Fields inherited from class org.ujorm.orm.UjoSequencer
maxValue, SEQ_LIMIT, SEQ_MAX_VALUE, SEQ_STEP, seqLimit, sequence, table
 
Constructor Summary
NativeDbSequencer(MetaTable table)
          Required constructor
 
Method Summary
 String createNextSequence(String sequenceName)
          Create a SQL script for the NEXT SEQUENCE from a native database sequencer
 long nextValue(Session session)
          Returns the next sequence value by a synchronized method.
 
Methods inherited from class org.ujorm.orm.UjoSequencer
executeSql, getCurrentDBSequence, getDatabase, getDatabaseSchema, getIncrement, getInitDbCache, getTable, isSequenceTableRequired, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NativeDbSequencer

public NativeDbSequencer(MetaTable table)
Required constructor

Method Detail

nextValue

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

Overrides:
nextValue in class UjoSequencer

createNextSequence

public String createNextSequence(String sequenceName)
                          throws IOException
Create a SQL script for the NEXT SEQUENCE from a native database sequencer

Throws:
IOException


Copyright 2013, Pavel Ponec