Package de.xima.fc.dao.interfaces
Interface IVorgangDao
-
- All Superinterfaces:
de.xima.cmn.dao.interfaces.IAbstractDao<Vorgang,Long,IEntityContext>,IGenericDao<Vorgang>
- All Known Implementing Classes:
VorgangDao
public interface IVorgangDao extends IGenericDao<Vorgang>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description VorgangaddSubmission(IEntityContext ec, Vorgang formRecord, IUser user, EFormRecordSubmitContext submitContext, FrontendServer submitFrontendServer, String submitServerBaseUrl, String formData, boolean newDataEntry)Deprecated.VorgangaddSubmission(IEntityContext ec, Vorgang formRecord, IUser user, EFormRecordSubmitContext submitContext, FrontendServer submitFrontendServer, String submitServerBaseUrl, Locale submitLocale, String formData, boolean newDataEntry)Adds a new submission to the form record.List<Vorgang>allByPostfach(IEntityContext ec, Postfach postfach)List<Vorgang>allByProjekt(IEntityContext ec, Projekt pro)intbulkdDeleteAll(IEntityContext ec, Postfach postfach)Deprecated.intbulkdDeleteAll(IEntityContext ec, Projekt project)Deprecated.intbulkDelete(IEntityContext ec, List<Long> formRecordIds)Bulk deletes all form records with the given IDs iff the authenticated user given by the entity context has permission to access the form records and the form records can be deleted (the state allows deletion).intbulkDeleteAll(IEntityContext ec, Postfach postfach)intbulkDeleteAll(IEntityContext ec, Projekt project)intbulkMarkRead(IEntityContext ec, List<Long> formRecordIds, boolean read)Bulk updates the 'read' value of all form records with the given IDs to the given 'read' value iff the authenticated user given by the entity context has permission to access the form records.intbulkMove(IEntityContext ec, Set<Long> formRecordIds, Postfach inbox)Bulk moves all form records with the given IDs to the given inbox iff the authenticated user given by the entity context has permission to access the form records.VorgangcorrectStatus(IEntityContext ec, Vorgang formRecord, Status targetState, Benutzer user)Deprecated.VorgangcorrectStatus(IEntityContext ec, Vorgang formRecord, Status targetState, IUser user)voiddeleteAll(IEntityContext ec, Postfach postfach)Deprecated.voiddeleteAll(IEntityContext ec, Projekt selected)Deprecated.intdeleteAllUnverified(IEntityContext ec)booleanexistsIdentityToken(IEntityContext ec, Vorgang formRecord, String identityToken, Projekt project)Checks whether there exists any form record that belongs to the same project as the given project is not the same as the given form record but has got the same identity token as the given tokenVorganggetByProzessId(IEntityContext ec, String prozessId)List<Vorgang>getByUser(IEntityContext ec, IUser user)Gets a list of all form records the user has submitted at some point, in descending order of their (last) modification instant.PagedResult<Vorgang>getByUser(IEntityContext ec, IUser user, int page, int pageSize, int offset)Deprecated.VorganggetByUUID(IEntityContext ec, String uuid)Returns the form record with the given UUIDVorganggetByUUID(IEntityContext ec, UUID uuid)Returns the form record with the given UUIDVorganggetByUuidAndUser(IEntityContext ec, UUID uuid, IUser user)Finds the form record for the given UUID if the given user has submitted it at some point.VorganggetByVerifyId(IEntityContext ec, String verifyId)GetsVorgangby its Verify-IDList<Vorgang>getChildren(IEntityContext ec, Vorgang formRecord)intgetCountByAuthenticatorDependentCreator(IEntityContext ec, IAuthenticator<?> authenticator)Returns the number of form records that have a creator that is dependent on this authenticator.StringgetFormData(IEntityContext ec, Vorgang v)VorganggetParent(IEntityContext ec, Vorgang formRecord)Map<Long,Integer>getUnreadChatCounts(IEntityContext ec, IUser user, Set<Long> formRecordIds)Returns the number of chats that are unread for the given user and form record IDs.List<Vorgang>getVorgaengeByBenutzer(IEntityContext ec, Benutzer benutzer)Deprecated.VorgangsetFormData(IEntityContext ec, Vorgang process, String formData)Deprecated.-
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
-
-
-
-
Method Detail
-
getByProzessId
Vorgang getByProzessId(IEntityContext ec, String prozessId)
-
getByVerifyId
Vorgang getByVerifyId(IEntityContext ec, String verifyId)
GetsVorgangby its Verify-ID- Parameters:
ec-IEntityContextverifyId-String- Returns:
Vorgang- Since:
- 6.0.0
-
getByUuidAndUser
@Nullable Vorgang getByUuidAndUser(IEntityContext ec, UUID uuid, IUser user)
Finds the form record for the given UUID if the given user has submitted it at some point.- Parameters:
ec- entity context for accessing the database.uuid- the UUID of the form recorduser- to get the form record for.- Returns:
- The form record with the given UUID if it exists and the user has submitted it at one point.
nullotherwise. - Since:
- 8.2.0
-
getByUser
List<Vorgang> getByUser(IEntityContext ec, IUser user)
Gets a list of all form records the user has submitted at some point, in descending order of their (last) modification instant.- Parameters:
ec- entity context for database transactions.user- that has submitted the form records at some point.- Returns:
- a list of all form records the user has submitted at some point, in descending order of their (last) modification instant.
- Since:
- 8.2.0
-
getByUser
@Deprecated PagedResult<Vorgang> getByUser(IEntityContext ec, IUser user, int page, int pageSize, int offset)
Deprecated.Gets a sub list of form records the user has submitted at some point, in descending order of their (last) modification instant.- Parameters:
ec- entity context for database transactions.user- that has submitted the form records at some point.page- to get. Identifies the page by page number. The first page number is 1.pageSize- size of the page to get. Defines the size of the returned sub list.offset- The number of form records to skip before starting to collect the result. The offset starts at the beginning of the page given by the page number parameter.- Returns:
- a sub list of form records the user has submitted at some point, in descending order of their (last) modification instant.
- Since:
- 8.2.0
-
allByProjekt
List<Vorgang> allByProjekt(IEntityContext ec, Projekt pro)
-
allByPostfach
List<Vorgang> allByPostfach(IEntityContext ec, Postfach postfach)
-
getFormData
String getFormData(IEntityContext ec, Vorgang v)
-
setFormData
@Deprecated Vorgang setFormData(IEntityContext ec, Vorgang process, String formData)
Deprecated.- Parameters:
ec-IEntityContextprocess- the process to set the form-data toformData- the form-data to set- Returns:
- the process with the new form-data
-
deleteAll
@Deprecated void deleteAll(IEntityContext ec, Projekt selected)
Deprecated.- Parameters:
ec-IEntityContextselected-Projekt
-
bulkdDeleteAll
@Deprecated int bulkdDeleteAll(IEntityContext ec, Projekt project)
Deprecated.- Parameters:
ec-IEntityContextfor accessing the database.project-Projektto which the form record belongs.- Returns:
- count of deleted entries
-
bulkDeleteAll
int bulkDeleteAll(IEntityContext ec, Projekt project)
- Parameters:
ec-IEntityContextfor accessing the database.project-Projektto which the form record belongs.- Returns:
- count of deleted entries
- Since:
- 6.0.2
-
deleteAll
@Deprecated void deleteAll(IEntityContext ec, Postfach postfach)
Deprecated.- Parameters:
ec- {IEntityContextfor accessing the database.postfach-Postfachin which the form set is located.
-
bulkdDeleteAll
@Deprecated int bulkdDeleteAll(IEntityContext ec, Postfach postfach)
Deprecated.- Parameters:
ec-IEntityContextfor accessing the database.postfach-Postfachin which the form set is located.
-
bulkDeleteAll
int bulkDeleteAll(IEntityContext ec, Postfach postfach)
- Parameters:
ec-IEntityContextfor accessing the database.postfach-Postfachin which the form set is located.- Since:
- 6.0.2
-
existsIdentityToken
boolean existsIdentityToken(IEntityContext ec, Vorgang formRecord, String identityToken, Projekt project)
Checks whether there exists any form record that- belongs to the same project as the given project
- is not the same as the given form record
- but has got the same identity token as the given token
- Parameters:
ec- Entity context for accessing the database.formRecord- Current form record. Ifnull, allows all form records for the given project.identityToken- New identity token to be checked.project- Project to which the form record belongs.- Returns:
- True iff a form record with the given identity token exists already.
-
deleteAllUnverified
int deleteAllUnverified(IEntityContext ec)
- Parameters:
ec- Entity context for accessing the database.
-
correctStatus
Vorgang correctStatus(IEntityContext ec, Vorgang formRecord, Status targetState, IUser user)
-
bulkMarkRead
int bulkMarkRead(IEntityContext ec, List<Long> formRecordIds, boolean read)
Bulk updates the 'read' value of all form records with the given IDs to the given 'read' value iff the authenticated user given by the entity context has permission to access the form records. If the entity context does not provide an authenticated user (e.g. avirtual user) no form records will be updated.- Parameters:
ec-IEntityContextwith an authenticated user for database transactions. For creating an entity context for an authenticated user seeEntityContextFactory.newEntityContext(IUser).formRecordIds-Listof IDs of the form records that the user requests to be updated.read-Booleanvalue to set the attribute 'gelesen' to- Returns:
- the number of updated records.
- Throws:
de.xima.cmn.dao.exceptions.UpdateException- if the given entity context does not provide an authenticated user.- Since:
- 6.2.1
-
bulkMove
int bulkMove(IEntityContext ec, Set<Long> formRecordIds, Postfach inbox)
Bulk moves all form records with the given IDs to the given inbox iff the authenticated user given by the entity context has permission to access the form records. If the entity context does not provide an authenticated user (e.g. avirtual user) no form records will be updated.- Parameters:
ec-IEntityContextwith an authenticated user for database transactions. For creating an entity context for an authenticated user seeEntityContextFactory.newEntityContext(IUser).formRecordIds-Setof IDs of the form records that the user requests to be updated.- Returns:
- the number of updated records.
- Throws:
de.xima.cmn.dao.exceptions.UpdateException- if the given entity context does not provide an authenticated user.- Since:
- 8.0.2
-
bulkDelete
int bulkDelete(IEntityContext ec, List<Long> formRecordIds) throws de.xima.cmn.dao.exceptions.DeleteException
Bulk deletes all form records with the given IDs iff the authenticated user given by the entity context has permission to access the form records and the form records can be deleted (the state allows deletion). If the entity context does not provide an authenticated user (e.g. avirtual user) no form records will be deleted.- Parameters:
ec-IEntityContextwith an authenticated user for database transactions. For creating an entity context for an authenticated user seeEntityContextFactory.newEntityContext(IUser).formRecordIds-Listof IDs of the form records that the user requests to be deleted.- Returns:
- the number of deleted form records.
- Throws:
de.xima.cmn.dao.exceptions.DeleteException- if the given entity context does not provide an authenticated user.- Since:
- 8.0.2
-
getByUUID
Vorgang getByUUID(IEntityContext ec, String uuid)
Returns the form record with the given UUID- Parameters:
ec-IEntityContextto useuuid-StringUUID of the template- Returns:
- The appointment template for the given UUID
-
getByUUID
Vorgang getByUUID(IEntityContext ec, UUID uuid)
Returns the form record with the given UUID- Parameters:
ec-IEntityContextto useuuid-UUIDUUID of the template- Returns:
- The appointment template for the given UUID
-
getParent
@Nullable Vorgang getParent(IEntityContext ec, Vorgang formRecord)
- Parameters:
ec- Entity context to access the database.formRecord- Form record for which to find the parent.- Returns:
- The parent form record of the given form record, or
nullif no parent exists.
-
getChildren
List<Vorgang> getChildren(IEntityContext ec, Vorgang formRecord)
- Parameters:
ec- Entity context to access the database.formRecord- Form record for which to find the parent.- Returns:
- All children of the given form record, or an empty list if no children exist.
-
getCountByAuthenticatorDependentCreator
int getCountByAuthenticatorDependentCreator(IEntityContext ec, IAuthenticator<?> authenticator)
Returns the number of form records that have a creator that is dependent on this authenticator.- Parameters:
ec- Entity context to access the database.authenticator- the creator of a form record used.- Returns:
- the number of form records that have a creator that is dependent on this authenticator.
- Since:
- 8.0.0
-
getUnreadChatCounts
Map<Long,Integer> getUnreadChatCounts(IEntityContext ec, IUser user, Set<Long> formRecordIds)
Returns the number of chats that are unread for the given user and form record IDs.- Parameters:
ec- entity context for accessing the database.user- user for which to get the unread chat counts.formRecordIds- form record IDs for which to get the unread chat counts.- Returns:
- a map of form record IDs to the number of unread chats for the given user.
- Since:
- 8.4.0
-
addSubmission
@Deprecated Vorgang addSubmission(IEntityContext ec, Vorgang formRecord, IUser user, EFormRecordSubmitContext submitContext, FrontendServer submitFrontendServer, String submitServerBaseUrl, String formData, boolean newDataEntry)
Deprecated.Adds a new submission to the form record.- Parameters:
ec- Entity context for accessing the database.formRecord- Theform recordto which the submission should be added.user- user who submitted the form record.submitContext- The context in which the form record was submitted.submitFrontendServer- The frontend server that received the submission.submitServerBaseUrl- The base URL of the server that received the submission.formData- The data of the submission.newDataEntry- Whether the submission data should be stored as a new data entry.- Returns:
- The updated
form recordwith the added submission. - Since:
- 8.2.0
-
addSubmission
Vorgang addSubmission(IEntityContext ec, Vorgang formRecord, IUser user, EFormRecordSubmitContext submitContext, FrontendServer submitFrontendServer, String submitServerBaseUrl, Locale submitLocale, String formData, boolean newDataEntry)
Adds a new submission to the form record.- Parameters:
ec- Entity context for accessing the database.formRecord- Theform recordto which the submission should be added.user- user who submitted the form record.submitContext- The context in which the form record was submitted.submitFrontendServer- The frontend server that received the submission.submitServerBaseUrl- The base URL of the server that received the submission.submitLocale- The locale of the submission.formData- The data of the submission.newDataEntry- Whether the submission data should be stored as a new data entry.- Returns:
- The updated
form recordwith the added submission. - Since:
- 8.2.0
-
getVorgaengeByBenutzer
@Deprecated List<Vorgang> getVorgaengeByBenutzer(IEntityContext ec, Benutzer benutzer)
Deprecated.
-
correctStatus
@Deprecated Vorgang correctStatus(IEntityContext ec, Vorgang formRecord, Status targetState, Benutzer user)
Deprecated.
-
-