public abstract class PersistentWSBase extends Object implements Persistent
Modifier and Type | Field and Description |
---|---|
protected static Map<Class<?>,Map<String,Integer>> |
FIELD_MAP
Maps keys to their own classes
|
protected static Map<Class<?>,String[]> |
FIELDS
Maps fields to their own classes
|
DIRTY_BYTES_FIELD_NAME
Constructor and Description |
---|
PersistentWSBase() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the inner state of the object without any modification to the actual
data on the data store.
|
Persistent |
clone() |
boolean |
equals(Object o) |
String |
getField(int index)
Gets a specific field from the fields map
|
int |
getFieldIndex(String field)
Gets a field index based on the field name
|
String[] |
getFields()
Gets fields using a specific class
|
int |
hashCode() |
boolean |
isDirty()
Returns whether any of the fields of the object has been modified after
construction or loading.
|
boolean |
isDirty(int fieldIndex)
Returns whether the field has been modified.
|
boolean |
isDirty(String field)
Returns whether the field has been modified.
|
protected boolean |
isFieldEqual(int index,
Object value)
Checks if a field is equal between two objects
|
protected static void |
registerFields(Class<?> clazz,
String... fields)
Subclasses should call this function for all the persistable fields
in the class to register them.
|
String |
toString() |
finalize, getClass, notify, notifyAll, wait, wait, wait
clearDirty, clearDirty, getTombstone, getUnmanagedFields, newInstance, setDirty, setDirty, setDirty
clearDirty
protected static Map<Class<?>,Map<String,Integer>> FIELD_MAP
protected static void registerFields(Class<?> clazz, String... fields)
clazz
- the Persistent classfields
- the name of the fields of the classpublic String[] getFields()
public String getField(int index)
public int getFieldIndex(String field)
public void clear()
Persistent
clear
in interface Persistent
public boolean isDirty()
Dirtyable
public boolean isDirty(int fieldIndex)
Persistent
isDirty
in interface Persistent
fieldIndex
- the offset of the field in the objectpublic boolean isDirty(String field)
Persistent
isDirty
in interface Persistent
field
- the name of the fieldpublic Persistent clone()
protected boolean isFieldEqual(int index, Object value)
index
- value
- Copyright © 2010-2014 The Apache Software Foundation. All Rights Reserved.