Package dev.morphia.mapping.codec
Class BaseReferenceCodec<T>
- java.lang.Object
-
- dev.morphia.mapping.codec.BaseReferenceCodec<T>
-
- Type Parameters:
T
- the property type
- All Implemented Interfaces:
org.bson.codecs.Codec<T>
,org.bson.codecs.Decoder<T>
,org.bson.codecs.Encoder<T>
- Direct Known Subclasses:
MorphiaReferenceCodec
,ReferenceCodec
public abstract class BaseReferenceCodec<T> extends Object implements org.bson.codecs.Codec<T>
Defines codecs for propertiesDeveloper 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 BaseReferenceCodec(Datastore datastore, PropertyModel property)
Creates a codec
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Datastore
getDatastore()
protected EntityModel
getEntityModelForField()
PropertyModel
getPropertyModel()
protected static Reference
getReferenceAnnotation(PropertyModel model)
TypeData<?>
getTypeData()
-
-
-
Constructor Detail
-
BaseReferenceCodec
public BaseReferenceCodec(Datastore datastore, PropertyModel property)
Creates a codec- Parameters:
datastore
- the datastoreproperty
- the property
-
-
Method Detail
-
getDatastore
public Datastore getDatastore()
- Returns:
- the datastore
-
getPropertyModel
public PropertyModel getPropertyModel()
- Returns:
- the field
-
getTypeData
public TypeData<?> getTypeData()
- Returns:
- the type data
-
getEntityModelForField
protected EntityModel getEntityModelForField()
-
getReferenceAnnotation
protected static Reference getReferenceAnnotation(PropertyModel model)
-
-