org.axiondb
Class Sequence

java.lang.Object
  extended by org.axiondb.NamedIdentifier
      extended by org.axiondb.Literal
          extended by org.axiondb.Sequence
All Implemented Interfaces:
Serializable, Selectable

public class Sequence
extends Literal
implements Selectable

A database sequence. A sequence provides a mechanism for obtaining unique integer values from the database.

Version:
$Revision: 1.10 $ $Date: 2004/08/27 03:21:20 $
See Also:
Serialized Form

Constructor Summary
Sequence(String name)
          Create a equence starting whose initial value is 0.
Sequence(String name, int startVal)
          Create a equence starting whose initial value is startVal .
 
Method Summary
 void addSequenceModificationListener(SequenceModificationListener listener)
           
 Object evaluate()
          Increment and return the next value in this sequence.
 String getName()
          Get the name of this sequence.
 Object getValue()
          Get the current value of this sequence.
 
Methods inherited from class org.axiondb.Literal
equals, evaluate, getAlias, getDataType, getLabel, hashCode, setAlias, setDataType, setValue, setVariableContext, toString
 
Methods inherited from class org.axiondb.NamedIdentifier
toUpperOrNull
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.axiondb.Selectable
evaluate, getAlias, getDataType, getLabel, setVariableContext
 

Constructor Detail

Sequence

public Sequence(String name)
Create a equence starting whose initial value is 0.


Sequence

public Sequence(String name,
                int startVal)
Create a equence starting whose initial value is startVal .

Method Detail

addSequenceModificationListener

public void addSequenceModificationListener(SequenceModificationListener listener)

evaluate

public Object evaluate()
                throws AxionException
Increment and return the next value in this sequence.

Overrides:
evaluate in class Literal
Throws:
AxionException

getName

public String getName()
Get the name of this sequence.

Specified by:
getName in interface Selectable
Overrides:
getName in class Literal

getValue

public Object getValue()
                throws AxionException
Get the current value of this sequence.

Overrides:
getValue in class Literal
Throws:
AxionException