planetj.database.field
Class FieldIncrementor

java.lang.Object
  |
  +--planetj.database.field.FieldIncrementor
All Implemented Interfaces:
IFieldIncrementor

public class FieldIncrementor
extends Object
implements IFieldIncrementor

Used to obtain the "next value" of fields for which the auto-increment value is true


Method Summary
 void clearValue(Field field)
          Clears the next value for the incrementor, which will force the incrementor to read the database to get the most current value.
 Object getNextValue(Field pField)
          Gets the next value of a field for which the auto-increment value is true.
 void setLastValue(Field pField, Object pLastValue)
          Sets the last value of a field for which the auto-increment value is true.
 void setNextValue(Field field, Object nextValue)
          Sets the next value of a field for which the auto-increment value is true.
static IFieldIncrementor singleton()
          Returns the singleton instance of this class
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

clearValue

public void clearValue(Field field)
                throws CMException
Clears the next value for the incrementor, which will force the incrementor to read the database to get the most current value.

Specified by:
clearValue in interface IFieldIncrementor
CMException

getNextValue

public Object getNextValue(Field pField)
                    throws CMException
Gets the next value of a field for which the auto-increment value is true. Currently fields containing the following types of values can be incremented:

Specified by:
getNextValue in interface IFieldIncrementor
CMException

setLastValue

public void setLastValue(Field pField,
                         Object pLastValue)
                  throws CMException
Sets the last value of a field for which the auto-increment value is true. (The next value will be one more than the value passed in). Currently fields containing the following types of values can be incremented:
This method is invoked by the DataEngine - it should not be necessary for DataEngine users to invoke this method.

Specified by:
setLastValue in interface IFieldIncrementor
CMException

setNextValue

public void setNextValue(Field field,
                         Object nextValue)
                  throws CMException
Sets the next value of a field for which the auto-increment value is true. Currently fields containing the following types of values can be incremented:
This method is invoked by the DataEngine - it should not be necessary for DataEngine users to invoke this method.

Specified by:
setNextValue in interface IFieldIncrementor
CMException

singleton

public static IFieldIncrementor singleton()
Returns the singleton instance of this class