Annotation Type MappedProperty


  • @Retention(RUNTIME)
    @Target({ANNOTATION_TYPE,FIELD,METHOD})
    @Documented
    public @interface MappedProperty
    Designates a method or field that is mapped as a persistent property. Typically not used directly but as a meta-annotation.
    Since:
    1.0
    • Field Summary

      Fields 
      Modifier and Type Fields Description
      static java.lang.String EMBEDDED_PROPERTIES
      name of the meta-annotation member to store the embedded property configuration.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.Class<?> converter  
      java.lang.Class<?> converterPersistedType  
      java.lang.String definition
      Used to define the mapping.
      DataType type  
      java.lang.String value
      The destination the property is persisted to.
    • Field Detail

      • EMBEDDED_PROPERTIES

        static final java.lang.String EMBEDDED_PROPERTIES
        name of the meta-annotation member to store the embedded property configuration.
    • Element Detail

      • value

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

        @AliasFor(annotation=TypeDef.class,
                  member="type")
        DataType type
        Returns:
        The data type of the property.
        Default:
        io.micronaut.data.model.DataType.OBJECT
      • converter

        @AliasFor(annotation=TypeDef.class,
                  member="converter")
        java.lang.Class<?> converter
        Returns:
        The converter of the property.
        Default:
        java.lang.Object.class
      • converterPersistedType

        java.lang.Class<?> converterPersistedType
        Returns:
        The converter of the property.
        Default:
        java.lang.Object.class
      • definition

        java.lang.String definition
        Used to define the mapping. For example in the case of SQL this would be the column definition. Example: BLOB NOT NULL.
        Returns:
        A string-based definition of the property type.
        Default:
        ""