Class TenantEntityOperationImpl

java.lang.Object
io.jmix.multitenancy.core.impl.TenantEntityOperationImpl
All Implemented Interfaces:
TenantEntityOperation

@Component("mten_TenantEntityOperation") public class TenantEntityOperationImpl extends Object implements TenantEntityOperation
Helper for working with tenant entity.
  • Constructor Details

    • TenantEntityOperationImpl

      public TenantEntityOperationImpl(Metadata metadata)
  • Method Details

    • findTenantProperty

      public MetaProperty findTenantProperty(Class<?> entityClass)
      Returns MetaProperty of Tenant Id for some class
      Specified by:
      findTenantProperty in interface TenantEntityOperation
      Parameters:
      entityClass - entity class
      Returns:
      MetaProperty instance. Return if not found.
    • setTenant

      public void setTenant(Object entity, String tenantId)
      Set the Tenant Id for some entity
      Specified by:
      setTenant in interface TenantEntityOperation
      Parameters:
      entity - instance
      tenantId - tenant id