Package de.xima.fc.dao.impl
Class FormRecordChatDao
- java.lang.Object
-
- de.xima.cmn.dao.AbstractDao<T,Long,IEntityContext>
-
- de.xima.fc.dao.impl.GenericDao<FormRecordChat>
-
- de.xima.fc.dao.impl.FormRecordChatDao
-
- All Implemented Interfaces:
de.xima.cmn.dao.interfaces.IAbstractDao<FormRecordChat,Long,IEntityContext>
,IFormRecordChatDao
,IGenericDao<FormRecordChat>
public class FormRecordChatDao extends GenericDao<FormRecordChat> implements IFormRecordChatDao
Implementation of theIFormRecordChatDao
for reading and writingFormRecordChat
entities.- Since:
- 8.2.0
- Author:
- XIMA Media GmbH
-
-
Constructor Summary
Constructors Constructor Description FormRecordChatDao()
-
Method Summary
All Methods Instance Methods Concrete 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<FormRecordChat>
getByRecordAndUser(IEntityContext ec, UUID recordUuid, IUser user, int page, int pageSize)
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)
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.protected IFCDaoActionHook<FormRecordChat>
getPostActionHook()
-
Methods inherited from class de.xima.fc.dao.impl.GenericDao
getEntityRefs, getPreActionHook, read
-
Methods 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, update
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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
-
getByUuid
public FormRecordChat getByUuid(IEntityContext ec, UUID uuid)
Description copied from interface:IFormRecordChatDao
Finds the chat for the given UUID.- Specified by:
getByUuid
in interfaceIFormRecordChatDao
- Parameters:
ec
- entity context for accessing the databaseuuid
- the UUID of the chat- Returns:
- The chat with the given UUID
-
getByUuidAndUser
public FormRecordChat getByUuidAndUser(IEntityContext ec, UUID uuid, IUser user)
Description copied from interface:IFormRecordChatDao
Finds the chat for the given UUID if the given user can access the chat.- Specified by:
getByUuidAndUser
in 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.
null
otherwise. - See Also:
IFormRecordChatDao.getByUser(IEntityContext, IUser)
-
getByUser
public List<FormRecordChat> getByUser(IEntityContext ec, IUser user)
Description copied from interface:IFormRecordChatDao
Finds all form record chats the given userhas access to
.- Specified by:
getByUser
in 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:
FormRecordChat.isMember(IUser)
-
getByUser
public PagedResult<FormRecordChat> getByUser(IEntityContext ec, IUser user, int page, int pageSize)
Description copied from interface:IFormRecordChatDao
Finds all form record chats the given user has access to.- Specified by:
getByUser
in interfaceIFormRecordChatDao
- Parameters:
ec
- entity context for database transactions.user
- to get the form record chats for.page
- to get.pageSize
- size of the page to get.- Returns:
- a list of the user's form record chats ordered by their creation instant (desc).
- See Also:
IFormRecordChatDao.getByUser(IEntityContext, IUser)
-
getByRecordAndUser
public PagedResult<FormRecordChat> getByRecordAndUser(IEntityContext ec, UUID recordUuid, IUser user, int page, int pageSize)
Description copied from interface:IFormRecordChatDao
Finds the chats for the form record given by its UUID if the given user can access the chat.- Specified by:
getByRecordAndUser
in 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).
null
if the form record given by the UUID could not be found.
-
canAccessViaPublicApi
public boolean canAccessViaPublicApi(IEntityContext ec, FormRecordChat chat, IUser user)
Description copied from interface:IFormRecordChatDao
Returns whether the given user can access the given chat within a user portal.- Specified by:
canAccessViaPublicApi
in 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:
true
if the requesting user can access the given chat andfalse
otherwise.
-
getPostActionHook
protected IFCDaoActionHook<FormRecordChat> getPostActionHook()
- Overrides:
getPostActionHook
in classGenericDao<FormRecordChat>
-
-