public class BasicReflectionCodec<T> extends AbstractTypeCodec<T> implements ReflectionCodec<T>
| Constructor and Description |
|---|
BasicReflectionCodec(Type type,
TypeCodecRegistry typeCodecRegistry,
CodecConfiguration codecConfiguration) |
| Modifier and Type | Method and Description |
|---|---|
T |
decodeFields(org.bson.BsonReader reader,
org.bson.codecs.DecoderContext decoderContext,
T instance) |
boolean |
documentHasId(T document) |
void |
encodeFields(org.bson.BsonWriter writer,
T instance,
org.bson.codecs.EncoderContext encoderContext) |
T |
generateIdIfAbsentFromDocument(T document) |
DecodingPojoFailureStrategy.Strategy |
getDecodingPojoFailureStrategy() |
org.bson.BsonValue |
getDocumentId(T document) |
MappedField |
getMappedField(String mappedFieldName) |
Map<String,MappedField> |
getPersistenceFields() |
boolean |
isCollectible() |
protected boolean |
isIgnorable(Field field) |
void |
postDecode(T instance)
Called after entity has been decoded
|
void |
preEncode(T instance)
Called just before encoding
|
getDefaultConstructor, getEncoderClass, newInstance, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitverifyFieldsNotNamedLikeAnyDiscriminatorKeydecode, encode, newInstancedefaultInstance, getTypeFilterpublic BasicReflectionCodec(Type type, TypeCodecRegistry typeCodecRegistry, CodecConfiguration codecConfiguration)
public DecodingPojoFailureStrategy.Strategy getDecodingPojoFailureStrategy()
getDecodingPojoFailureStrategy in interface TypeCodec<T>public Map<String,MappedField> getPersistenceFields()
getPersistenceFields in interface ReflectionCodec<T>protected boolean isIgnorable(Field field)
public T decodeFields(org.bson.BsonReader reader, org.bson.codecs.DecoderContext decoderContext, T instance)
decodeFields in interface PolymorphicCodec<T>public void postDecode(T instance)
ReflectionCodecpostDecode in interface ReflectionCodec<T>public void encodeFields(org.bson.BsonWriter writer,
T instance,
org.bson.codecs.EncoderContext encoderContext)
encodeFields in interface PolymorphicCodec<T>public void preEncode(T instance)
ReflectionCodecpreEncode in interface ReflectionCodec<T>public MappedField getMappedField(String mappedFieldName)
getMappedField 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 © 2020 BILD GmbH & Co. KG. All rights reserved.