Package de.bild.codec
Class BasicReflectionCodec<T>
java.lang.Object
de.bild.codec.AbstractTypeCodec<T>
de.bild.codec.BasicReflectionCodec<T>
- All Implemented Interfaces:
PolymorphicCodec<T>,ReflectionCodec<T>,TypeCodec<T>,org.bson.codecs.Codec<T>,org.bson.codecs.Decoder<T>,org.bson.codecs.Encoder<T>
-
Constructor Summary
ConstructorsConstructorDescriptionBasicReflectionCodec(Type type, TypeCodecRegistry typeCodecRegistry, CodecConfiguration codecConfiguration) -
Method Summary
Modifier and TypeMethodDescriptiondecodeFields(org.bson.BsonReader reader, org.bson.codecs.DecoderContext decoderContext, T instance) booleandocumentHasId(T document) voidencodeFields(org.bson.BsonWriter writer, T instance, org.bson.codecs.EncoderContext encoderContext) generateIdIfAbsentFromDocument(T document) org.bson.BsonValuegetDocumentId(T document) getMappedField(String mappedFieldName) booleanprotected booleanisIgnorable(Field field) voidpostDecode(T instance) Called after entity has been decodedvoidCalled just before encodingMethods inherited from class de.bild.codec.AbstractTypeCodec
getDefaultConstructor, getEncoderClass, newInstance, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.bson.codecs.Encoder
getEncoderClassMethods inherited from interface de.bild.codec.PolymorphicCodec
decode, encode, newInstanceMethods inherited from interface de.bild.codec.ReflectionCodec
verifyFieldsNotNamedLikeAnyDiscriminatorKeyMethods inherited from interface de.bild.codec.TypeCodec
defaultInstance, getTypeFilter
-
Constructor Details
-
BasicReflectionCodec
public BasicReflectionCodec(Type type, TypeCodecRegistry typeCodecRegistry, CodecConfiguration codecConfiguration)
-
-
Method Details
-
getDecodingPojoFailureStrategy
- Specified by:
getDecodingPojoFailureStrategyin interfaceTypeCodec<T>
-
getPersistenceFields
- Specified by:
getPersistenceFieldsin interfaceReflectionCodec<T>
-
isIgnorable
-
decodeFields
public T decodeFields(org.bson.BsonReader reader, org.bson.codecs.DecoderContext decoderContext, T instance) - Specified by:
decodeFieldsin interfacePolymorphicCodec<T>
-
postDecode
Description copied from interface:ReflectionCodecCalled after entity has been decoded- Specified by:
postDecodein interfaceReflectionCodec<T>
-
encodeFields
public void encodeFields(org.bson.BsonWriter writer, T instance, org.bson.codecs.EncoderContext encoderContext) - Specified by:
encodeFieldsin interfacePolymorphicCodec<T>
-
preEncode
Description copied from interface:ReflectionCodecCalled just before encoding- Specified by:
preEncodein interfaceReflectionCodec<T>
-
getMappedField
- Specified by:
getMappedFieldin interfaceReflectionCodec<T>
-
isCollectible
public boolean isCollectible()- Specified by:
isCollectiblein interfaceTypeCodec<T>
-
generateIdIfAbsentFromDocument
- Specified by:
generateIdIfAbsentFromDocumentin interfaceTypeCodec<T>
-
documentHasId
- Specified by:
documentHasIdin interfaceTypeCodec<T>
-
getDocumentId
- Specified by:
getDocumentIdin interfaceTypeCodec<T>
-