public class KeyValue
extends java.lang.Object
implements org.ojai.Value, java.lang.Cloneable
| Modifier and Type | Field and Description |
|---|---|
static byte |
ArrayIndexTypeMask |
static byte |
ArrayIndexTypeShift |
static byte |
IsArrayElementMask |
static byte |
IsArrayElementShift |
static byte |
IsRootMask |
static byte |
IsRootShift |
protected java.lang.Object |
objValue |
protected byte |
opType |
protected long |
primValue |
protected byte |
type_ |
TYPE_CODE_ARRAY, TYPE_CODE_BINARY, TYPE_CODE_BOOLEAN, TYPE_CODE_BYTE, TYPE_CODE_DATE, TYPE_CODE_DECIMAL, TYPE_CODE_DOUBLE, TYPE_CODE_FLOAT, TYPE_CODE_INT, TYPE_CODE_INTERVAL, TYPE_CODE_LONG, TYPE_CODE_MAP, TYPE_CODE_NULL, TYPE_CODE_SHORT, TYPE_CODE_STRING, TYPE_CODE_TIME, TYPE_CODE_TIMESTAMP| Constructor and Description |
|---|
KeyValue() |
KeyValue(org.ojai.Value.Type type) |
| Modifier and Type | Method and Description |
|---|---|
org.ojai.DocumentReader |
asReader() |
protected void |
checkType(org.ojai.Value.Type t) |
KeyValue |
clone() |
boolean |
equals(java.lang.Object obj) |
com.mapr.db.rowcol.ArrayIndexDescriptor.ArrayIndexType |
getArrayIndexType() |
java.nio.ByteBuffer |
getBinary() |
boolean |
getBoolean() |
byte |
getByte() |
int |
getCFRootId() |
org.ojai.types.ODate |
getDate() |
int |
getDateAsInt() |
java.math.BigDecimal |
getDecimal() |
double |
getDouble() |
float |
getFloat() |
int |
getInt() |
org.ojai.types.OInterval |
getInterval() |
long |
getIntervalAsLong() |
java.util.List<java.lang.Object> |
getList() |
long |
getLong() |
java.util.Map<java.lang.String,java.lang.Object> |
getMap() |
java.lang.Object |
getObject() |
InsertContext.OpType |
getOpType() |
int |
getOrderOfField() |
protected long |
getPrimValue() |
org.ojai.Document |
getRecord() |
short |
getShort() |
java.lang.String |
getString() |
org.ojai.types.OTime |
getTime() |
int |
getTimeAsInt() |
byte |
getTimeDescriptor() |
org.ojai.types.OTimestamp |
getTimestamp() |
long |
getTimestampAsLong() |
org.ojai.Value.Type |
getType() |
boolean |
isArrayElement() |
boolean |
isContainerType() |
boolean |
isPartOfNonDefaultColumnFamily() |
boolean |
isRoot() |
boolean |
isRootOfColumnFamily() |
void |
restoreKVOrder(java.util.Map<java.lang.Integer,java.lang.String> idToCFNameMap) |
void |
setArrayIndex(com.mapr.db.rowcol.ArrayIndexDescriptor.ArrayIndexType type,
int index) |
void |
setArrayIndexType(com.mapr.db.rowcol.ArrayIndexDescriptor.ArrayIndexType type) |
void |
setCFRootId(int id) |
void |
setIsArrayElement(boolean v) |
void |
setIsRoot() |
protected void |
setObjValue(java.lang.Object objValue) |
void |
setOpTypeAndFlags(InsertContext ctx,
boolean isLastElement) |
void |
setOrderOfField(int i) |
void |
setPartOfNonDefaultColumnFamily(boolean b) |
protected void |
setPrimValue(long primValue) |
void |
setRecursiveNonDefaultColumnFamily(boolean b,
int cfId) |
void |
setRootFlags(InsertContext ctx) |
void |
setRootOfColumnFamily(boolean b) |
KeyValue |
shallowCopy() |
java.lang.String |
toString() |
void |
toString(java.lang.StringBuilder buf) |
java.lang.String |
toStringWithTimestamp() |
void |
valueToString(java.lang.StringBuilder buf) |
protected long primValue
protected java.lang.Object objValue
protected byte type_
protected byte opType
public static final byte IsArrayElementMask
public static final byte IsArrayElementShift
public static final byte ArrayIndexTypeMask
public static final byte ArrayIndexTypeShift
public static final byte IsRootMask
public static final byte IsRootShift
public void setIsArrayElement(boolean v)
public boolean isArrayElement()
public void setArrayIndexType(com.mapr.db.rowcol.ArrayIndexDescriptor.ArrayIndexType type)
public com.mapr.db.rowcol.ArrayIndexDescriptor.ArrayIndexType getArrayIndexType()
public void setOrderOfField(int i)
public int getOrderOfField()
public void setRootOfColumnFamily(boolean b)
public boolean isRootOfColumnFamily()
public void setCFRootId(int id)
public int getCFRootId()
public void setPartOfNonDefaultColumnFamily(boolean b)
public boolean isPartOfNonDefaultColumnFamily()
public boolean isContainerType()
public InsertContext.OpType getOpType()
public byte getTimeDescriptor()
public void setRootFlags(InsertContext ctx)
public void setOpTypeAndFlags(InsertContext ctx, boolean isLastElement)
public void restoreKVOrder(java.util.Map<java.lang.Integer,java.lang.String> idToCFNameMap)
public void setArrayIndex(com.mapr.db.rowcol.ArrayIndexDescriptor.ArrayIndexType type,
int index)
public void setRecursiveNonDefaultColumnFamily(boolean b,
int cfId)
public org.ojai.Value.Type getType()
getType in interface org.ojai.Valuepublic byte getByte()
getByte in interface org.ojai.Valuepublic short getShort()
getShort in interface org.ojai.Valuepublic int getInt()
getInt in interface org.ojai.Valuepublic long getLong()
getLong in interface org.ojai.Valuepublic float getFloat()
getFloat in interface org.ojai.Valuepublic double getDouble()
getDouble in interface org.ojai.Valuepublic java.math.BigDecimal getDecimal()
getDecimal in interface org.ojai.Valuepublic boolean getBoolean()
getBoolean in interface org.ojai.Valuepublic java.nio.ByteBuffer getBinary()
getBinary in interface org.ojai.Valuepublic org.ojai.types.OTimestamp getTimestamp()
getTimestamp in interface org.ojai.Valuepublic long getTimestampAsLong()
getTimestampAsLong in interface org.ojai.Valuepublic java.lang.String getString()
getString in interface org.ojai.Valuepublic org.ojai.types.ODate getDate()
getDate in interface org.ojai.Valuepublic int getDateAsInt()
getDateAsInt in interface org.ojai.Valuepublic org.ojai.types.OTime getTime()
getTime in interface org.ojai.Valuepublic int getTimeAsInt()
getTimeAsInt in interface org.ojai.Valuepublic org.ojai.types.OInterval getInterval()
getInterval in interface org.ojai.Valuepublic long getIntervalAsLong()
getIntervalAsLong in interface org.ojai.Valuepublic java.util.Map<java.lang.String,java.lang.Object> getMap()
getMap in interface org.ojai.Valuepublic org.ojai.Document getRecord()
public java.lang.Object getObject()
getObject in interface org.ojai.Valuepublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectprotected void checkType(org.ojai.Value.Type t)
throws org.ojai.exceptions.TypeException
org.ojai.exceptions.TypeExceptionprotected void setPrimValue(long primValue)
protected long getPrimValue()
protected void setObjValue(java.lang.Object objValue)
public void setIsRoot()
public boolean isRoot()
public org.ojai.DocumentReader asReader()
asReader in interface org.ojai.Valuepublic java.util.List<java.lang.Object> getList()
getList in interface org.ojai.Valuepublic java.lang.String toStringWithTimestamp()
public java.lang.String toString()
toString in class java.lang.Objectpublic KeyValue clone()
clone in class java.lang.Objectpublic KeyValue shallowCopy()
public void valueToString(java.lang.StringBuilder buf)
public void toString(java.lang.StringBuilder buf)