Class FormRecordChatDao
java.lang.Object
- All Implemented Interfaces:
de.xima.cmn.dao.interfaces.IAbstractDao<FormRecordChat, Long, IEntityContext>, IFormRecordChatDao, IGenericDao<FormRecordChat>
Implementation of the
IFormRecordChatDao for reading and writing FormRecordChat entities.- Since:
- 8.2.0
- Author:
- XIMA Media GmbH
-
Field Summary
FieldsFields inherited from class de.xima.cmn.dao.AbstractDao
entityClass, LOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanAccessViaPublicApi(IEntityContext ec, FormRecordChat chat, IUser user) Returns whether the given user can access the given chat within a user portal.getByRecordAndUser(IEntityContext ec, UUID recordUuid, IUser user, int page, int pageSize, Locale locale) Finds the chats for the form record given by its UUID if the given user can access the chat.getByUser(IEntityContext ec, IUser user) Finds all form record chats the given userhas access to.getByUser(IEntityContext ec, IUser user, int page, int pageSize, int offset) Finds all form record chats the given user has access to.getByUuid(IEntityContext ec, UUID uuid) Finds the chat for the given UUID.getByUuidAndUser(IEntityContext ec, UUID uuid, IUser user) Finds the chat for the given UUID if the given user can access the chat.getDetailsByUuidAndUser(IEntityContext ec, UUID uuid, IUser user, Locale locale) Finds the chat for the given UUID if the given user can access the chat.getFormRecordChatsPage(IEntityContext ec, PageQuery pageQuery, FormRecordChatsQuery query, boolean skipCount) protected IFCDaoActionHook<FormRecordChat> voidmarkReadByEndUser(IEntityContext ec, UUID chatUuid, IUser user) Marks the chat as read for the given end user.voidmarkReadByInboxUser(IEntityContext ec, UUID chatUuid, IUser user) Marks the chat as read for the given inbox user.Methods inherited from class GenericDao
getEntityRefs, getPreActionHook, 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
-
Field Details
-
SKIP_UPDATE_PROTOCOL_ENTRY
- See Also:
-
-
Constructor Details
-
FormRecordChatDao
public FormRecordChatDao()
-
-
Method Details
-
canAccessViaPublicApi
Description copied from interface:IFormRecordChatDaoReturns whether the given user can access the given chat within a user portal.- Specified by:
canAccessViaPublicApiin interfaceIFormRecordChatDao- Parameters:
ec- entity context for database transactions.chat- to check access within a user portal for.user- to check access within a user portal for.- Returns:
trueif the requesting user can access the given chat andfalseotherwise.
-
getByRecordAndUser
public PagedResult<BaseFormRecordChatDTO> getByRecordAndUser(IEntityContext ec, UUID recordUuid, IUser user, int page, int pageSize, Locale locale) Description copied from interface:IFormRecordChatDaoFinds the chats for the form record given by its UUID if the given user can access the chat.- Specified by:
getByRecordAndUserin interfaceIFormRecordChatDao- Parameters:
ec- entity context for accessing the database.recordUuid- the UUID of the form recorduser- to get the form record chats for.page- to get.pageSize- size of the page to get.- Returns:
- a list of form record chats the user has access to ordered by their creation instant (desc).
nullif the form record given by the UUID could not be found.
-
getByUser
Description copied from interface:IFormRecordChatDaoFinds all form record chats the given userhas access to.- Specified by:
getByUserin interfaceIFormRecordChatDao- Parameters:
ec- entity context for database transactions.user- to get the form record chats for.- Returns:
- a list of the user's form record chats ordered by their creation instant (desc).
- See Also:
-
getByUser
public PagedResult<FormRecordChat> getByUser(IEntityContext ec, IUser user, int page, int pageSize, int offset) Description copied from interface:IFormRecordChatDaoFinds all form record chats the given user has access to.- Specified by:
getByUserin interfaceIFormRecordChatDao- Parameters:
ec- entity context for database transactions.user- to get the form record chats for.page- to get. Identifies the page by page number. The first page number is 1.pageSize- size of the page to get.offset- The number of form record chats 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 list of the user's form record chats ordered by their creation instant (desc).
- See Also:
-
getByUuid
Description copied from interface:IFormRecordChatDaoFinds the chat for the given UUID.- Specified by:
getByUuidin interfaceIFormRecordChatDao- Parameters:
ec- entity context for accessing the databaseuuid- the UUID of the chat- Returns:
- The chat with the given UUID
-
getByUuidAndUser
Description copied from interface:IFormRecordChatDaoFinds the chat for the given UUID if the given user can access the chat.- Specified by:
getByUuidAndUserin interfaceIFormRecordChatDao- Parameters:
ec- entity context for accessing the database.uuid- the UUID of the chatuser- to get the form record chats for.- Returns:
- The chat with the given UUID if it exists and the user can access it.
nullotherwise. - See Also:
-
getDetailsByUuidAndUser
public DetailedFormRecordChatDTO getDetailsByUuidAndUser(IEntityContext ec, UUID uuid, IUser user, Locale locale) Description copied from interface:IFormRecordChatDaoFinds the chat for the given UUID if the given user can access the chat.- Specified by:
getDetailsByUuidAndUserin interfaceIFormRecordChatDao- Parameters:
ec- entity context for accessing the database.uuid- the UUID of the chatuser- to get the form record chats for.locale- the locale to use for the DTO.- Returns:
- The chat with the given UUID if it exists and the user can access it.
nullotherwise. - See Also:
-
getFormRecordChatsPage
public PagedResult<BaseFormRecordChatDTO> getFormRecordChatsPage(IEntityContext ec, PageQuery pageQuery, FormRecordChatsQuery query, boolean skipCount) - Specified by:
getFormRecordChatsPagein interfaceIFormRecordChatDao
-
markReadByEndUser
Description copied from interface:IFormRecordChatDaoMarks the chat as read for the given end user.- Specified by:
markReadByEndUserin interfaceIFormRecordChatDao- Parameters:
ec- entity context for accessing the database.chatUuid- the UUID of the chat to mark as read.user- end user to mark the chat as read for.
-
markReadByInboxUser
Description copied from interface:IFormRecordChatDaoMarks the chat as read for the given inbox user.- Specified by:
markReadByInboxUserin interfaceIFormRecordChatDao- Parameters:
ec- entity context for accessing the database.chatUuid- the UUID of the chat to mark as read.user- inbox user to mark the chat as read for.
-
getPostActionHook
- Overrides:
getPostActionHookin classGenericDao<FormRecordChat>
-