Class MessageQueryImpl
- java.lang.Object
-
- org.flowable.common.engine.impl.db.ListQueryParameterObject
-
- org.flowable.common.engine.impl.query.AbstractQuery<MessageQuery,Message>
-
- com.flowable.engage.engine.impl.message.MessageQueryImpl
-
- All Implemented Interfaces:
MessageQuery
,Serializable
,CacheAwareQuery<MessageEntity>
,Query<MessageQuery,Message>
,Command<Object>
public class MessageQueryImpl extends AbstractQuery<MessageQuery,Message> implements MessageQuery, CacheAwareQuery<MessageEntity>
- Author:
- Filip Hrisafov
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MessageQueryImpl.Range
-
Nested classes/interfaces inherited from class org.flowable.common.engine.impl.db.ListQueryParameterObject
ListQueryParameterObject.OrderBy, ListQueryParameterObject.ResultType
-
Nested classes/interfaces inherited from interface org.flowable.common.engine.api.query.Query
Query.NullHandlingOnOrder
-
-
Field Summary
Fields Modifier and Type Field Description protected Collection<String>
accessibleByGroups
protected String
accessibleByUser
protected String
actionInstanceId
protected boolean
bothAccessibleByUserAndGroups
protected Category
category
protected String
conversationId
protected Date
createdAfter
protected Date
createdAfterOrEqual
protected Date
createdBefore
protected Date
createdBeforeOrEqual
protected static ListQueryParameterObject.OrderBy
DEFAULT_ORDER_BY
protected String
externalId
protected String
id
protected boolean
includeMessageAudits
protected boolean
includeOnlyStickyMessages
protected boolean
includePrivate
protected boolean
includeSticky
protected String
isNotType
protected Collection<String>
notSenderIds
protected List<MessageQueryImpl.Range>
ranges
protected String
referenceId
protected String
referenceType
protected String
senderId
protected Collection<String>
senderIds
protected String
subType
protected String
type
-
Fields inherited from class org.flowable.common.engine.impl.query.AbstractQuery
commandContext, commandExecutor
-
Fields inherited from class org.flowable.common.engine.impl.db.ListQueryParameterObject
databaseType, defaultOrderBy, firstResult, maxResults, nullHandlingColumn, nullHandlingOnOrder, orderByCollection, orderProperty, parameter, resultType, SORTORDER_ASC, SORTORDER_DESC
-
-
Constructor Summary
Constructors Constructor Description MessageQueryImpl(CommandExecutor commandExecutor)
-
Method Summary
-
Methods inherited from class org.flowable.common.engine.impl.query.AbstractQuery
asc, checkQueryOk, count, desc, direction, execute, executeSingleResult, list, listPage, orderBy, orderBy, setCommandExecutor, singleResult
-
Methods inherited from class org.flowable.common.engine.impl.db.ListQueryParameterObject
addOrder, buildOrderBy, getDatabaseType, getFirstResult, getFirstRow, getLastRow, getMaxResults, getNullHandlingColumn, getOrderBy, getOrderByCollectionSafe, getOrderByForWindow, getOuterJoinOrderBy, getParameter, hasOrderBy, hasOrderByForColumn, isNeedsPaging, mapOrderByToSql, setDatabaseType, setFirstResult, setMaxResults, setNullHandlingColumn, setParameter
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.flowable.common.engine.api.query.CacheAwareQuery
enhanceCachedValue
-
Methods inherited from interface com.flowable.engage.message.api.MessageQuery
accessibleByUser
-
-
-
-
Field Detail
-
DEFAULT_ORDER_BY
protected static final ListQueryParameterObject.OrderBy DEFAULT_ORDER_BY
-
id
protected String id
-
externalId
protected String externalId
-
category
protected Category category
-
conversationId
protected String conversationId
-
actionInstanceId
protected String actionInstanceId
-
createdAfter
protected Date createdAfter
-
createdAfterOrEqual
protected Date createdAfterOrEqual
-
createdBefore
protected Date createdBefore
-
createdBeforeOrEqual
protected Date createdBeforeOrEqual
-
accessibleByUser
protected String accessibleByUser
-
accessibleByGroups
protected Collection<String> accessibleByGroups
-
subType
protected String subType
-
type
protected String type
-
isNotType
protected String isNotType
-
referenceId
protected String referenceId
-
referenceType
protected String referenceType
-
senderId
protected String senderId
-
senderIds
protected Collection<String> senderIds
-
notSenderIds
protected Collection<String> notSenderIds
-
ranges
protected List<MessageQueryImpl.Range> ranges
-
includePrivate
protected boolean includePrivate
-
includeSticky
protected boolean includeSticky
-
includeOnlyStickyMessages
protected boolean includeOnlyStickyMessages
-
includeMessageAudits
protected boolean includeMessageAudits
-
bothAccessibleByUserAndGroups
protected boolean bothAccessibleByUserAndGroups
-
-
Constructor Detail
-
MessageQueryImpl
public MessageQueryImpl(CommandExecutor commandExecutor)
-
-
Method Detail
-
id
public MessageQuery id(String id)
- Specified by:
id
in interfaceMessageQuery
-
externalId
public MessageQuery externalId(String externalId)
- Specified by:
externalId
in interfaceMessageQuery
-
category
public MessageQuery category(Category category)
- Specified by:
category
in interfaceMessageQuery
-
conversationId
public MessageQuery conversationId(String conversationId)
- Specified by:
conversationId
in interfaceMessageQuery
-
actionInstanceId
public MessageQuery actionInstanceId(String actionInstanceId)
- Specified by:
actionInstanceId
in interfaceMessageQuery
-
createdAfter
public MessageQuery createdAfter(Date createdAfter)
- Specified by:
createdAfter
in interfaceMessageQuery
-
createdAfterOrEqual
public MessageQuery createdAfterOrEqual(Date createdAfterOrEqual)
- Specified by:
createdAfterOrEqual
in interfaceMessageQuery
-
createdBefore
public MessageQuery createdBefore(Date createdBefore)
- Specified by:
createdBefore
in interfaceMessageQuery
-
createdBeforeOrEqual
public MessageQuery createdBeforeOrEqual(Date createdBeforeOrEqual)
- Specified by:
createdBeforeOrEqual
in interfaceMessageQuery
-
accessibleByUserOrGroups
public MessageQuery accessibleByUserOrGroups(String userId, Collection<String> groupIds)
Description copied from interface:MessageQuery
Query all messages for the given user (it will also fetch private messages for that user) or the given groups.MessageQuery.conversationId(String)
must bbe set when doing the query.- Specified by:
accessibleByUserOrGroups
in interfaceMessageQuery
- Parameters:
userId
- the id of the user for which messages should be queriedgroupIds
- the groups ids for which the messages should be queried
-
subType
public MessageQuery subType(String subType)
- Specified by:
subType
in interfaceMessageQuery
-
type
public MessageQuery type(String type)
- Specified by:
type
in interfaceMessageQuery
-
isNotType
public MessageQuery isNotType(String notType)
- Specified by:
isNotType
in interfaceMessageQuery
-
referenceId
public MessageQuery referenceId(String referenceId)
- Specified by:
referenceId
in interfaceMessageQuery
-
referenceType
public MessageQuery referenceType(String referenceType)
- Specified by:
referenceType
in interfaceMessageQuery
-
senderId
public MessageQuery senderId(String senderId)
Description copied from interface:MessageQuery
Query all messages send by the user with thesenderId
.- Specified by:
senderId
in interfaceMessageQuery
- Parameters:
senderId
- the id of the sender
-
senderIdIn
public MessageQuery senderIdIn(Collection<String> senderIds)
- Specified by:
senderIdIn
in interfaceMessageQuery
-
senderIdNotIn
public MessageQuery senderIdNotIn(Collection<String> notSenderIds)
- Specified by:
senderIdNotIn
in interfaceMessageQuery
-
includePrivate
public MessageQuery includePrivate()
Description copied from interface:MessageQuery
Query all messages (even private ones). IfMessageQuery.accessibleByUser(String)
is used than this has no effect.- Specified by:
includePrivate
in interfaceMessageQuery
-
includeSticky
public MessageQuery includeSticky()
Description copied from interface:MessageQuery
Query on sticky messages.- Specified by:
includeSticky
in interfaceMessageQuery
-
includeOnlyStickyMessages
public MessageQuery includeOnlyStickyMessages()
Description copied from interface:MessageQuery
Query on sticky messages only.- Specified by:
includeOnlyStickyMessages
in interfaceMessageQuery
-
includeMessageAudits
public MessageQuery includeMessageAudits()
Description copied from interface:MessageQuery
Include the message audits for the queried messages- Specified by:
includeMessageAudits
in interfaceMessageQuery
-
executeCount
public long executeCount(CommandContext commandContext)
- Specified by:
executeCount
in classAbstractQuery<MessageQuery,Message>
-
executeList
public List<Message> executeList(CommandContext commandContext)
- Specified by:
executeList
in classAbstractQuery<MessageQuery,Message>
-
computeAccessibleRanges
protected void computeAccessibleRanges(CommandContext commandContext)
-
getId
public String getId()
- Specified by:
getId
in interfaceCacheAwareQuery<MessageEntity>
-
getExternalId
public String getExternalId()
-
getCategory
public Category getCategory()
-
getConversationId
public String getConversationId()
-
getActionInstanceId
public String getActionInstanceId()
-
getCreatedAfter
public Date getCreatedAfter()
-
getCreatedAfterOrEqual
public Date getCreatedAfterOrEqual()
-
getCreatedBefore
public Date getCreatedBefore()
-
getCreatedBeforeOrEqual
public Date getCreatedBeforeOrEqual()
-
getAccessibleByUser
public String getAccessibleByUser()
-
getSubType
public String getSubType()
-
getReferenceId
public String getReferenceId()
-
getReferenceType
public String getReferenceType()
-
getSenderId
public String getSenderId()
-
getSenderIds
public Collection<String> getSenderIds()
-
getNotSenderIds
public Collection<String> getNotSenderIds()
-
isIncludePrivate
public boolean isIncludePrivate()
-
isIncludeSticky
public boolean isIncludeSticky()
-
isIncludeMessageAudits
public boolean isIncludeMessageAudits()
-
isBothAccessibleByUserAndGroups
public boolean isBothAccessibleByUserAndGroups()
-
isFalse
public boolean isFalse()
We can't usefalse
in SQL in a DB agnostic way. Therefore this method that always returnsfalse
- Returns:
false
-
isTrue
public boolean isTrue()
-
getRanges
public List<MessageQueryImpl.Range> getRanges()
-
orderByCreationTime
public MessageQuery orderByCreationTime()
- Specified by:
orderByCreationTime
in interfaceMessageQuery
-
orderByConversationId
public MessageQuery orderByConversationId()
- Specified by:
orderByConversationId
in interfaceMessageQuery
-
-