Package io.jmix.core

Interface Metadata

All Superinterfaces:
Session
All Known Implementing Classes:
MetadataImpl

public interface Metadata extends Session
Central interface to provide metadata-related functionality.
  • Method Summary

    Modifier and Type
    Method
    Description
    create(MetaClass metaClass)
    Instantiate an entity, taking into account extended entities.
    create(MetaClass metaClass, Object id)
    Instantiate an entity with provided id, taking into account extended entities.
    <T> T
    create(Class<T> entityClass)
    Instantiate an entity, taking into account extended entities.
    <T> T
    create(Class<T> entityClass, Object id)
    Instantiate an entity with provided id, taking into account extended entities.
    create(String entityName)
    Instantiate an entity, taking into account extended entities.
    create(String entityName, Object id)
    Instantiate an entity with provided id, taking into account extended entities.
    getClass(Object entity)
    Returns MetaClass of the given entity.
    Get Metadata session - interface providing access to MetaClasses and MetaProperties.

    Methods inherited from interface io.jmix.core.metamodel.model.Session

    findClass, findClass, getClass, getClass, getClasses
  • Method Details

    • getSession

      Session getSession()
      Get Metadata session - interface providing access to MetaClasses and MetaProperties.
      Returns:
      current metadata session
    • getClass

      MetaClass getClass(Object entity)
      Returns MetaClass of the given entity.
      Parameters:
      entity - entity instance
      Returns:
      MetaClass instance
    • create

      <T> T create(Class<T> entityClass)
      Instantiate an entity, taking into account extended entities.
      Parameters:
      entityClass - entity class
      Returns:
      entity instance
    • create

      <T> T create(Class<T> entityClass, Object id)
      Instantiate an entity with provided id, taking into account extended entities.
      Parameters:
      entityClass - entity class
      id - entity id
      Returns:
      entity instance
    • create

      Object create(MetaClass metaClass)
      Instantiate an entity, taking into account extended entities.
      Parameters:
      metaClass - entity MetaClass
      Returns:
      entity instance
    • create

      Object create(MetaClass metaClass, Object id)
      Instantiate an entity with provided id, taking into account extended entities.
      Parameters:
      metaClass - entity MetaClass
      id - entity id
      Returns:
      entity instance
    • create

      Object create(String entityName)
      Instantiate an entity, taking into account extended entities.
      Parameters:
      entityName - entity name
      Returns:
      entity instance
    • create

      Object create(String entityName, Object id)
      Instantiate an entity with provided id, taking into account extended entities.
      Parameters:
      entityName - entity name
      id - entity id
      Returns:
      entity instance