public interface Persistent extends org.apache.avro.specific.SpecificRecord, Dirtyable
Modifier and Type | Field and Description |
---|---|
static String |
DIRTY_BYTES_FIELD_NAME |
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(int fieldIndex)
Clears the field as dirty.
|
void |
clearDirty(String field)
Clears the field as dirty.
|
Tombstone |
getTombstone()
Get an object which can be used to mark this field as deleted (rather than
state unknown, which is indicated by null).
|
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(int fieldIndex)
Returns whether the field has been modified.
|
boolean |
isDirty(String field)
Returns whether the field has been modified.
|
Persistent |
newInstance()
Constructs a new instance of the object by using appropriate builder.
|
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.
|
clearDirty, isDirty
static final String DIRTY_BYTES_FIELD_NAME
void clear()
boolean isDirty(int fieldIndex)
fieldIndex
- the offset of the field in the objectboolean isDirty(String field)
field
- the name of the fieldvoid setDirty()
void setDirty(int fieldIndex)
fieldIndex
- the offset of the field in the objectvoid setDirty(String field)
field
- the name of the fieldvoid clearDirty(int fieldIndex)
fieldIndex
- the offset of the field in the objectvoid clearDirty(String field)
field
- the name of the fieldTombstone getTombstone()
List<org.apache.avro.Schema.Field> getUnmanagedFields()
Persistent newInstance()
Copyright © 2010-2015 The Apache Software Foundation. All Rights Reserved.