Defines the annotations used by Morphia.
Annotation Types Summary Annotation Type Description AlsoLoadAnnotation which helps migrate schemas by loading one of several possible properties in the document into fields or methods. CappedAtProperties for capped collections; used in
CollationDefines the collation options for an index ConstructorArgsIndicates that this field can be constructed from the stored fields; it doesn't require a no-args constructor. ConvertersDeclares converters required for this entity/class; converters are registered globally at time of the meta-data discovery. Embedded EntityAllows marking and naming the collectionName EntityListenersSpecifies other classes to participate in the @Entity's lifecycle FieldDefine a field to be used in an index; Id IdGetterThis annotation allows the lazy-load proxy to return the ID of a referenced entity without reading the reference from the database. IndexDefines an index IndexedSpecified on fields that should be Indexed. IndexesDefines indexes for this entity type (on the collection) IndexOptionsDefines the options to be used when declaring an index. NotSavedWhen placed on an entity field, the field will not be written to mongodb. Polymorphic Deprecated.Currently unused PostLoadCalled after the data has been loaded into the java object. PostPersistCalled after the data has been persisted from the java object. PreLoadCalled before the data has been loaded from the datastore. PrePersistCalled before the data has been persisted to the datastore (before mapping is done). PreSaveCalled right before DBCollection.save() is called. PropertyOptional annotation for specifying persistence behavior Reference SerializedMarker for fields that should be (java) serialized TextMarks this field for inclusion in text indexing. Transient ValidationDefines the document validation logic for a collection. Versionsupposed to be used on a Long or long field for optimistic locking.