Package dev.morphia.mapping.codec.reader
Class DocumentReader
- java.lang.Object
-
- dev.morphia.mapping.codec.reader.DocumentReader
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,org.bson.BsonReader
public class DocumentReader extends Object implements org.bson.BsonReader
Developer note.This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
-
-
Constructor Summary
Constructors Constructor Description DocumentReader(org.bson.Document document)
Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
dev.morphia.mapping.codec.reader.ReaderState
currentState()
org.bson.BsonType
getCurrentBsonType()
String
getCurrentName()
org.bson.BsonReaderMark
getMark()
int
peekBinarySize()
byte
peekBinarySubType()
org.bson.BsonBinary
readBinaryData()
org.bson.BsonBinary
readBinaryData(String name)
boolean
readBoolean()
boolean
readBoolean(String name)
org.bson.BsonType
readBsonType()
long
readDateTime()
long
readDateTime(String name)
org.bson.BsonDbPointer
readDBPointer()
org.bson.BsonDbPointer
readDBPointer(String name)
org.bson.types.Decimal128
readDecimal128()
org.bson.types.Decimal128
readDecimal128(String name)
double
readDouble()
double
readDouble(String name)
void
readEndArray()
void
readEndDocument()
int
readInt32()
int
readInt32(String name)
long
readInt64()
long
readInt64(String name)
String
readJavaScript()
String
readJavaScript(String name)
String
readJavaScriptWithScope()
String
readJavaScriptWithScope(String name)
void
readMaxKey()
void
readMaxKey(String name)
void
readMinKey()
void
readMinKey(String name)
String
readName()
void
readName(String name)
void
readNull()
void
readNull(String name)
org.bson.types.ObjectId
readObjectId()
org.bson.types.ObjectId
readObjectId(String name)
org.bson.BsonRegularExpression
readRegularExpression()
org.bson.BsonRegularExpression
readRegularExpression(String name)
void
readStartArray()
void
readStartDocument()
String
readString()
String
readString(String name)
String
readSymbol()
String
readSymbol(String name)
org.bson.BsonTimestamp
readTimestamp()
org.bson.BsonTimestamp
readTimestamp(String name)
void
readUndefined()
void
readUndefined(String name)
void
skipName()
void
skipValue()
String
toString()
protected void
verifyName(String expectedName)
-
-
-
Method Detail
-
currentState
public dev.morphia.mapping.codec.reader.ReaderState currentState()
- Returns:
- the current state of the reader
-
getCurrentBsonType
public org.bson.BsonType getCurrentBsonType()
- Specified by:
getCurrentBsonType
in interfaceorg.bson.BsonReader
-
getCurrentName
public String getCurrentName()
- Specified by:
getCurrentName
in interfaceorg.bson.BsonReader
-
readBinaryData
public org.bson.BsonBinary readBinaryData()
- Specified by:
readBinaryData
in interfaceorg.bson.BsonReader
-
peekBinarySubType
public byte peekBinarySubType()
- Specified by:
peekBinarySubType
in interfaceorg.bson.BsonReader
-
peekBinarySize
public int peekBinarySize()
- Specified by:
peekBinarySize
in interfaceorg.bson.BsonReader
-
readBinaryData
public org.bson.BsonBinary readBinaryData(String name)
- Specified by:
readBinaryData
in interfaceorg.bson.BsonReader
-
readBoolean
public boolean readBoolean()
- Specified by:
readBoolean
in interfaceorg.bson.BsonReader
-
readBoolean
public boolean readBoolean(String name)
- Specified by:
readBoolean
in interfaceorg.bson.BsonReader
-
readBsonType
public org.bson.BsonType readBsonType()
- Specified by:
readBsonType
in interfaceorg.bson.BsonReader
-
readDateTime
public long readDateTime()
- Specified by:
readDateTime
in interfaceorg.bson.BsonReader
-
readDateTime
public long readDateTime(String name)
- Specified by:
readDateTime
in interfaceorg.bson.BsonReader
-
readDouble
public double readDouble()
- Specified by:
readDouble
in interfaceorg.bson.BsonReader
-
readDouble
public double readDouble(String name)
- Specified by:
readDouble
in interfaceorg.bson.BsonReader
-
readEndArray
public void readEndArray()
- Specified by:
readEndArray
in interfaceorg.bson.BsonReader
-
readEndDocument
public void readEndDocument()
- Specified by:
readEndDocument
in interfaceorg.bson.BsonReader
-
readInt32
public int readInt32()
- Specified by:
readInt32
in interfaceorg.bson.BsonReader
-
readInt32
public int readInt32(String name)
- Specified by:
readInt32
in interfaceorg.bson.BsonReader
-
readInt64
public long readInt64()
- Specified by:
readInt64
in interfaceorg.bson.BsonReader
-
readInt64
public long readInt64(String name)
- Specified by:
readInt64
in interfaceorg.bson.BsonReader
-
readDecimal128
public org.bson.types.Decimal128 readDecimal128()
- Specified by:
readDecimal128
in interfaceorg.bson.BsonReader
-
readDecimal128
public org.bson.types.Decimal128 readDecimal128(String name)
- Specified by:
readDecimal128
in interfaceorg.bson.BsonReader
-
readJavaScript
public String readJavaScript()
- Specified by:
readJavaScript
in interfaceorg.bson.BsonReader
-
readJavaScript
public String readJavaScript(String name)
- Specified by:
readJavaScript
in interfaceorg.bson.BsonReader
-
readJavaScriptWithScope
public String readJavaScriptWithScope()
- Specified by:
readJavaScriptWithScope
in interfaceorg.bson.BsonReader
-
readJavaScriptWithScope
public String readJavaScriptWithScope(String name)
- Specified by:
readJavaScriptWithScope
in interfaceorg.bson.BsonReader
-
readMaxKey
public void readMaxKey()
- Specified by:
readMaxKey
in interfaceorg.bson.BsonReader
-
readMaxKey
public void readMaxKey(String name)
- Specified by:
readMaxKey
in interfaceorg.bson.BsonReader
-
readMinKey
public void readMinKey()
- Specified by:
readMinKey
in interfaceorg.bson.BsonReader
-
readMinKey
public void readMinKey(String name)
- Specified by:
readMinKey
in interfaceorg.bson.BsonReader
-
readName
public String readName()
- Specified by:
readName
in interfaceorg.bson.BsonReader
-
readName
public void readName(String name)
- Specified by:
readName
in interfaceorg.bson.BsonReader
-
readNull
public void readNull()
- Specified by:
readNull
in interfaceorg.bson.BsonReader
-
readNull
public void readNull(String name)
- Specified by:
readNull
in interfaceorg.bson.BsonReader
-
readObjectId
public org.bson.types.ObjectId readObjectId()
- Specified by:
readObjectId
in interfaceorg.bson.BsonReader
-
readObjectId
public org.bson.types.ObjectId readObjectId(String name)
- Specified by:
readObjectId
in interfaceorg.bson.BsonReader
-
readRegularExpression
public org.bson.BsonRegularExpression readRegularExpression()
- Specified by:
readRegularExpression
in interfaceorg.bson.BsonReader
-
readRegularExpression
public org.bson.BsonRegularExpression readRegularExpression(String name)
- Specified by:
readRegularExpression
in interfaceorg.bson.BsonReader
-
readDBPointer
public org.bson.BsonDbPointer readDBPointer()
- Specified by:
readDBPointer
in interfaceorg.bson.BsonReader
-
readDBPointer
public org.bson.BsonDbPointer readDBPointer(String name)
- Specified by:
readDBPointer
in interfaceorg.bson.BsonReader
-
readStartArray
public void readStartArray()
- Specified by:
readStartArray
in interfaceorg.bson.BsonReader
-
readStartDocument
public void readStartDocument()
- Specified by:
readStartDocument
in interfaceorg.bson.BsonReader
-
readString
public String readString()
- Specified by:
readString
in interfaceorg.bson.BsonReader
-
readString
public String readString(String name)
- Specified by:
readString
in interfaceorg.bson.BsonReader
-
readSymbol
public String readSymbol()
- Specified by:
readSymbol
in interfaceorg.bson.BsonReader
-
readSymbol
public String readSymbol(String name)
- Specified by:
readSymbol
in interfaceorg.bson.BsonReader
-
readTimestamp
public org.bson.BsonTimestamp readTimestamp()
- Specified by:
readTimestamp
in interfaceorg.bson.BsonReader
-
readTimestamp
public org.bson.BsonTimestamp readTimestamp(String name)
- Specified by:
readTimestamp
in interfaceorg.bson.BsonReader
-
readUndefined
public void readUndefined()
- Specified by:
readUndefined
in interfaceorg.bson.BsonReader
-
readUndefined
public void readUndefined(String name)
- Specified by:
readUndefined
in interfaceorg.bson.BsonReader
-
skipName
public void skipName()
- Specified by:
skipName
in interfaceorg.bson.BsonReader
-
skipValue
public void skipValue()
- Specified by:
skipValue
in interfaceorg.bson.BsonReader
-
getMark
public org.bson.BsonReaderMark getMark()
- Specified by:
getMark
in interfaceorg.bson.BsonReader
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceorg.bson.BsonReader
- Specified by:
close
in interfaceCloseable
-
verifyName
protected void verifyName(String expectedName)
-
-