public abstract class PersistentBase extends org.apache.avro.specific.SpecificRecordBase implements Persistent
Modifier and Type | Class and Description |
---|---|
static class |
PersistentBase.PersistentData |
DIRTY_BYTES_FIELD_NAME
Constructor and Description |
---|
PersistentBase() |
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.
|
void |
clearDirty()
Clears the dirty state.
|
void |
clearDirty(int fieldIndex)
Clears the field as dirty.
|
void |
clearDirty(String field)
Clears the field as dirty.
|
boolean |
equals(Object that) |
List<org.apache.avro.Schema.Field> |
getUnmanagedFields()
Get a list of fields from this persistent object's schema that are not
managed by Gora.
|
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 fieldName)
Returns whether the field has been modified.
|
void |
setDirty()
Sets all the fields of the object as dirty.
|
void |
setDirty(int fieldIndex)
Sets the field as dirty.
|
void |
setDirty(String field)
Sets the field as dirty.
|
compareTo, get, getSchema, hashCode, put, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getTombstone, newInstance
public void clearDirty()
Dirtyable
clearDirty
in interface Dirtyable
public void clearDirty(int fieldIndex)
Persistent
clearDirty
in interface Persistent
fieldIndex
- the offset of the field in the objectpublic void clearDirty(String field)
Persistent
clearDirty
in interface Persistent
field
- the name of the fieldpublic 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 fieldName)
Persistent
isDirty
in interface Persistent
fieldName
- the name of the fieldpublic void setDirty()
Persistent
setDirty
in interface Persistent
public void setDirty(int fieldIndex)
Persistent
setDirty
in interface Persistent
fieldIndex
- the offset of the field in the objectpublic void setDirty(String field)
Persistent
setDirty
in interface Persistent
field
- the name of the fieldpublic void clear()
Persistent
clear
in interface Persistent
public boolean equals(Object that)
equals
in class org.apache.avro.specific.SpecificRecordBase
public List<org.apache.avro.Schema.Field> getUnmanagedFields()
Persistent
getUnmanagedFields
in interface Persistent
Copyright © 2010-2014 The Apache Software Foundation. All Rights Reserved.