Class ClientFormThemeDao

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

public class ClientFormThemeDao extends GenericDao<ClientFormTheme> implements IClientFormThemeDao
The default implementation of IClientFormThemeDao that can be accessed via DaoProvider.
Since:
8.3.0
Author:
XIMA MEDIA GmbH
  • Constructor Details

    • ClientFormThemeDao

      public ClientFormThemeDao()
      Creates a new instance of this DAO. Normally you should use the singleton instance provided by DaoProvider.CLIENTFORMTHEME_DAO.
  • Method Details

    • allByClient

      public List<ClientFormTheme> allByClient(IEntityContext ec, Mandant client)
      Description copied from interface: IClientFormThemeDao
      Finds all client form themes that are owned by the given client.
      Specified by:
      allByClient in interface IClientFormThemeDao
      Parameters:
      ec - Entity context for accessing the database.
      client - The client to which to limit the search.
      Returns:
      All client form themes that are owned by the given client.
    • byName

      public ClientFormTheme byName(IEntityContext ec, Mandant client, String name)
      Description copied from interface: IClientFormThemeDao
      Fetches the ClientFormTheme with the given name from the given client.
      Specified by:
      byName in interface IClientFormThemeDao
      Parameters:
      ec - Entity context to use for accessing the database.
      client - The client where to search for the form theme.
      name - The name of the form theme to find.
      Returns:
      The form theme with the given name, or null if no such form theme exists.
    • byName

      public ClientFormTheme byName(IEntityContext ec, UUID clientUuid, String name)
      Description copied from interface: IClientFormThemeDao
      Fetches the ClientFormTheme with the given name from the given client.
      Specified by:
      byName in interface IClientFormThemeDao
      Parameters:
      ec - Entity context to use for accessing the database.
      clientUuid - The UUID of the client where to search for the form theme.
      name - The name of the form theme to find.
      Returns:
      The form theme with the given name, or null if no such form theme exists.
    • byUuid

      public ClientFormTheme byUuid(IEntityContext ec, Mandant client, String uuid)
      Description copied from interface: IClientFormThemeDao
      Fetches the ClientFormTheme with the given UUID from the given client.
      Specified by:
      byUuid in interface IClientFormThemeDao
      Parameters:
      ec - Entity context to use for accessing the database.
      client - The client where to search for the form theme.
      uuid - The UUID of the form theme to find.
      Returns:
      The form theme with the given UUID, or null if no such form theme exists.
    • byUuid

      public ClientFormTheme byUuid(IEntityContext ec, Mandant client, UUID uuid)
      Description copied from interface: IClientFormThemeDao
      Fetches the ClientFormTheme with the given UUID from the given client.
      Specified by:
      byUuid in interface IClientFormThemeDao
      Parameters:
      ec - Entity context to use for accessing the database.
      client - The client where to search for the form theme.
      uuid - The UUID of the form theme to find.
      Returns:
      The form theme with the given UUID, or null if no such form theme exists.
    • byUuid

      public ClientFormTheme byUuid(IEntityContext ec, long clientId, String uuid)
      Description copied from interface: IClientFormThemeDao
      Fetches the ClientFormTheme with the given UUID from the given client.
      Specified by:
      byUuid in interface IClientFormThemeDao
      Parameters:
      ec - Entity context to use for accessing the database.
      clientId - The ID of the client where to search for the form theme.
      uuid - The UUID of the form theme to find.
      Returns:
      The form theme with the given UUID, or null if no such form theme exists.
    • byUuid

      public ClientFormTheme byUuid(IEntityContext ec, long clientId, UUID uuid)
      Description copied from interface: IClientFormThemeDao
      Fetches the ClientFormTheme with the given UUID from the given client.
      Specified by:
      byUuid in interface IClientFormThemeDao
      Parameters:
      ec - Entity context to use for accessing the database.
      clientId - The ID of the client where to search for the form theme.
      uuid - The UUID of the form theme to find.
      Returns:
      The form theme with the given UUID, or null if no such form theme exists.
    • byUuid

      public ClientFormTheme byUuid(IEntityContext ec, UUID clientUuid, String uuid)
      Description copied from interface: IClientFormThemeDao
      Fetches the ClientFormTheme with the given UUID from the given client.
      Specified by:
      byUuid in interface IClientFormThemeDao
      Parameters:
      ec - Entity context to use for accessing the database.
      clientUuid - The UUID of the client where to search for the form theme.
      uuid - The UUID of the form theme to find.
      Returns:
      The form theme with the given UUID, or null if no such form theme exists.
    • byUuid

      public ClientFormTheme byUuid(IEntityContext ec, UUID clientUuid, UUID uuid)
      Description copied from interface: IClientFormThemeDao
      Fetches the ClientFormTheme with the given UUID from the given client.
      Specified by:
      byUuid in interface IClientFormThemeDao
      Parameters:
      ec - Entity context to use for accessing the database.
      clientUuid - The UUID of the client where to search for the form theme.
      uuid - The UUID of the form theme to find.
      Returns:
      The form theme with the given UUID, or null if no such form theme exists.
    • byUuid

      public ClientFormTheme byUuid(IEntityContext ec, String clientUuid, String uuid)
      Description copied from interface: IClientFormThemeDao
      Fetches the ClientFormTheme with the given UUID from the given client.
      Specified by:
      byUuid in interface IClientFormThemeDao
      Parameters:
      ec - Entity context to use for accessing the database.
      clientUuid - The UUID of the client where to search for the form theme.
      uuid - The UUID of the form theme to find.
      Returns:
      The form theme with the given UUID, or null if no such form theme exists.
    • byUuid

      public ClientFormTheme byUuid(IEntityContext ec, String clientUuid, UUID uuid)
      Description copied from interface: IClientFormThemeDao
      Fetches the ClientFormTheme with the given UUID from the given client.
      Specified by:
      byUuid in interface IClientFormThemeDao
      Parameters:
      ec - Entity context to use for accessing the database.
      clientUuid - The UUID of the client where to search for the form theme.
      uuid - The UUID of the form theme to find.
      Returns:
      The form theme with the given UUID, or null if no such form theme exists.
    • findUniqueName

      public String findUniqueName(IEntityContext ec, Mandant client, String candidateName)
      Description copied from interface: IClientFormThemeDao
      Finds a new unique name for a (new) given client form theme. The returned name is unique amongst all client form themes of the given client. The returned name is based on the given candidate name. If no theme with the candidate name exists, the candidate name is returned.
      Specified by:
      findUniqueName in interface IClientFormThemeDao
      Parameters:
      ec - Entity context to use for accessing the database.
      client - A client with form themes to check for uniqueness.
      candidateName - A candidate name to make unique.
      Returns:
      A unique name based on the candidate name.
    • findUniqueName

      public String findUniqueName(IEntityContext ec, Mandant client, String candidateName, ClientFormTheme exclude)
      Description copied from interface: IClientFormThemeDao
      Finds a new unique name for a (new) given client form theme. The returned name is unique amongst all client form themes of the given client. The returned name is based on the given candidate name. If no theme with the candidate name exists, the candidate name is returned.
      Specified by:
      findUniqueName in interface IClientFormThemeDao
      Parameters:
      ec - Entity context to use for accessing the database.
      client - A client with form themes to check for uniqueness.
      candidateName - A candidate name to make unique.
      exclude - Optional. When given, the name of this client form theme is excluded from the uniqueness check.
      Returns:
      A unique name based on the candidate name.
    • getByParentFormTheme

      public List<ClientFormTheme> getByParentFormTheme(IEntityContext ec, Mandant client, FormThemeReference formTheme)
      Description copied from interface: IClientFormThemeDao
      Finds all form versions that are associated with the given form theme.
      Specified by:
      getByParentFormTheme in interface IClientFormThemeDao
      Parameters:
      ec - Entity context for accessing the database.
      client - The client to which to limit the search. May be null to search all clients.
      formTheme - The form theme reference to search for.
      Returns:
      All form versions that are associated with the given form theme.
    • getByParentFormThemePlugin

      public List<ClientFormTheme> getByParentFormThemePlugin(IEntityContext ec, Mandant client, String formThemePluginKey)
      Description copied from interface: IClientFormThemeDao
      Finds all form versions that are associated with a theme from the given form theme plugin.
      Specified by:
      getByParentFormThemePlugin in interface IClientFormThemeDao
      Parameters:
      ec - Entity context for accessing the database.
      client - The client to which to limit the search. May be null to search all clients.
      formThemePluginKey - The key of the form theme plugin to search for.
      Returns:
      All form versions that are associated with a theme from the given form theme plugin.
    • getByThemeReferences

      public List<ClientFormTheme> getByThemeReferences(IEntityContext ec, Mandant client, Set<FormThemeReference> themeReferences)
      Description copied from interface: IClientFormThemeDao
      Gets a list of client form themes from the given client that correspond to the given form theme references. Client form themes from different clients and form themes of different types are omitted.
      Specified by:
      getByThemeReferences in interface IClientFormThemeDao
      Parameters:
      ec - Entity context to use for accessing the database.
      client - The client from which to get the client form themes.
      themeReferences - The theme references to process. Only references to client form themes of the given client are considered, all other references are ignored.
      Returns:
      A list of client form themes that are associated with the given project.
    • getFilesByFormTheme

      public List<ClientFormThemeFile> getFilesByFormTheme(IEntityContext ec, ClientFormTheme clientFormTheme)
      Description copied from interface: IClientFormThemeDao
      Reads all files contained in the given form theme.
      Specified by:
      getFilesByFormTheme in interface IClientFormThemeDao
      Parameters:
      ec - Entity context for accessing the database.
      clientFormTheme - The form theme to read the files for.
      Returns:
      A list of all files from the given form theme.
    • themeNamesByClient

      public List<String> themeNamesByClient(IEntityContext ec, Long clientId)
      Description copied from interface: IClientFormThemeDao
      Gets the names of all form themes that are owned by the client with the given ID.
      Specified by:
      themeNamesByClient in interface IClientFormThemeDao
      Parameters:
      ec - Entity context for accessing the database.
      clientId - The ID of the client to get the form themes for.
      Returns:
      A list of all form theme names that are owned by the client with the given ID.
    • themeNamesByClient

      public List<String> themeNamesByClient(IEntityContext ec, UUID clientUuid)
      Description copied from interface: IClientFormThemeDao
      Gets the names of all form themes that are owned by the client with the given UUID.
      Specified by:
      themeNamesByClient in interface IClientFormThemeDao
      Parameters:
      ec - Entity context for accessing the database.
      clientUuid - The UUID of the client to get the form themes for.
      Returns:
      A list of all form theme names that are owned by the client with the given ID.