com.amazon.carbonado.sequence
Interface StoredSequence

All Superinterfaces:
Storable<StoredSequence>

@PrimaryKey(value="name")
@Authoritative
@Independent
@Alias(value={"CARBONADO_SEQUENCE","Carbonado_Sequence","carbonado_sequence","CarbonadoSequence","carbonadoSequence"})
public interface StoredSequence
extends Storable<StoredSequence>

Stores data for SequenceValueGenerator. To use with JDBC repository, create a table like so:

 CREATE TABLE CARBONADO_SEQUENCE (
     NAME           VARCHAR(100) PRIMARY KEY,
     INITIAL_VALUE  BIGINT       NOT NULL,
     NEXT_VALUE     BIGINT       NOT NULL,
     VERSION        INT          NOT NULL
 )
 

Since:
1.2
Author:
Brian S O'Neill

Method Summary
 long getInitialValue()
          Returns the initial value for the sequence.
 String getName()
           
 long getNextValue()
          Returns the pre-adjusted next value of the sequence.
 int getVersion()
           
 void setInitialValue(long value)
           
 void setName(String name)
           
 void setNextValue(long value)
           
 void setVersion(int version)
           
 
Methods inherited from interface com.amazon.carbonado.Storable
copy, copyAllProperties, copyDirtyProperties, copyPrimaryKeyProperties, copyUnequalProperties, copyVersionProperty, delete, equalPrimaryKeys, equalProperties, equals, getPropertyValue, hasDirtyProperties, hashCode, insert, isPropertyClean, isPropertyDirty, isPropertySupported, isPropertyUninitialized, load, markAllPropertiesClean, markAllPropertiesDirty, markPropertiesClean, markPropertiesDirty, prepare, propertyMap, readFrom, setPropertyValue, storableType, toString, toStringKeyOnly, tryDelete, tryInsert, tryLoad, tryUpdate, update, writeTo
 

Method Detail

getName

@Alias(value={"NAME","Name","name"})
String getName()

setName

void setName(String name)

getInitialValue

@Alias(value={"INITIAL_VALUE","Initial_Value","initial_value","InitialValue","initialValue"})
long getInitialValue()
Returns the initial value for the sequence.


setInitialValue

void setInitialValue(long value)

getNextValue

@Alias(value={"NEXT_VALUE","Next_Value","next_value","NextValue","nextValue"})
long getNextValue()
Returns the pre-adjusted next value of the sequence. This value is initially Long.MIN_VALUE, and it increments up to Long.MAX_VALUE. The actual next value for the sequence is: (getNextValue() + Long.MIN_VALUE + getInitialValue()).


setNextValue

void setNextValue(long value)

getVersion

@Alias(value={"VERSION","Version","version"})
@Version
int getVersion()

setVersion

void setVersion(int version)


Copyright © 2006-2009 Amazon Technologies, Inc.. All Rights Reserved.