Package io.jmix.core

Class ExtendedEntities

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

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

  • Constructor Details

    • ExtendedEntities

      @Autowired public ExtendedEntities(Metadata metadata)
  • Method Details

    • getBootstrapSession

      protected Session getBootstrapSession()
    • replaceExtendedMetaClasses

      protected void replaceExtendedMetaClasses(Session session)
    • 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

      public @Nullable 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

      public @Nullable 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

      public @Nullable 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

      public @Nullable 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.
    • getCurrentStateSnapshot

      public ExtendedEntities.ExtendedEntitiesState getCurrentStateSnapshot()
      Returns the extended-entities state visible to the current metadata generation.

      Intended for infrastructure that needs a stable replacement map for the whole request or data operation.

    • getBootstrapState

      public ExtendedEntities.ExtendedEntitiesState getBootstrapState()
      Returns the extended-entities state built from the bootstrap metadata session.

      Intended for initialization of the first published metadata generation.

    • getState