planetj.database.field
Class FieldIncrementor

java.lang.Object
  extended byplanetj.database.field.FieldIncrementor
All Implemented Interfaces:
IFieldIncrementor
Direct Known Subclasses:
WOWFieldIncrementor

public class FieldIncrementor
extends java.lang.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.
 java.lang.Object getNextValue(Field pField)
          Gets the next value of a field for which the auto-increment value is true.
 java.lang.Object getNextValue(FieldDescriptorRow pFD)
          Gets the next value of a field for which the auto-increment value is true.
 java.lang.Object getNextValue(FieldDescriptorRow pFD, Table pTable)
          Gets the next value of a field for which the auto-increment value is true.
 void setLastValue(Field pField, java.lang.Object pLastValue)
          Sets the last value of a field for which the auto-increment value is true.
 void setNextValue(Field field, java.lang.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
Throws:
CMException

getNextValue

public java.lang.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
Throws:
CMException

getNextValue

public java.lang.Object getNextValue(FieldDescriptorRow pFD,
                                     Table pTable)
                              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
Throws:
CMException

getNextValue

public java.lang.Object getNextValue(FieldDescriptorRow pFD)
                              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
Throws:
CMException

setLastValue

public void setLastValue(Field pField,
                         java.lang.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
Throws:
CMException

setNextValue

public void setNextValue(Field field,
                         java.lang.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
Throws:
CMException

singleton

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