Package io.jmix.core

Class ExtendedEntities

java.lang.Object
io.jmix.core.ExtendedEntities

@Component("core_ExtendedEntities") public class ExtendedEntities extends Object
Encapsulates functionality for working with extended entities.
  • Field Details

  • Constructor Details

    • ExtendedEntities

      @Autowired public ExtendedEntities(Metadata metadata)
  • Method Details

    • replaceExtendedMetaClasses

      protected void replaceExtendedMetaClasses()
    • getEffectiveClass

      public Class getEffectiveClass(MetaClass originalMetaClass)
      Searches for an extended entity and returns it if found, otherwise returns the original entity.
      Parameters:
      originalMetaClass - original entity
      Returns:
      extended or original entity
    • getEffectiveClass

      public Class getEffectiveClass(Class originalClass)
      Searches for an extended entity and returns it if found, otherwise returns the original entity.
      Parameters:
      originalClass - original entity
      Returns:
      extended or original entity
    • getEffectiveClass

      public Class getEffectiveClass(String entityName)
      Searches for an extended entity and returns it if found, otherwise returns the original entity.
      Parameters:
      entityName - original entity
      Returns:
      extended or original entity
    • getEffectiveMetaClass

      public MetaClass getEffectiveMetaClass(MetaClass originalMetaClass)
      Searches for an extended entity and returns it if found, otherwise returns the original entity.
      Parameters:
      originalMetaClass - original entity
      Returns:
      extended or original entity
    • getEffectiveMetaClass

      public MetaClass getEffectiveMetaClass(Class originalClass)
      Searches for an extended entity and returns it if found, otherwise returns the original entity.
      Parameters:
      originalClass - original entity
      Returns:
      extended or original entity
    • getEffectiveMetaClass

      public MetaClass getEffectiveMetaClass(String entityName)
      Searches for an extended entity and returns it if found, otherwise returns the original entity.
      Parameters:
      entityName - original entity
      Returns:
      extended or original entity
    • getExtendedClass

      @Nullable public Class getExtendedClass(MetaClass originalMetaClass)
      Searches for an extended entity and returns it if found.
      Parameters:
      originalMetaClass - original entity
      Returns:
      extended entity or null if the provided entity has no extension
    • getOriginalClass

      @Nullable public Class getOriginalClass(MetaClass extendedMetaClass)
      Searches for an original entity for the provided extended entity.
      Parameters:
      extendedMetaClass - extended entity
      Returns:
      original entity or null if the provided entity is not an extension
    • getOriginalMetaClass

      @Nullable public MetaClass getOriginalMetaClass(MetaClass extendedMetaClass)
      Searches for an original entity for the provided extended entity.
      Parameters:
      extendedMetaClass - extended entity
      Returns:
      original entity or null if the provided entity is not an extension
    • getOriginalMetaClass

      @Nullable public MetaClass getOriginalMetaClass(String extendedEntityName)
      Searches for an original entity for the provided extended entity.
      Parameters:
      extendedEntityName - extended entity
      Returns:
      original entity or null if the provided entity is not an extension
    • getOriginalOrThisMetaClass

      public MetaClass getOriginalOrThisMetaClass(MetaClass metaClass)
      Returns:
      original meta class or received meta class if it's not extended
    • registerReplacedMetaClass

      public void registerReplacedMetaClass(MetaClass metaClass)
      INTERNAL. Import replaced meta class from metadata.