Package org.bson.codecs.pojo.annotations
Annotation Type BsonProperty
- 
@Documented @Target({METHOD,FIELD,PARAMETER}) @Retention(RUNTIME) public @interface BsonProperty
An annotation that configures a property.Note: Requires the
Conventions.ANNOTATION_CONVENTION- Since:
 - 3.5
 - See Also:
 Conventions.ANNOTATION_CONVENTION
 
- 
- 
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description booleanuseDiscriminatorStringvalueThe name of the property. 
 - 
 
- 
- 
Element Detail
- 
value
String value
The name of the property.For asymmetrical property names, the context of the
BsonPropertycan be important. For example, when used with@BsonCreatorthe value will relate to the read name. When used directly on a field it will set both the read name if unset and the write name if unset.- Returns:
 - the name to use for the property
 - See Also:
 PropertyModel.getWriteName(),PropertyModel.getReadName()
- Default:
 - ""
 
 
 - 
 
 -