Class MandantDao

java.lang.Object
de.xima.cmn.dao.AbstractDao<Mandant, Long, IEntityContext>
de.xima.fc.dao.impl.GenericDao<Mandant>
de.xima.fc.dao.impl.MandantDao
All Implemented Interfaces:
de.xima.cmn.dao.interfaces.IAbstractDao<Mandant, Long, IEntityContext>, IGenericDao<Mandant>, IMandantDao

@ApplicationScoped public class MandantDao extends GenericDao<Mandant> implements IMandantDao
  • Field Details

    • ENTITY_CONTEXT_PARAM_DELETE_EXCLUSIVE_USERS

      public static String ENTITY_CONTEXT_PARAM_DELETE_EXCLUSIVE_USERS
      Boolean flag that determines whether to delete all users that are only part of the client when deleting clients.
    • ENTITY_CONTEXT_PARAM_DELETE_EXCLUSIVE_USERS_CLIENTS

      public static String ENTITY_CONTEXT_PARAM_DELETE_EXCLUSIVE_USERS_CLIENTS
      Collection of clients to check for user exclusivity when deleting clients and their users.
    • ENTITY_CONTEXT_PARAM_DELETE_EXCLUSIVE_USERS_RESULT_SUCCESS

      public static String ENTITY_CONTEXT_PARAM_DELETE_EXCLUSIVE_USERS_RESULT_SUCCESS
      Comma separated String of all the usernames that have been deleted.
    • ENTITY_CONTEXT_PARAM_DELETE_EXCLUSIVE_USERS_RESULT_ERROR

      public static String ENTITY_CONTEXT_PARAM_DELETE_EXCLUSIVE_USERS_RESULT_ERROR
      Comma separated String of all the usernames that could not be deleted successfully.
  • Constructor Details

    • MandantDao

      public MandantDao()
  • Method Details

    • isCreationAllowed

      public boolean isCreationAllowed(IEntityContext ec, Mandant mandant)
      Specified by:
      isCreationAllowed in interface IMandantDao
    • getDefaultFormFormThemeByClient

      public FormThemeReference getDefaultFormFormThemeByClient(IEntityContext ec, Mandant client)
      Description copied from interface: IMandantDao
      Finds the configured default form theme. A default can be configured for each client (optional) and for the entire system as a fallback.
      • If a client was given and the client has a default form theme, return that.
      • If the system-wide form theme was configured, return that.
      • Otherwise, the system is misconfigured. Return the modern form theme.
      Specified by:
      getDefaultFormFormThemeByClient in interface IMandantDao
      Parameters:
      ec - Entity context to use for accessing the database.
      client - The client scope where to look for the default form theme. Can be null, then only the system scope is considered.
      Returns:
      The default form theme for the given client or the system-wide default form theme.
    • getByDefaultFormTheme

      public List<Mandant> getByDefaultFormTheme(IEntityContext ec, FormThemeReference formTheme)
      Description copied from interface: IMandantDao
      Finds all clients that have the given form theme configured as their default form theme. The returned list does not include clients that use the default system form theme.
      Specified by:
      getByDefaultFormTheme in interface IMandantDao
      Parameters:
      ec - Entity context to use for accessing the database.
      formTheme - The form theme to search for.
      Returns:
      All clients that have the given form theme configured as their default form theme.
    • getByDefaultFormThemePlugin

      public List<Mandant> getByDefaultFormThemePlugin(IEntityContext ec, String formThemePluginKey)
      Description copied from interface: IMandantDao
      Finds all clients that have one of the themes from the given form theme plugin configured as their default form theme. The returned list does not include clients that use the default system form theme.
      Specified by:
      getByDefaultFormThemePlugin in interface IMandantDao
      Parameters:
      ec - Entity context to use for accessing the database.
      formThemePluginKey - The key of the form theme plugin to search for.
      Returns:
      All clients that have one of the themes from the given form theme plugin configured as their default form theme.
    • readByName

      public Mandant readByName(IEntityContext ec, String name)
      Description copied from interface: IMandantDao
      Method for determining a clients by its name (case insensitive).
      Specified by:
      readByName in interface IMandantDao
      Parameters:
      ec - Entity context to use for accessing the database.
      name - The name of the client to search for (case insensitive).
      Returns:
      The client with the given name, or null if no such client exists.
    • getAllByName

      public List<Mandant> getAllByName(IEntityContext ec, String name)
      Description copied from interface: IMandantDao
      Method for determining all clients by its name (case insensitive).
      Specified by:
      getAllByName in interface IMandantDao
      Parameters:
      ec - Entity context to use for accessing the database.
      name - The name of the client to search for (case insensitive).
      Returns:
      All clients with the given name, never null.
    • getByUUID

      public Mandant getByUUID(IEntityContext ec, String uuid)
      Description copied from interface: IMandantDao
      Returns the client with the given UUID
      Specified by:
      getByUUID in interface IMandantDao
      Parameters:
      ec - Entity context to use for accessing the database.
      uuid - String UUID of the client
      Returns:
      The client with the given UUID, or null when no such client exists.
    • getByUUID

      public Mandant getByUUID(IEntityContext ec, UUID uuid)
      Description copied from interface: IMandantDao
      Returns the client with the given UUID
      Specified by:
      getByUUID in interface IMandantDao
      Parameters:
      ec - Entity context to use for accessing the database.
      uuid - UUID of the client
      Returns:
      Mandant for the given UUID
    • getUsedFileSize

      public long getUsedFileSize(IEntityContext ec, Mandant mandant)
      Specified by:
      getUsedFileSize in interface IMandantDao
    • getLicenseDataSnapshot

      public LicenseDataSnapshot getLicenseDataSnapshot(IEntityContext ec, Mandant client)
      Specified by:
      getLicenseDataSnapshot in interface IMandantDao
    • getPreActionHook

      protected IFCDaoActionHook<Mandant> getPreActionHook()
      Overrides:
      getPreActionHook in class GenericDao<Mandant>
    • getPostActionHook

      protected IFCDaoActionHook<Mandant> getPostActionHook()
      Overrides:
      getPostActionHook in class GenericDao<Mandant>