Class MetaPropertyImpl

java.lang.Object
io.jmix.core.metamodel.model.impl.MetadataObjectImpl
io.jmix.core.metamodel.model.impl.MetaPropertyImpl
All Implemented Interfaces:
MetadataObject, MetaProperty

public class MetaPropertyImpl extends MetadataObjectImpl implements MetaProperty
  • Constructor Details

  • Method Details

    • getDomain

      public MetaClass getDomain()
      Specified by:
      getDomain in interface MetaProperty
      Returns:
      MetaClass, containing this MetaProperty.
      In case of ReplaceEntity returns extended meta class.
    • setDomain

      public void setDomain(MetaClass domain)
    • getInverse

      public MetaProperty getInverse()
      Specified by:
      getInverse in interface MetaProperty
      Returns:
      a MetaProperty from the opposite side of relation, or null if this is not a reference property
    • setInverse

      public void setInverse(MetaProperty inverse)
    • getSession

      public Session getSession()
      Specified by:
      getSession in interface MetaProperty
      Returns:
      containing MetaModel instance. Null signifies a temporary metaclass, not associated with an entity class.
    • getRange

      public Range getRange()
      Specified by:
      getRange in interface MetaProperty
      Returns:
      Range of this property.
    • setRange

      public void setRange(Range range)
    • getAnnotatedElement

      public AnnotatedElement getAnnotatedElement()
      Specified by:
      getAnnotatedElement in interface MetaProperty
      Returns:
      corresponding Java field or method as AnnotatedElement object
    • setAnnotatedElement

      public void setAnnotatedElement(AnnotatedElement annotatedElement)
    • getJavaType

      public Class<?> getJavaType()
      Specified by:
      getJavaType in interface MetaProperty
      Returns:
      Java class of the corresponding field or method's return type
    • setJavaType

      public void setJavaType(Class<?> javaType)
    • getDeclaringClass

      public Class<?> getDeclaringClass()
      Specified by:
      getDeclaringClass in interface MetaProperty
      Returns:
      Java class which declares the corresponding field or method
    • getStore

      public Store getStore()
      Specified by:
      getStore in interface MetaProperty
    • setStore

      public void setStore(Store store)
    • setDeclaringClass

      public void setDeclaringClass(Class<?> declaringClass)
    • getType

      public MetaProperty.Type getType()
      Specified by:
      getType in interface MetaProperty
      Returns:
      property type (DATATYPE, ENUM, ASSOCIATION, COMPOSITION)
    • setType

      public void setType(MetaProperty.Type type)
    • isMandatory

      public boolean isMandatory()
      Specified by:
      isMandatory in interface MetaProperty
      Returns:
      true if the corresponding entity attribute must contain a value
    • setMandatory

      public void setMandatory(boolean mandatory)
    • isReadOnly

      public boolean isReadOnly()
      Specified by:
      isReadOnly in interface MetaProperty
      Returns:
      true if the corresponding entity attribute is read-only
    • setReadOnly

      public void setReadOnly(boolean readOnly)
    • getAnnotations

      public Map<String,Object> getAnnotations()
      Description copied from interface: MetadataObject
      MetadataObject annotations. Annotations here are simply name-value pairs, not directly correlated with Java annotations.
      Specified by:
      getAnnotations in interface MetadataObject
      Overrides:
      getAnnotations in class MetadataObjectImpl
    • withClones

      protected void withClones(Consumer<MetaPropertyImpl> consumer)
    • toString

      public String toString()
      Overrides:
      toString in class Object