Class MetaClassImpl

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

public class MetaClassImpl extends MetadataObjectImpl implements MetaClass
  • Field Details

  • Constructor Details

    • MetaClassImpl

      public MetaClassImpl(Session session, String className)
  • Method Details

    • getAncestor

      public MetaClass getAncestor()
      Description copied from interface: MetaClass
      Immediate ancestor of the object, or null if there is no one.
      Specified by:
      getAncestor in interface MetaClass
    • getAncestors

      public List<MetaClass> getAncestors()
      Description copied from interface: MetaClass
      All ancestors of the metaclass, in order going up from the immediate ancestor.
      Specified by:
      getAncestors in interface MetaClass
    • getDescendants

      public Collection<MetaClass> getDescendants()
      Description copied from interface: MetaClass
      All descendants of the metaclass, recursively. Order is undefined.
      Specified by:
      getDescendants in interface MetaClass
    • getSession

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

      public <T> Class<T> getJavaClass()
      Specified by:
      getJavaClass in interface MetaClass
      Returns:
      corresponding Java class
    • getProperties

      public Collection<MetaProperty> getProperties()
      Specified by:
      getProperties in interface MetaClass
      Returns:
      collection of meta properties owned by this metaclass and all its ancestors.
    • getStore

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

      public void setStore(Store store)
    • findProperty

      public MetaProperty findProperty(String name)
      Description copied from interface: MetaClass
      Get MetaProperty by its name.
      Specified by:
      findProperty in interface MetaClass
      Returns:
      MetaProperty instance, or null if no such property found
    • getProperty

      public MetaProperty getProperty(String name)
      Description copied from interface: MetaClass
      Get MetaProperty by its name.
      Specified by:
      getProperty in interface MetaClass
      Returns:
      MetaProperty instance. Throws exception if not found.
    • getPropertyPath

      public MetaPropertyPath getPropertyPath(String propertyPath)
      Description copied from interface: MetaClass
      Returns MetaPropertyPath object, representing path to the property from the current class
      Specified by:
      getPropertyPath in interface MetaClass
      Parameters:
      propertyPath - dot-separated string
      Returns:
      MetaPropertyPath instance, or null if the input parameter doesn't represent a valid path.
    • getOwnProperties

      public Collection<MetaProperty> getOwnProperties()
      Specified by:
      getOwnProperties in interface MetaClass
      Returns:
      collection of meta properties directly owned by this metaclass.
    • setJavaClass

      public void setJavaClass(Class javaClass)
    • addAncestor

      public void addAncestor(MetaClass ancestorClass)
    • registerProperty

      public void registerProperty(MetaProperty metaProperty)
    • registerAncestorProperty

      public void registerAncestorProperty(MetaProperty metaProperty)
    • toString

      public String toString()
      Overrides:
      toString in class Object