org.usergrid.persistence.cassandra
Class IndexUpdate

java.lang.Object
  extended by org.usergrid.persistence.cassandra.IndexUpdate

public class IndexUpdate
extends Object


Nested Class Summary
 class IndexUpdate.IndexEntry
           
static class IndexUpdate.UniqueIndexEntry
           
 
Field Summary
static int INDEX_STRING_VALUE_LENGTH
           
static byte VALUE_CODE_BYTES
           
static byte VALUE_CODE_INT
           
static byte VALUE_CODE_MAX
           
static byte VALUE_CODE_UTF8
           
static byte VALUE_CODE_UUID
           
 
Constructor Summary
IndexUpdate(me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> batch, Entity entity, String entryName, Object entryValue, boolean schemaHasProperty, boolean isMultiValue, boolean removeListEntry, UUID timestampUuid)
           
 
Method Summary
 void addIndex(String index)
           
 void addNewEntry(String path, Object value)
           
 void addPrevEntry(String path, Object value, UUID timestamp, ByteBuffer ledgerValue)
           
static int compareIndexedValues(Object o1, Object o2)
           
 UUID getAssociatedId()
           
 me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> getBatch()
           
 Entity getEntity()
           
 String getEntryName()
           
 Object getEntryValue()
           
 UUID getId()
           
 Set<String> getIndexesSet()
           
 List<IndexUpdate.IndexEntry> getNewEntries()
           
 List<IndexUpdate.IndexEntry> getPrevEntries()
           
 long getTimestamp()
           
 UUID getTimestampUuid()
           
static byte indexValueCode(Object obj)
           
 boolean isMultiValue()
           
 boolean isRemoveListEntry()
           
 boolean isSchemaHasProperty()
           
 void setAssociatedId(UUID associatedId)
           
 void setBatch(me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> batch)
           
 void setEntity(Entity entity)
           
 void setEntryName(String entryName)
           
 void setEntryValue(Object entryValue)
           
 void setMultiValue(boolean isMultiValue)
           
 void setRemoveListEntry(boolean removeListEntry)
           
 void setSchemaHasProperty(boolean schemaHasProperty)
           
 void setTimestamp(long timestamp)
           
static Object toIndexableValue(Object obj)
           
static boolean validIndexableValue(Object obj)
           
static boolean validIndexableValueOrJson(Object obj)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VALUE_CODE_BYTES

public static final byte VALUE_CODE_BYTES
See Also:
Constant Field Values

VALUE_CODE_UTF8

public static final byte VALUE_CODE_UTF8
See Also:
Constant Field Values

VALUE_CODE_UUID

public static final byte VALUE_CODE_UUID
See Also:
Constant Field Values

VALUE_CODE_INT

public static final byte VALUE_CODE_INT
See Also:
Constant Field Values

VALUE_CODE_MAX

public static final byte VALUE_CODE_MAX
See Also:
Constant Field Values

INDEX_STRING_VALUE_LENGTH

public static int INDEX_STRING_VALUE_LENGTH
Constructor Detail

IndexUpdate

public IndexUpdate(me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> batch,
                   Entity entity,
                   String entryName,
                   Object entryValue,
                   boolean schemaHasProperty,
                   boolean isMultiValue,
                   boolean removeListEntry,
                   UUID timestampUuid)
Method Detail

getBatch

public me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> getBatch()

setBatch

public void setBatch(me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> batch)

getEntity

public Entity getEntity()

setEntity

public void setEntity(Entity entity)

getId

public UUID getId()

getEntryName

public String getEntryName()

setEntryName

public void setEntryName(String entryName)

getEntryValue

public Object getEntryValue()

setEntryValue

public void setEntryValue(Object entryValue)

getTimestamp

public long getTimestamp()

setTimestamp

public void setTimestamp(long timestamp)

getTimestampUuid

public UUID getTimestampUuid()

getPrevEntries

public List<IndexUpdate.IndexEntry> getPrevEntries()

addPrevEntry

public void addPrevEntry(String path,
                         Object value,
                         UUID timestamp,
                         ByteBuffer ledgerValue)

getNewEntries

public List<IndexUpdate.IndexEntry> getNewEntries()

addNewEntry

public void addNewEntry(String path,
                        Object value)

getIndexesSet

public Set<String> getIndexesSet()

addIndex

public void addIndex(String index)

isSchemaHasProperty

public boolean isSchemaHasProperty()

setSchemaHasProperty

public void setSchemaHasProperty(boolean schemaHasProperty)

isMultiValue

public boolean isMultiValue()

setMultiValue

public void setMultiValue(boolean isMultiValue)

isRemoveListEntry

public boolean isRemoveListEntry()

setRemoveListEntry

public void setRemoveListEntry(boolean removeListEntry)

setAssociatedId

public void setAssociatedId(UUID associatedId)

getAssociatedId

public UUID getAssociatedId()

toIndexableValue

public static Object toIndexableValue(Object obj)
Parameters:
obj -
Returns:

validIndexableValue

public static boolean validIndexableValue(Object obj)

validIndexableValueOrJson

public static boolean validIndexableValueOrJson(Object obj)

indexValueCode

public static byte indexValueCode(Object obj)

compareIndexedValues

public static int compareIndexedValues(Object o1,
                                       Object o2)


Copyright © 2013. All Rights Reserved.