Annotation Type MappedEntity


  • @Retention(RUNTIME)
    @Target({ANNOTATION_TYPE,TYPE,FIELD,METHOD})
    @Documented
    @Introspected(excludedAnnotations=Transient.class,indexed={@IndexedAnnotation(annotation=Id.class),@IndexedAnnotation(annotation=Version.class),@IndexedAnnotation(annotation=DateCreated.class),@IndexedAnnotation(annotation=DateUpdated.class),@IndexedAnnotation(annotation=MappedProperty.class,member="value"),@IndexedAnnotation(annotation=Index.class,member="value")})
    public @interface MappedEntity
    Designates a class as being persisted. This is a generic annotation to identify a persistent type and is typically not used directly but rather mapped to.
    Since:
    1.0
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String alias  
      boolean escape  
      java.lang.Class<? extends NamingStrategy> namingStrategy  
      java.lang.String value
      The destination the type is persisted to.
    • Element Detail

      • value

        java.lang.String value
        The destination the type is persisted to. This could be the table name, document name, column name etc. or some external form.
        Returns:
        The destination
        Default:
        ""
      • namingStrategy

        @AliasFor(annotation=NamingStrategy.class,
                  member="value")
        java.lang.Class<? extends NamingStrategy> namingStrategy
        Returns:
        The naming strategy to use.
        Default:
        io.micronaut.data.model.naming.NamingStrategies.UnderScoreSeparatedLowerCase.class
      • escape

        boolean escape
        Returns:
        Whether to escape identifiers in generated queries. Defaults to true.
        Default:
        true
      • alias

        java.lang.String alias
        Returns:
        The alias to use for the query
        Default:
        ""