|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.axiondb.Sequence
public class Sequence
A database sequence. A sequence provides a mechanism for obtaining unique integer values from the database.
Note: If increment value is negative, then the sequence generator is a descending sequence generator; otherwise, it is an ascending sequence generator.
Note: The data type of a sequence generator must be exact numeric with scale 0.
Field Summary | |
---|---|
static int |
RADIX
|
Constructor Summary | |
---|---|
Sequence()
|
|
Sequence(String name,
DataType type,
BigInteger startVal,
BigInteger incrementBy,
BigInteger maxValue,
BigInteger minValue,
boolean isCycle)
Create a sequence with all ANSI 2003 parameters. |
|
Sequence(String name,
int startVal)
Create a sequence starting whose initial value is startVal . |
Method Summary | |
---|---|
void |
addSequenceModificationListener(SequenceModificationListener listener)
|
boolean |
equals(Object otherobject)
Returns true iff otherobject is a Sequence whose
name are equal to mine. |
Object |
evaluate()
Increment and return the next value in this sequence. |
Object |
getCuurentValue()
|
DataType |
getDataType()
|
BigInteger |
getIncrementBy()
|
BigInteger |
getMaxValue()
|
BigInteger |
getMinValue()
|
String |
getName()
Get the name of this sequence. |
Object |
getValue()
Get the current value of this sequence. |
int |
hashCode()
Returns a hash code in keeping with the standard equals /
hashCode contract. |
boolean |
isCycle()
|
void |
read(DataInput in)
|
void |
write(DataOutput out)
Writes the given value to the given DataOutput . |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int RADIX
Constructor Detail |
---|
public Sequence()
public Sequence(String name, DataType type, BigInteger startVal, BigInteger incrementBy, BigInteger maxValue, BigInteger minValue, boolean isCycle)
public Sequence(String name, int startVal)
Method Detail |
---|
public void addSequenceModificationListener(SequenceModificationListener listener)
public boolean equals(Object otherobject)
true
iff otherobject is a Sequence
whose
name are equal to mine.
equals
in class Object
public Object evaluate() throws AxionException
AxionException
public Object getCuurentValue() throws AxionException
AxionException
public DataType getDataType()
public BigInteger getIncrementBy()
public BigInteger getMaxValue()
public BigInteger getMinValue()
public String getName()
public Object getValue() throws AxionException
AxionException
public int hashCode()
equals
/
hashCode
contract.
hashCode
in class Object
public boolean isCycle()
public void read(DataInput in) throws Exception
Exception
write(java.io.DataOutput)
public void write(DataOutput out) throws IOException
DataOutput
.
value
- the value to write, which must be Sequence
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |