public class BasicReflectionCodec<T> extends AbstractTypeCodec<T> implements ReflectionCodec<T>
logger| Constructor and Description |
|---|
BasicReflectionCodec(Type type,
TypeCodecRegistry typeCodecRegistry) |
BasicReflectionCodec(Type type,
TypeCodecRegistry typeCodecRegistry,
Set<String> allDiscriminatorKeys) |
| Modifier and Type | Method and Description |
|---|---|
T |
decode(org.bson.BsonReader reader,
org.bson.codecs.DecoderContext decoderContext) |
T |
decodeFields(org.bson.BsonReader reader,
org.bson.codecs.DecoderContext decoderContext,
T instance) |
boolean |
documentHasId(T document) |
void |
encode(org.bson.BsonWriter writer,
T instance,
org.bson.codecs.EncoderContext encoderContext) |
void |
encodeFields(org.bson.BsonWriter writer,
T instance,
org.bson.codecs.EncoderContext encoderContext) |
T |
generateIdIfAbsentFromDocument(T document) |
org.bson.BsonValue |
getDocumentId(T document) |
MappedField |
getIdField() |
MappedField |
getMappedField(String mappedFieldName) |
Map<String,MappedField> |
getPersistenceFields() |
void |
initializeDefaults(T instance) |
boolean |
isCollectible() |
protected boolean |
isIgnorable(Field field) |
void |
postDecode(T instance) |
getDefaultConstructor, getEncoderClass, newInstance, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdefaultInstance, newInstancepublic BasicReflectionCodec(Type type, TypeCodecRegistry typeCodecRegistry)
public BasicReflectionCodec(Type type, TypeCodecRegistry typeCodecRegistry, Set<String> allDiscriminatorKeys)
public Map<String,MappedField> getPersistenceFields()
getPersistenceFields in interface ReflectionCodec<T>protected boolean isIgnorable(Field field)
public T decode(org.bson.BsonReader reader, org.bson.codecs.DecoderContext decoderContext)
decode in interface org.bson.codecs.Decoder<T>public T decodeFields(org.bson.BsonReader reader, org.bson.codecs.DecoderContext decoderContext, T instance)
decodeFields in interface ReflectionCodec<T>public void postDecode(T instance)
postDecode in interface ReflectionCodec<T>public void initializeDefaults(T instance)
initializeDefaults in interface ReflectionCodec<T>public void encode(org.bson.BsonWriter writer,
T instance,
org.bson.codecs.EncoderContext encoderContext)
encode in interface org.bson.codecs.Encoder<T>public void encodeFields(org.bson.BsonWriter writer,
T instance,
org.bson.codecs.EncoderContext encoderContext)
encodeFields in interface ReflectionCodec<T>public MappedField getMappedField(String mappedFieldName)
getMappedField in interface ReflectionCodec<T>public MappedField getIdField()
getIdField in interface ReflectionCodec<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.