public class FieldModifier extends Object implements Encodable, DatabaseTypes, DataValidator
| Modifier and Type | Field and Description |
|---|---|
int |
fieldID |
int |
fieldType |
String |
modifiedData |
int |
modifier |
BOOLEAN, BYTE_ARRAY, CREATED_FIELD, DATE, DATE_TIME, DECIMAL, DOUBLE, FIRST_SPECIAL_FIELD, FLAG_SYNCHRONIZED, FLAGS_FIELD, INTEGER, JAVA_OBJECT, LONG, MAX_ID, MODIFIED_BY_FIELD, MODIFIED_FIELD, NAME_FIELD, OBJECT_BYTES_FIELD, OBJECT_TEXT_FIELD, OID_FIELD, OPTION_ERROR_ON_NEED_REINDEX, PLAIN_DATE, PLAIN_TIME, reservedFieldHeaders, reservedFieldIDs, reservedFieldNames, reservedFieldTypes, SORT_DATE_ONLY, SORT_IGNORE_CASE, SORT_TIME_ONLY, SORT_UNKNOWN_IS_GREATER_THAN_KNOWN, SORT_UNKNOWN_IS_LESS_THAN_KNOWN, STRING, TIME, TIMESTAMP| Constructor and Description |
|---|
FieldModifier() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
decodeAfterReading(Database db) |
protected int |
getNextInteger() |
void |
modify(DatabaseEntry newData,
DatabaseEntry oldData) |
void |
set(Database db,
int fieldID,
int modifier,
Object data) |
void |
validateEntry(Database db,
DatabaseEntry newData,
DatabaseEntry oldData)
This method can be used to either alter data before it is saved into the database or
to abort a particular operation by throwing an InvalidDataException.
|
public int fieldID
public int fieldType
public int modifier
public String modifiedData
public boolean decodeAfterReading(Database db) throws IOException
IOExceptionprotected int getNextInteger()
throws IOException
IOExceptionpublic void modify(DatabaseEntry newData, DatabaseEntry oldData) throws IOException
IOExceptionpublic void validateEntry(Database db, DatabaseEntry newData, DatabaseEntry oldData) throws IOException
DataValidatorThis method is called under four circumstances.
validateEntry in interface DataValidatordb - The Database that holds the data.newData - The data being saved or changed or read. If you need to modify the data,
then modify this parameter.oldData - The original data before the change or deletion.IOException