Class AppSettingsToolsImpl

java.lang.Object
io.jmix.appsettings.impl.AppSettingsToolsImpl
All Implemented Interfaces:
AppSettingsTools

@NullMarked @Component("appset_AppSettingsTools") public class AppSettingsToolsImpl extends Object implements AppSettingsTools
  • Field Details

  • Constructor Details

    • AppSettingsToolsImpl

      public AppSettingsToolsImpl()
  • Method Details

    • loadAppSettingsEntityFromDataStore

      public <T extends AppSettingsEntity> T loadAppSettingsEntityFromDataStore(Class<T> clazz, AppSettingsEntityLoadMode mode, boolean softDeletion)
      Description copied from interface: AppSettingsTools
      Loads application settings entity by its clazz from data store according to provided AppSettingsEntityLoadMode and soft deletion hint.
      Specified by:
      loadAppSettingsEntityFromDataStore in interface AppSettingsTools
      Parameters:
      clazz - class that extends AppSettingsEntity
      mode - load mode
      softDeletion - whether soft-deleted entities should be filtered out
      Returns:
      application settings entity
    • getPropertyValue

      public @Nullable Object getPropertyValue(Class<? extends AppSettingsEntity> clazz, String propertyName)
      Description copied from interface: AppSettingsTools
      Returns actual value for provided propertyName and clazz.
      Specified by:
      getPropertyValue in interface AppSettingsTools
      Parameters:
      clazz - class that extends AppSettingsEntity
      propertyName - property name for which value should be calculated
      Returns:
      actual value of provided propertyName
    • getDefaultPropertyValue

      public @Nullable Object getDefaultPropertyValue(Class<? extends AppSettingsEntity> clazz, String propertyName)
      Description copied from interface: AppSettingsTools
      Returns default value for provided propertyName and clazz based on value of one of the AppSettingsDefault annotation.
      Specified by:
      getDefaultPropertyValue in interface AppSettingsTools
      Parameters:
      clazz - class that extends AppSettingsEntity
      propertyName - property name for which default value should be calculated
      Returns:
      value by default of provided propertyName
    • getDataManagerForAppSettingsEntity

      protected UnconstrainedDataManager getDataManagerForAppSettingsEntity()
    • createFetchPlan

      protected FetchPlan createFetchPlan(Class<?> clazz)
    • getPropertyNames

      public <T extends AppSettingsEntity> List<String> getPropertyNames(Class<T> clazz)
      Description copied from interface: AppSettingsTools
      Returns all non-system properties' names for given clazz.
      Specified by:
      getPropertyNames in interface AppSettingsTools
      Parameters:
      clazz - class that extends AppSettingsEntity
      Returns:
      non-system properties' names for given clazz
    • loadTenantSpecificAppSettingsEntity

      protected <T extends AppSettingsEntity> @Nullable T loadTenantSpecificAppSettingsEntity(Class<T> clazz, String tenantId, boolean softDeletion)
    • loadGlobalAppSettingsEntity

      protected <T extends AppSettingsEntity> @Nullable T loadGlobalAppSettingsEntity(Class<T> clazz, boolean softDeletion)
    • createGlobalAppSettingsEntity

      protected <T extends AppSettingsEntity> T createGlobalAppSettingsEntity(Class<T> clazz)
    • createTenantAppSettingsEntity

      protected <T extends AppSettingsEntity> T createTenantAppSettingsEntity(Class<T> clazz, String tenantId)
    • generateTenantSpecificSettingsId

      protected <T extends AppSettingsEntity> long generateTenantSpecificSettingsId(Class<T> clazz)
      Generates a synthetic identifier for a tenant-specific App Settings record. The legacy global record keeps the reserved identifier 1.
    • restoreSoftDeletedEntity

      protected <T extends AppSettingsEntity> T restoreSoftDeletedEntity(T entity)
    • getTenantSettingsSequenceName

      protected String getTenantSettingsSequenceName(MetaClass metaClass)