Class ProjektDao
java.lang.Object
- All Implemented Interfaces:
de.xima.cmn.dao.interfaces.IAbstractDao<Projekt, Long, IEntityContext>, IGenericDao<Projekt>, IMandantDependentBaseDao<Projekt>, IProjektDao
@ApplicationScoped
public class ProjektDao
extends MandantDependentBaseDao<Projekt>
implements IProjektDao
-
Field Summary
Fields inherited from class de.xima.cmn.dao.AbstractDao
entityClass, LOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallByClient(IEntityContext ec, Mandant client, boolean includeTemplates) allByClient(IEntityContext ec, Mandant client, String scope, boolean includeTemplates) allByMandant(IEntityContext ec, Mandant mandant) Deprecated.allEditableProjects(IEntityContext ec, Benutzer benutzer, Mandant mandant, String projectScope, boolean includeTemplates) Deprecated.allEditableProjects(IEntityContext ec, Benutzer benutzer, Mandant mandant, String projectScope, boolean includeTemplates, de.xima.cmn.criteria.QueryCriteriaManager customQcm) Deprecated.allTemplatesByClient(IEntityContext ec, Mandant client) allTemplatesByClient(IEntityContext ec, Mandant client, String scope) allVisibleProjects(IEntityContext ec, Benutzer benutzer, Mandant mandant, String projectScope, boolean includeTemplates) Deprecated.allVisibleProjects(IEntityContext ec, Benutzer benutzer, Mandant mandant, String projectScope, boolean includeTemplates, de.xima.cmn.criteria.QueryCriteriaManager customQcm) Deprecated.de.xima.cmn.criteria.QueryCriteriaManagerallVisibleProjectsQcm(IEntityContext ec, Benutzer user, Mandant client, String projectScope, boolean includeTemplates) Deprecated.findUniqueName(IEntityContext ec, Mandant client, String candidate, Projekt exclude) Returns a name that is not taken by anotherProjektin the given client other than the excluded data source.findUniqueTitle(IEntityContext ec, Mandant client, String candidate, Projekt exclude) Returns a title that is not taken by anotherProjektin the given client other than the excluded data source.getAccessableProjects(IEntityContext ec, IUser user, Mandant client) Returns all projects which are editable or visible by the user groups of the user in the given client.getByUserPortal(IEntityContext ec, UUID userPortalUuid, UUID formUuid) getByUUID(IEntityContext ec, Mandant client, String uuid) Gets a project by its UUID.getByUUID(IEntityContext ec, Mandant client, UUID uuid) Gets a project by its UUID.getByUUID(IEntityContext ec, Long clientId, UUID uuid) Gets a project by its UUID.getByUUID(IEntityContext ec, UUID clientUuid, UUID uuid) Gets a project by its UUID.protected IFCDaoActionHook<Projekt> protected IFCDaoActionHook<Projekt> byte[]getPreviewImage(IEntityContext ec, Projekt project) getPreviewImageVersion(IEntityContext ec, Projekt project) intgetProjectsCount(IEntityContext ec, ProjectsPageQuery projectPageRequest) Returns the number of projects for the given page request and filter.getProjectsPage(IEntityContext ec, PageQuery pageQuery, ProjectsPageQuery projectPageRequest, boolean skipCount) Returns all projects for the given page request and filter.getProjectsWithPreviewImage(IEntityContext ec, Mandant client) getProjektByEditorBenutzer(IEntityContext ec, Benutzer benutzer, Mandant mandant) Deprecated.getProjektByEditorBenutzer(IEntityContext ec, Benutzer benutzer, Mandant mandant, String projectScope) Deprecated.getUserPortalProjectFile(IEntityContext ec, UUID portalUuid, UUID clientUuid, UUID projectUuid, UUID fileUuid) Returns the project file with the given file UUID in the context of the user portal with the given UUID.booleanisActivationAllowed(IEntityContext ec, Projekt projekt) booleanisEditingAllowed(IEntityContext ec, Projekt p, Benutzer ben) Deprecated.booleanisFsAllowed(IEntityContext ec, Projekt project, FrontendServer fs) booleanisNameExisiting(IEntityContext ec, Mandant client, String name) Returns whether or not the given project name exists within the given clientbooleanisTitleExisiting(IEntityContext ec, Mandant client, String name) Returns whether or not the given project title exists within the given clientbooleanisZugriffsberechtigt(IEntityContext ec, Projekt project, Benutzer user) Deprecated.voidupdatePreviewImage(IEntityContext ec, Projekt project, byte[] data) updateProjectRecords(IEntityContext ec, IProjectRecordsParameters parameter) Performs a bulk update of form records based on the given project.Methods inherited from class GenericDao
getEntityRefs, readMethods 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, updateMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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, updateMethods inherited from interface IGenericDao
count, createOrUpdate, findAll, findSingle, getEntityRefs, read
-
Constructor Details
-
ProjektDao
public ProjektDao()
-
-
Method Details
-
getByUUID
Description copied from interface:IProjektDaoGets a project by its UUID. The project must be in the given client.- Specified by:
getByUUIDin interfaceIProjektDao- Parameters:
ec- Entity context for accessing the database.client- The client to which the project must belong.uuid- UUID of the project to get.- Returns:
- The project with the given UUID in the given client, or
nullif no such project exists.
-
getByUUID
Description copied from interface:IProjektDaoGets a project by its UUID. The project must be in the given client.- Specified by:
getByUUIDin interfaceIProjektDao- Parameters:
ec- Entity context for accessing the database.clientUuid- UUID of the client to which the project must belong.uuid- UUID of the project to get.- Returns:
- The project with the given UUID in the given client, or
nullif no such project exists.
-
getByUUID
Description copied from interface:IProjektDaoGets a project by its UUID. The project must be in the given client.- Specified by:
getByUUIDin interfaceIProjektDao- Parameters:
ec- Entity context for accessing the database.clientId- ID of the client to which the project must belong.uuid- UUID of the project to get.- Returns:
- The project with the given UUID in the given client, or
nullif no such project exists.
-
getByUUID
Description copied from interface:IProjektDaoGets a project by its UUID. The project must be in the given client.- Specified by:
getByUUIDin interfaceIProjektDao- Parameters:
ec- Entity context for accessing the database.client- The client to which the project must belong.uuid- UUID of the project to get.- Returns:
- The project with the given UUID in the given client, or
nullif no such project exists.
-
getUserPortalProjectFile
public ProjectFile getUserPortalProjectFile(IEntityContext ec, UUID portalUuid, UUID clientUuid, UUID projectUuid, UUID fileUuid) Description copied from interface:IProjektDaoReturns the project file with the given file UUID in the context of the user portal with the given UUID.- Specified by:
getUserPortalProjectFilein interfaceIProjektDao- Parameters:
ec- Entity context for accessing the database.portalUuid- UUID of the user portal (context).clientUuid- UUID of the client (context).projectUuid- UUID of the project.fileUuid- UUID of the project file.- Returns:
- The project file with the given UUID, or
nullif no such project file exists.
-
getPreviewImage
- Specified by:
getPreviewImagein interfaceIProjektDao
-
getPreviewImageVersion
- Specified by:
getPreviewImageVersionin interfaceIProjektDao- Parameters:
ec- Entity context for accessing the database.project- Project for which to find the preview image.- Returns:
- The current (locking) version of the preview image.
-
isActivationAllowed
- Specified by:
isActivationAllowedin interfaceIProjektDao
-
isFsAllowed
- Specified by:
isFsAllowedin interfaceIProjektDao
-
allByClient
- Specified by:
allByClientin interfaceIProjektDao
-
allByClient
public List<Projekt> allByClient(IEntityContext ec, Mandant client, String scope, boolean includeTemplates) - Specified by:
allByClientin interfaceIProjektDao
-
allTemplatesByClient
- Specified by:
allTemplatesByClientin interfaceIProjektDao
-
findUniqueName
Description copied from interface:IProjektDaoReturns a name that is not taken by anotherProjektin the given client other than the excluded data source. An index will be added to the candidate if necessary.- Specified by:
findUniqueNamein interfaceIProjektDao- Parameters:
ec-IEntityContextto be usedclient-Mandantfor which a unique project name should be generatedcandidate-Stringproject name candiate to be made uniqueexclude-Projektproject to be excluded from search- Returns:
- unique project name in the context of the given client
-
findUniqueTitle
Description copied from interface:IProjektDaoReturns a title that is not taken by anotherProjektin the given client other than the excluded data source. An index will be added to the candidate if necessary.- Specified by:
findUniqueTitlein interfaceIProjektDao- Parameters:
ec-IEntityContextto be usedclient-Mandantfor which a unique project title should be generatedcandidate-Stringproject title candiate to be made uniqueexclude-Projektproject to be excluded from search- Returns:
- unique project title in the context of the given client
-
isNameExisiting
Description copied from interface:IProjektDaoReturns whether or not the given project name exists within the given client- Specified by:
isNameExisitingin interfaceIProjektDao- Parameters:
ec-IEntityContextto be usedclient-Mandantfor which to check uniquenessname- Project name to check- Returns:
- whether or not the given name is unique
-
isTitleExisiting
Description copied from interface:IProjektDaoReturns whether or not the given project title exists within the given client- Specified by:
isTitleExisitingin interfaceIProjektDao- Parameters:
ec-IEntityContextto be usedclient-Mandantfor which to check uniquenessname- Project title to check- Returns:
- whether or not the given title is unique
-
allTemplatesByClient
- Specified by:
allTemplatesByClientin interfaceIProjektDao
-
updatePreviewImage
- Specified by:
updatePreviewImagein interfaceIProjektDao
-
getPreActionHook
- Overrides:
getPreActionHookin classGenericDao<Projekt>
-
getPostActionHook
- Overrides:
getPostActionHookin classGenericDao<Projekt>
-
getProjectsWithPreviewImage
- Specified by:
getProjectsWithPreviewImagein interfaceIProjektDao- Parameters:
ec- Entity context for accessing the database.client- Client to which to limit the search. May benull, in which case no restriction is applied.- Returns:
- A list of all IDs of projects for which a preview image is available.
-
getAccessableProjects
Description copied from interface:IProjektDaoReturns all projects which are editable or visible by the user groups of the user in the given client.- Specified by:
getAccessableProjectsin interfaceIProjektDao- Parameters:
ec-IEntityContextto be useduser-IUserwho has the user groupsclient-Mandantcontaining the user groups- Returns:
- all projects which are visible or editable for the user in the given client
-
getProjectsPage
public PagedResult<Projekt> getProjectsPage(IEntityContext ec, PageQuery pageQuery, ProjectsPageQuery projectPageRequest, boolean skipCount) Description copied from interface:IProjektDaoReturns all projects for the given page request and filter.- Specified by:
getProjectsPagein interfaceIProjektDao- Parameters:
ec- entity context for database transactions.pageQuery- page request defining the page and page size.projectPageRequest- page request defining the user portal, filters.skipCount- whether to skip the count query.- Returns:
- all projects enabled for the given user portal.
-
getProjectsCount
Description copied from interface:IProjektDaoReturns the number of projects for the given page request and filter.- Specified by:
getProjectsCountin interfaceIProjektDao- Parameters:
ec- user context for database transactions.projectPageRequest- page request defining the user portal, filters.- Returns:
- the number of projects enabled for the given user portal.
-
updateProjectRecords
public IProjectRecordsBulkUpdateResult updateProjectRecords(IEntityContext ec, IProjectRecordsParameters parameter) throws Exception Description copied from interface:IProjektDaoPerforms a bulk update of form records based on the given project.- Specified by:
updateProjectRecordsin interfaceIProjektDao- Parameters:
ec- Entity context for accessing the database.parameter- Parameters for the bulk update operation.- Returns:
- Result of the bulk update operation.
- Throws:
Exception- if a hard error occurs during the bulk update operation.
-
getByUserPortal
- Specified by:
getByUserPortalin interfaceIProjektDao
-
allByMandant
Deprecated.- Specified by:
allByMandantin interfaceIProjektDao
-
isZugriffsberechtigt
Deprecated.- Specified by:
isZugriffsberechtigtin interfaceIProjektDao
-
isEditingAllowed
Deprecated.- Specified by:
isEditingAllowedin interfaceIProjektDao
-
getProjektByEditorBenutzer
@Deprecated public List<Projekt> getProjektByEditorBenutzer(IEntityContext ec, Benutzer benutzer, Mandant mandant) Deprecated.- Specified by:
getProjektByEditorBenutzerin interfaceIProjektDao
-
getProjektByEditorBenutzer
@Deprecated public List<Projekt> getProjektByEditorBenutzer(IEntityContext ec, Benutzer benutzer, Mandant mandant, String projectScope) Deprecated.- Specified by:
getProjektByEditorBenutzerin interfaceIProjektDao
-
allVisibleProjects
@Deprecated public List<Projekt> allVisibleProjects(IEntityContext ec, Benutzer benutzer, Mandant mandant, String projectScope, boolean includeTemplates) Deprecated.- Specified by:
allVisibleProjectsin interfaceIProjektDao
-
allVisibleProjects
@Deprecated public List<Projekt> allVisibleProjects(IEntityContext ec, Benutzer benutzer, Mandant mandant, String projectScope, boolean includeTemplates, de.xima.cmn.criteria.QueryCriteriaManager customQcm) Deprecated.- Specified by:
allVisibleProjectsin interfaceIProjektDao
-
allVisibleProjectsQcm
@Deprecated public de.xima.cmn.criteria.QueryCriteriaManager allVisibleProjectsQcm(IEntityContext ec, Benutzer user, Mandant client, String projectScope, boolean includeTemplates) Deprecated.- Specified by:
allVisibleProjectsQcmin interfaceIProjektDao
-
allEditableProjects
@Deprecated public List<Projekt> allEditableProjects(IEntityContext ec, Benutzer benutzer, Mandant mandant, String projectScope, boolean includeTemplates) Deprecated.- Specified by:
allEditableProjectsin interfaceIProjektDao
-
allEditableProjects
@Deprecated public List<Projekt> allEditableProjects(IEntityContext ec, Benutzer benutzer, Mandant mandant, String projectScope, boolean includeTemplates, de.xima.cmn.criteria.QueryCriteriaManager customQcm) Deprecated.- Specified by:
allEditableProjectsin interfaceIProjektDao
-
allByClient(IEntityContext, Mandant, boolean)