Package de.xima.fc.dao.interfaces
Interface IFormRecordMessageDao
-
- All Superinterfaces:
de.xima.cmn.dao.interfaces.IAbstractDao<FormRecordMessage,Long,IEntityContext>
,IGenericDao<FormRecordMessage>
- All Known Implementing Classes:
FormRecordMessageDao
public interface IFormRecordMessageDao extends IGenericDao<FormRecordMessage>
DAO for reading and writingFormRecordMessage
entities.- Since:
- 8.2.0
- Author:
- XIMA Media GmbH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description List<FormRecordMessage>
getAllBySenderUserProfile(IEntityContext ec, UserProfile sender)
Returns all messages sent by the given user profile.PagedResult<FormRecordMessage>
getByChatAndUser(IEntityContext ec, UUID chatUuid, IUser user, int page, int pageSize)
Finds the messages for the form record chat given by its UUID if the given usercan access the chat
.List<FormRecordMessage>
getByUser(IEntityContext ec, IUser user)
Returns all messages the given user has access to.PagedResult<FormRecordMessage>
getByUser(IEntityContext ec, IUser user, int page, int pageSize)
Deprecated.FormRecordMessage
getByUuid(IEntityContext ec, UUID uuid)
Finds the message for the given UUID.FormRecordMessage
getByUuidAndUser(IEntityContext ec, UUID uuid, IUser requestingUser)
Finds the message for the given UUID, which the givenuser can access
.List<FormRecordMessage>
getChatMessages(IEntityContext ec, UUID chatUuid)
Returns all messages for the given chat UUID ordered by their sent instant (desc).DetailedFormRecordMessageDTO
getDetailsByUuidAndUser(IEntityContext ec, UUID uuid, IUser requestingUser, Locale locale)
Returns the detailed form record message for the given UUID.PagedResult<BaseFormRecordMessageDTO>
getMessagePage(IEntityContext ec, PageQuery pageQuery, FormRecordMessagesQuery messagesQuery, boolean skipCount)
Returns a page of form record messages for the given page query and messages query.PagedResult<FormRecordMessage>
getUnreadByUser(IEntityContext ec, IUser user, int page, int pageSize)
Finds all unread form record messages the given user has access to.-
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
-
getAllBySenderUserProfile
List<FormRecordMessage> getAllBySenderUserProfile(IEntityContext ec, UserProfile sender)
Returns all messages sent by the given user profile.- Parameters:
ec
- the entity contextsender
- the user profile of the sender- Returns:
- all messages of the sender
-
getByChatAndUser
PagedResult<FormRecordMessage> getByChatAndUser(IEntityContext ec, UUID chatUuid, IUser user, int page, int pageSize)
Finds the messages for the form record chat given by its UUID if the given usercan access the chat
.- Parameters:
ec
- entity context for accessing the database.chatUuid
- the UUID of the chatuser
- to get the form record messages for.page
- to get.pageSize
- size of the page to get.- Returns:
- a list of form record messages the user has access to ordered by their creation instant (desc).
null
if the chat given by the UUID could not be found. - See Also:
getByUser(IEntityContext, IUser)
-
getByUser
List<FormRecordMessage> getByUser(IEntityContext ec, IUser user)
Returns all messages the given user has access to. The user has access to all messages ofchats they have access
to.- Parameters:
ec
- entity context for accessing the database.user
- requesting the messages.- Returns:
- a list of form record messages ordered by their
sent instant
(desc). - See Also:
IFormRecordChatDao.getByUser(IEntityContext, IUser)
-
getByUser
@Deprecated PagedResult<FormRecordMessage> getByUser(IEntityContext ec, IUser user, int page, int pageSize)
Deprecated.Finds all form record messages the given user has access to.- Parameters:
ec
- entity context for database transactions.user
- to get the form record messages for.page
- to get.pageSize
- size of the page to get.- Returns:
- a list of form record messages the user has access to ordered by their creation instant (desc).
- See Also:
getByUser(IEntityContext, IUser)
,getMessagePage(IEntityContext, PageQuery, FormRecordMessagesQuery, boolean)
-
getMessagePage
PagedResult<BaseFormRecordMessageDTO> getMessagePage(IEntityContext ec, PageQuery pageQuery, FormRecordMessagesQuery messagesQuery, boolean skipCount)
Returns a page of form record messages for the given page query and messages query.- Parameters:
ec
- entity context for database transactions.pageQuery
- page query to get the messages.messagesQuery
- messagesQuery to apply to the messages.skipCount
- whether to skip the count query.- Returns:
- a list of form record messages in the order defined by the messages query.
- Since:
- 8.4.0
-
getByUuid
FormRecordMessage getByUuid(IEntityContext ec, UUID uuid)
Finds the message for the given UUID.- Parameters:
ec
- entity context for accessing the databaseuuid
- the UUID of the message- Returns:
- The message with the given UUID
-
getByUuidAndUser
FormRecordMessage getByUuidAndUser(IEntityContext ec, UUID uuid, IUser requestingUser)
Finds the message for the given UUID, which the givenuser can access
.- Parameters:
ec
- entity context for accessing the databaseuuid
- the UUID of the messagerequestingUser
- user requesting the messages.- Returns:
- The message with the given UUID which the given user can access and
null
otherwise. - See Also:
getByUser(IEntityContext, IUser)
-
getChatMessages
List<FormRecordMessage> getChatMessages(IEntityContext ec, UUID chatUuid)
Returns all messages for the given chat UUID ordered by their sent instant (desc). This is intended for displaying the chat in the backoffice inbox.- Parameters:
ec
- entity context for accessing the databasechatUuid
- the UUID of the chat- Returns:
- a list of all form record messages for the chat ordered by their sent instant (desc).
-
getDetailsByUuidAndUser
DetailedFormRecordMessageDTO getDetailsByUuidAndUser(IEntityContext ec, UUID uuid, IUser requestingUser, Locale locale)
Returns the detailed form record message for the given UUID.- Parameters:
ec
- entity context for accessing the databaseuuid
- the UUID of the messagerequestingUser
- user requesting the messages.locale
- the locale for which to return the message (metadata)- Returns:
- The detailed form record message with the given UUID
- Since:
- 8.4.0
-
getUnreadByUser
PagedResult<FormRecordMessage> getUnreadByUser(IEntityContext ec, IUser user, int page, int pageSize)
Finds all unread form record messages the given user has access to. Unread messages can only be gotten for users withUserProfile
s. For users without a profile all messages will be returned.- Parameters:
ec
- entity context for database transactions.user
- to get the unread form record messages for.page
- to get.pageSize
- size of the page to get.- Returns:
- a list of form record messages the user has access to ordered by their creation instant (desc).
- See Also:
getByUser(IEntityContext, IUser)
-
-