public final class Conventions extends Object
Convention
Modifier and Type | Field | Description |
---|---|---|
static Convention |
ANNOTATION_CONVENTION |
The annotation convention.
|
static Convention |
CLASS_AND_PROPERTY_CONVENTION |
The default class and property conventions
Sets the discriminator key if not set to
_t and the discriminator value if not set to the
ClassModels simple type name.
Configures the PropertyModels. |
static List<Convention> |
DEFAULT_CONVENTIONS |
The default conventions list
|
static List<Convention> |
NO_CONVENTIONS |
An empty conventions list
|
static Convention |
SET_PRIVATE_FIELDS_CONVENTION |
A convention that enables private fields to be set using reflection.
|
static Convention |
USE_GETTERS_FOR_SETTERS |
A convention that uses getter methods as setters for collections and maps if there is no setter.
|
public static final Convention CLASS_AND_PROPERTY_CONVENTION
_t
and the discriminator value if not set to the
ClassModels simple type name.idProperty
isn't set and there is a
property named getId()
, id
or _id
it will be marked as the idProperty.public static final Convention ANNOTATION_CONVENTION
Applies all the conventions related to the default org.bson.codecs.pojo.annotations
.
public static final Convention SET_PRIVATE_FIELDS_CONVENTION
This convention mimics how some other JSON libraries directly set a private field when there is no setter.
Note: This convention is not part of the DEFAULT_CONVENTIONS
list and must explicitly be set.
public static final Convention USE_GETTERS_FOR_SETTERS
This convention mimics how JAXB mutate collections and maps.
Note: This convention is not part of the DEFAULT_CONVENTIONS
list and must explicitly be set.
public static final List<Convention> DEFAULT_CONVENTIONS
public static final List<Convention> NO_CONVENTIONS