Annotation Type Entity


  • @Documented
    @Inherited
    @Retention(RUNTIME)
    @Target(TYPE)
    public @interface Entity
    Allows marking and naming the collectionName
    Author:
    Olafur Gauti Gudmundsson, Scott Hernandez
    • Element Detail

      • cap

        CappedAt cap
        Returns:
        The capped collection configuration options
        Default:
        @dev.morphia.annotations.CappedAt(0L)
      • concern

        java.lang.String concern
        Returns:
        The default write concern to use when dealing with this entity
        Default:
        ""
      • noClassnameStored

        boolean noClassnameStored
        Returns:
        When true, instructs Morphia to not include when serializing an entity to mongodb.
        Default:
        false
      • queryNonPrimary

        boolean queryNonPrimary
        Returns:
        slaveOk for queries for this Entity.
        Default:
        false
      • value

        java.lang.String value
        Returns:
        the collection name to for this entity. Defaults to the class's simple name
        See Also:
        Class.getSimpleName()
        Default:
        "."