| Modifier and Type | Optional Element and Description |
|---|---|
Class<? extends org.bson.codecs.Codec<?>> |
codec
A custom
Codec implementation that handles encoding and decoding of the
annotated field |
Class<? extends Collection> |
collectionImplementationClass
Specifies the
Collection implementation to be used in the decoding phase. |
int |
order
The order in which the field should be stored.
|
String |
value
The key to be used to store the field inside the document.
|
public abstract String value
By default the name of the field is used.
public abstract int order
By default the fields are stored in the order they appear in the class. Except the id field is always stored first.
public abstract Class<? extends org.bson.codecs.Codec<?>> codec
Codec implementation that handles encoding and decoding of the
annotated fieldpublic abstract Class<? extends Collection> collectionImplementationClass
Collection implementation to be used in the decoding phase.
There is no need to specify this attribute when the default mapping is sufficient
or when the type of the field is already a Collection implementation
Default mappings
Copyright © 2015. All rights reserved.