@API.Internal public class DBDocumentReader extends Object implements DBDocumentReaderBase
| Constructor and Description |
|---|
DBDocumentReader(Map<Integer,ByteBuffer> data,
Map<org.ojai.FieldPath,Integer> pathMap,
KeyValue _id,
boolean excludeId) |
| Modifier and Type | Method and Description |
|---|---|
int |
getArrayIndex() |
ByteBuffer |
getBinary() |
boolean |
getBoolean() |
byte |
getByte() |
ControlInfo |
getControlInfo()
Retrieves control information, such as create/delete/append, associated
with the current key-value pair being parsed.
|
org.ojai.types.ODate |
getDate() |
int |
getDateInt() |
BigDecimal |
getDecimal() |
int |
getDecimalPrecision()
Returns the precision of current
DECIMAL node. |
int |
getDecimalScale()
Returns the scale of the current
DECIMAL node. |
ByteBuffer |
getDecimalValueAsBytes()
Returns a
ByteBuffer containing the two's complement representation
of the current DECIMAL node. |
int |
getDecimalValueAsInt()
Returns an
int whose value is the unscaled value of this
DECIMAL. |
long |
getDecimalValueAsLong()
Returns a
long whose value is the unscaled value of this
DECIMAL. |
double |
getDouble() |
String |
getFieldName() |
float |
getFloat() |
org.ojai.Value |
getId() |
int |
getInt() |
org.ojai.types.OInterval |
getInterval() |
int |
getIntervalDays() |
long |
getIntervalMillis() |
long |
getLong() |
short |
getShort() |
String |
getString() |
org.ojai.types.OTime |
getTime() |
int |
getTimeInt() |
org.ojai.types.OTimestamp |
getTimestamp() |
long |
getTimestampLong() |
boolean |
inMap() |
org.ojai.DocumentReader.EventType |
next()
Moves the
RecordReader to the next node and returns the node type
as EventType. |
public org.ojai.DocumentReader.EventType next()
RecordReader to the next node and returns the node type
as EventType.next in interface org.ojai.DocumentReaderEventType for the current node or null if the
reader is past the end of the recordpublic String getFieldName()
getFieldName in interface org.ojai.DocumentReaderorg.ojai.exceptions.TypeException - if the current EventType is not
FIELD_NAMEpublic byte getByte()
getByte in interface org.ojai.DocumentReaderbyte value of the current nodeorg.ojai.exceptions.TypeException - if the current EventType is not
BYTEpublic short getShort()
getShort in interface org.ojai.DocumentReaderbyte value of the current nodeorg.ojai.exceptions.TypeException - if the current EventType is not
SHORTpublic long getLong()
getLong in interface org.ojai.DocumentReaderlong value of the current nodeorg.ojai.exceptions.TypeException - if the current EventType is not
LONGpublic int getInt()
getInt in interface org.ojai.DocumentReaderint value of the current nodeorg.ojai.exceptions.TypeException - if the current EventType is not
INTpublic float getFloat()
getFloat in interface org.ojai.DocumentReaderfloat value of the current nodeorg.ojai.exceptions.TypeException - if the current EventType is not
FLOATpublic double getDouble()
getDouble in interface org.ojai.DocumentReaderdouble value of the current nodeorg.ojai.exceptions.TypeException - if the current EventType is not
DOUBLEpublic BigDecimal getDecimal()
getDecimal in interface org.ojai.DocumentReaderBigDecimal value of the current nodeorg.ojai.exceptions.TypeException - if the current EventType is not
DECIMALpublic int getDecimalPrecision()
DECIMAL node.
(The precision is the number of digits in the unscaled value.)
The precision of a zero value is 1.
getDecimalPrecision in interface org.ojai.DocumentReaderDECIMAL nodeorg.ojai.exceptions.TypeException - if the current EventType is not
DECIMALpublic int getDecimalScale()
DECIMAL node. If the returned
value is zero or positive, the scale is the number of digits to the right
of the decimal point. If negative, the unscaled value of the number is
multiplied by ten to the power of the negation of the scale. For example,
a scale of -3 means the unscaled value is multiplied by 1000.getDecimalScale in interface org.ojai.DocumentReaderDECIMAL nodeorg.ojai.exceptions.TypeException - if the current EventType is not
DECIMALpublic int getDecimalValueAsInt()
int whose value is the unscaled value of this
DECIMAL.getDecimalValueAsInt in interface org.ojai.DocumentReaderDECIMAL nodeorg.ojai.exceptions.TypeException - if the current EventType is not
DECIMALorg.w3c.dom.ranges.RangeException - if the precision of the decimal number is greater
than 9public long getDecimalValueAsLong()
long whose value is the unscaled value of this
DECIMAL.getDecimalValueAsLong in interface org.ojai.DocumentReaderDECIMAL nodeorg.ojai.exceptions.TypeException - if the current EventType is not
DECIMALorg.w3c.dom.ranges.RangeException - if the precision of the decimal number is greater
than 18public ByteBuffer getDecimalValueAsBytes()
ByteBuffer containing the two's complement representation
of the current DECIMAL node. The byte array will be in big-endian
byte order: the most significant byte is in the zeroth element. The
array will contain the minimum number of bytes required to represent this
DECIMAL, including one sign bit.getDecimalValueAsBytes in interface org.ojai.DocumentReaderDECIMAL nodepublic boolean getBoolean()
getBoolean in interface org.ojai.DocumentReaderboolean value of the current nodeorg.ojai.exceptions.TypeException - if the current EventType is not
BOOLEANpublic String getString()
getString in interface org.ojai.DocumentReaderString value of the current nodeorg.ojai.exceptions.TypeException - if the current EventType is not
STRINGpublic long getTimestampLong()
getTimestampLong in interface org.ojai.DocumentReaderTimestamp value of the current node as a long
representing the number of milliseconds since epochorg.ojai.exceptions.TypeException - if the current EventType is not
TIMESTAMPpublic org.ojai.types.OTimestamp getTimestamp()
getTimestamp in interface org.ojai.DocumentReaderTimestamp value of the current nodeorg.ojai.exceptions.TypeException - if the current EventType is not
TIMESTAMPpublic int getDateInt()
getDateInt in interface org.ojai.DocumentReaderDate value of the current node as an int
representing the number of DAYS since epochorg.ojai.exceptions.TypeException - if the current EventType is not
DATEpublic org.ojai.types.ODate getDate()
getDate in interface org.ojai.DocumentReaderDate value of the current nodeorg.ojai.exceptions.TypeException - if the current EventType is not
DATEpublic int getTimeInt()
getTimeInt in interface org.ojai.DocumentReaderTime value of the current node as an int
representing the number of milliseconds since midnightorg.ojai.exceptions.TypeException - if the current EventType is not
TIMEpublic org.ojai.types.OTime getTime()
getTime in interface org.ojai.DocumentReaderTime value of the current nodeorg.ojai.exceptions.TypeException - if the current EventType is not
TIMEpublic org.ojai.types.OInterval getInterval()
getInterval in interface org.ojai.DocumentReaderInterval value of the current nodeorg.ojai.exceptions.TypeException - if the current EventType is not
INTERVALpublic int getIntervalDays()
getIntervalDays in interface org.ojai.DocumentReaderpublic long getIntervalMillis()
getIntervalMillis in interface org.ojai.DocumentReaderpublic ByteBuffer getBinary()
getBinary in interface org.ojai.DocumentReaderByteBuffer value of the current nodeorg.ojai.exceptions.TypeException - if the current EventType is not
BINARYpublic ControlInfo getControlInfo()
DBDocumentReaderBasegetControlInfo in interface DBDocumentReaderBasepublic org.ojai.Value getId()
getId in interface DBDocumentReaderBasepublic boolean inMap()
inMap in interface org.ojai.DocumentReaderpublic int getArrayIndex()
getArrayIndex in interface org.ojai.DocumentReaderCopyright © 2016 Mapr Technologies, Inc.. All rights reserved.