Package de.xima.fc.dao.impl
Class ClientFormThemeDao
- java.lang.Object
-
- de.xima.cmn.dao.AbstractDao<T,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 ofIClientFormThemeDao
that can be accessed viaDaoProvider
.- Since:
- 8.3.0
- Author:
- XIMA MEDIA GmbH
-
-
Constructor Summary
Constructors Constructor Description ClientFormThemeDao()
Creates a new instance of this DAO.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<ClientFormTheme>
allByClient(IEntityContext ec, Mandant client)
Finds all client form themes that are owned by the given client.ClientFormTheme
byName(IEntityContext ec, Mandant client, String name)
Fetches theClientFormTheme
with the given name from the given client.ClientFormTheme
byName(IEntityContext ec, UUID clientUuid, String name)
Fetches theClientFormTheme
with the given name from the given client.ClientFormTheme
byUuid(IEntityContext ec, long clientId, String uuid)
Fetches theClientFormTheme
with the given UUID from the given client.ClientFormTheme
byUuid(IEntityContext ec, long clientId, UUID uuid)
Fetches theClientFormTheme
with the given UUID from the given client.ClientFormTheme
byUuid(IEntityContext ec, Mandant client, String uuid)
Fetches theClientFormTheme
with the given UUID from the given client.ClientFormTheme
byUuid(IEntityContext ec, Mandant client, UUID uuid)
Fetches theClientFormTheme
with the given UUID from the given client.ClientFormTheme
byUuid(IEntityContext ec, String clientUuid, String uuid)
Fetches theClientFormTheme
with the given UUID from the given client.ClientFormTheme
byUuid(IEntityContext ec, String clientUuid, UUID uuid)
Fetches theClientFormTheme
with the given UUID from the given client.ClientFormTheme
byUuid(IEntityContext ec, UUID clientUuid, String uuid)
Fetches theClientFormTheme
with the given UUID from the given client.ClientFormTheme
byUuid(IEntityContext ec, UUID clientUuid, UUID uuid)
Fetches theClientFormTheme
with the given UUID from the given client.String
findUniqueName(IEntityContext ec, Mandant client, String candidateName)
Finds a new unique name for a (new) given client form theme.String
findUniqueName(IEntityContext ec, Mandant client, String candidateName, ClientFormTheme exclude)
Finds a new unique name for a (new) given client form theme.List<ClientFormTheme>
getByParentFormTheme(IEntityContext ec, Mandant client, FormThemeReference formTheme)
Finds all form versions that are associated with the given form theme.List<ClientFormTheme>
getByParentFormThemePlugin(IEntityContext ec, Mandant client, String formThemePluginKey)
Finds all form versions that are associated with a theme from the given form theme plugin.List<ClientFormTheme>
getByThemeReferences(IEntityContext ec, Mandant client, Set<FormThemeReference> themeReferences)
Gets a list ofclient form themes
from the given client that correspond to the givenform theme references
.List<ClientFormThemeFile>
getFilesByFormTheme(IEntityContext ec, ClientFormTheme clientFormTheme)
Reads all files contained in the given form theme.List<String>
themeNamesByClient(IEntityContext ec, Long clientId)
Gets the names of all form themes that are owned by the client with the given ID.List<String>
themeNamesByClient(IEntityContext ec, UUID clientUuid)
Gets the names of all form themes that are owned by the client with the given UUID.-
Methods inherited from class de.xima.fc.dao.impl.GenericDao
getEntityRefs, getPostActionHook, getPreActionHook, read
-
Methods inherited from class de.xima.cmn.dao.AbstractDao
all, bulkDelete, bulkUpdate, cb, checkLockingVersion, cq, create, create, delete, delete, deleteAll, executePagedDaoAction, getAttributes, getAttributes, getSingleAttributes, getSingleAttributes, getTransactionHandler, notifyListener, notifyListener, read, registerListener, registerListener, registerListener, resultTotalCount, setTransactionHandler, singleElement, unregisterListener, unregisterListener, unregisterListener, update, update
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.xima.cmn.dao.interfaces.IAbstractDao
all, bulkDelete, bulkUpdate, checkLockingVersion, create, create, delete, delete, deleteAll, executePagedDaoAction, getAttributes, getAttributes, getSingleAttributes, getSingleAttributes, getTransactionHandler, read, registerListener, registerListener, registerListener, resultTotalCount, setTransactionHandler, singleElement, unregisterListener, unregisterListener, unregisterListener, update, update
-
Methods inherited from interface de.xima.fc.dao.interfaces.IGenericDao
count, findAll, findSingle, getEntityRefs, read
-
-
-
-
Constructor Detail
-
ClientFormThemeDao
public ClientFormThemeDao()
Creates a new instance of this DAO. Normally you should use the singleton instance provided byDaoProvider.CLIENTFORMTHEME_DAO
.
-
-
Method Detail
-
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 interfaceIClientFormThemeDao
- 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 theClientFormTheme
with the given name from the given client.- Specified by:
byName
in interfaceIClientFormThemeDao
- 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 theClientFormTheme
with the given name from the given client.- Specified by:
byName
in interfaceIClientFormThemeDao
- 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 theClientFormTheme
with the given UUID from the given client.- Specified by:
byUuid
in interfaceIClientFormThemeDao
- 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 theClientFormTheme
with the given UUID from the given client.- Specified by:
byUuid
in interfaceIClientFormThemeDao
- 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 theClientFormTheme
with the given UUID from the given client.- Specified by:
byUuid
in interfaceIClientFormThemeDao
- 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 theClientFormTheme
with the given UUID from the given client.- Specified by:
byUuid
in interfaceIClientFormThemeDao
- 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 theClientFormTheme
with the given UUID from the given client.- Specified by:
byUuid
in interfaceIClientFormThemeDao
- 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 theClientFormTheme
with the given UUID from the given client.- Specified by:
byUuid
in interfaceIClientFormThemeDao
- 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 theClientFormTheme
with the given UUID from the given client.- Specified by:
byUuid
in interfaceIClientFormThemeDao
- 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 theClientFormTheme
with the given UUID from the given client.- Specified by:
byUuid
in interfaceIClientFormThemeDao
- 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 interfaceIClientFormThemeDao
- 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 interfaceIClientFormThemeDao
- 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 interfaceIClientFormThemeDao
- 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 interfaceIClientFormThemeDao
- 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 ofclient form themes
from the given client that correspond to the givenform theme references
. Client form themes from different clients and form themes of different types are omitted.- Specified by:
getByThemeReferences
in interfaceIClientFormThemeDao
- Parameters:
ec
- Entity context to use for accessing the database.client
- Theclient
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 interfaceIClientFormThemeDao
- 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 interfaceIClientFormThemeDao
- 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 interfaceIClientFormThemeDao
- 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.
-
-