Package de.xima.fc.dao.interfaces
Interface IFormRecordChatDao
-
- All Superinterfaces:
de.xima.cmn.dao.interfaces.IAbstractDao<FormRecordChat,Long,IEntityContext>
,IGenericDao<FormRecordChat>
- All Known Implementing Classes:
FormRecordChatDao
public interface IFormRecordChatDao extends IGenericDao<FormRecordChat>
DAO for reading and writingFormRecordChat
entities.- Since:
- 8.2.0
- Author:
- XIMA Media GmbH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
canAccessViaPublicApi(IEntityContext ec, FormRecordChat chat, IUser user)
Returns whether the given user can access the given chat within a user portal.PagedResult<BaseFormRecordChatDTO>
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.List<FormRecordChat>
getByUser(IEntityContext ec, IUser user)
Finds all form record chats the given userhas access to
.PagedResult<FormRecordChat>
getByUser(IEntityContext ec, IUser user, int page, int pageSize, int offset)
Finds all form record chats the given user has access to.FormRecordChat
getByUuid(IEntityContext ec, UUID uuid)
Finds the chat for the given UUID.FormRecordChat
getByUuidAndUser(IEntityContext ec, UUID uuid, IUser user)
Finds the chat for the given UUID if the given user can access the chat.DetailedFormRecordChatDTO
getDetailsByUuidAndUser(IEntityContext ec, UUID uuid, IUser user, Locale locale)
Finds the chat for the given UUID if the given user can access the chat.PagedResult<BaseFormRecordChatDTO>
getFormRecordChatsPage(IEntityContext ec, PageQuery pageQuery, FormRecordChatsQuery chatsQuery, boolean skipCount)
void
markReadByEndUser(@NotNull IEntityContext ec, @NotNull UUID chatUuid, @NotNull IUser user)
Marks the chat as read for the given end user.void
markReadByInboxUser(IEntityContext ec, UUID chatUuid, IUser user)
Marks the chat as read for the given inbox user.-
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
-
canAccessViaPublicApi
boolean canAccessViaPublicApi(IEntityContext ec, FormRecordChat chat, IUser user)
Returns whether the given user can access the given chat within a user portal.- 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:
true
if the requesting user can access the given chat andfalse
otherwise.
-
getByRecordAndUser
PagedResult<BaseFormRecordChatDTO> 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.- 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).
null
if the form record given by the UUID could not be found.
-
getByUser
List<FormRecordChat> getByUser(IEntityContext ec, IUser user)
Finds all form record chats the given userhas access to
.- 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:
FormRecordChat.isMember(IUser)
-
getByUser
PagedResult<FormRecordChat> getByUser(IEntityContext ec, IUser user, int page, int pageSize, int offset)
Finds all form record chats the given user has access to.- 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:
getByUser(IEntityContext, IUser)
-
getByUuid
FormRecordChat getByUuid(IEntityContext ec, UUID uuid)
Finds the chat for the given UUID.- Parameters:
ec
- entity context for accessing the databaseuuid
- the UUID of the chat- Returns:
- The chat with the given UUID
-
getByUuidAndUser
FormRecordChat getByUuidAndUser(IEntityContext ec, UUID uuid, IUser user)
Finds the chat for the given UUID if the given user can access the chat.- 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.
null
otherwise. - See Also:
getByUser(IEntityContext, IUser)
-
getDetailsByUuidAndUser
DetailedFormRecordChatDTO getDetailsByUuidAndUser(IEntityContext ec, UUID uuid, IUser user, Locale locale)
Finds the chat for the given UUID if the given user can access the chat.- 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.
null
otherwise. - See Also:
getByUser(IEntityContext, IUser)
-
getFormRecordChatsPage
PagedResult<BaseFormRecordChatDTO> getFormRecordChatsPage(IEntityContext ec, PageQuery pageQuery, FormRecordChatsQuery chatsQuery, boolean skipCount)
-
markReadByEndUser
void markReadByEndUser(@NotNull @NotNull IEntityContext ec, @NotNull @NotNull UUID chatUuid, @NotNull @NotNull IUser user)
Marks the chat as read for the given end user.- 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.- Since:
- 8.4.0
-
markReadByInboxUser
void markReadByInboxUser(IEntityContext ec, UUID chatUuid, IUser user)
Marks the chat as read for the given inbox user.- 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.- Since:
- 8.4.0
-
-