| Constructor and Description |
|---|
PolymorphicReflectionCodec(Type type,
Set<Type> validTypes,
TypeCodecRegistry typeCodecRegistry,
PojoContext pojoContext) |
| Modifier and Type | Method and Description |
|---|---|
T |
decode(org.bson.BsonReader reader,
org.bson.codecs.DecoderContext decoderContext) |
protected T |
decodeWithType(org.bson.BsonReader reader,
org.bson.codecs.DecoderContext decoderContext,
ReflectionCodec<T> typeCodec) |
boolean |
documentHasId(T document) |
void |
encode(org.bson.BsonWriter writer,
T value,
org.bson.codecs.EncoderContext encoderContext) |
protected void |
encodeType(org.bson.BsonWriter writer,
T value,
org.bson.codecs.EncoderContext encoderContext,
ReflectionCodec<T> typeCodec) |
T |
generateIdIfAbsentFromDocument(T document) |
org.bson.BsonValue |
getDocumentId(T document) |
Class<T> |
getEncoderClass() |
boolean |
isCollectible() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdefaultInstance, newInstancepublic PolymorphicReflectionCodec(Type type, Set<Type> validTypes, TypeCodecRegistry typeCodecRegistry, PojoContext pojoContext)
public T decode(org.bson.BsonReader reader, org.bson.codecs.DecoderContext decoderContext)
decode in interface org.bson.codecs.Decoder<T>protected T decodeWithType(org.bson.BsonReader reader, org.bson.codecs.DecoderContext decoderContext, ReflectionCodec<T> typeCodec)
public void encode(org.bson.BsonWriter writer,
T value,
org.bson.codecs.EncoderContext encoderContext)
encode in interface org.bson.codecs.Encoder<T>protected void encodeType(org.bson.BsonWriter writer,
T value,
org.bson.codecs.EncoderContext encoderContext,
ReflectionCodec<T> typeCodec)
public Class<T> getEncoderClass()
getEncoderClass in interface org.bson.codecs.Encoder<T>public boolean isCollectible()
isCollectible in interface TypeCodec<T>public T generateIdIfAbsentFromDocument(T document)
generateIdIfAbsentFromDocument in interface TypeCodec<T>public boolean documentHasId(T document)
documentHasId in interface TypeCodec<T>public org.bson.BsonValue getDocumentId(T document)
getDocumentId in interface TypeCodec<T>Copyright © 2017 BILD GmbH & Co. KG. All rights reserved.