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:
-
Nested Class Summary
Nested ClassesNested 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
FieldsModifier and TypeFieldDescriptionprotected Collection<String>
protected String
protected String
protected boolean
protected Category
protected String
protected Date
protected Date
protected Date
protected Date
protected static final ListQueryParameterObject.OrderBy
protected String
protected String
protected boolean
protected boolean
protected boolean
protected boolean
protected String
protected Collection<String>
protected List<MessageQueryImpl.Range>
protected String
protected String
protected String
protected Collection<String>
protected String
protected String
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, ignoreOrderBy, maxResults, nullHandlingColumn, nullHandlingOnOrder, orderByCollection, orderProperty, parameter, resultType, SORTORDER_ASC, SORTORDER_DESC
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccessibleByUserOrGroups
(String userId, Collection<String> groupIds) Query all messages for the given user (it will also fetch private messages for that user) or the given groups.actionInstanceId
(String actionInstanceId) protected void
computeAccessibleRanges
(CommandContext commandContext) conversationId
(String conversationId) createdAfter
(Date createdAfter) createdAfterOrEqual
(Date createdAfterOrEqual) createdBefore
(Date createdBefore) createdBeforeOrEqual
(Date createdBeforeOrEqual) long
executeCount
(CommandContext commandContext) executeList
(CommandContext commandContext) externalId
(String externalId) getId()
Include the message audits for the queried messagesQuery on sticky messages only.Query all messages (even private ones).Query on sticky messages.boolean
boolean
isFalse()
We can't usefalse
in SQL in a DB agnostic way.boolean
boolean
boolean
boolean
isTrue()
referenceId
(String referenceId) referenceType
(String referenceType) Query all messages send by the user with thesenderId
.senderIdIn
(Collection<String> senderIds) senderIdNotIn
(Collection<String> notSenderIds) Methods inherited from class org.flowable.common.engine.impl.query.AbstractQuery
asc, checkQueryOk, count, desc, direction, execute, executeSingleResult, getSafeList, 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, setIgnoreOrderBy, 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 Details
-
DEFAULT_ORDER_BY
-
id
-
externalId
-
category
-
conversationId
-
actionInstanceId
-
createdAfter
-
createdAfterOrEqual
-
createdBefore
-
createdBeforeOrEqual
-
accessibleByUser
-
accessibleByGroups
-
subType
-
type
-
isNotType
-
referenceId
-
referenceType
-
senderId
-
senderIds
-
notSenderIds
-
ranges
-
includePrivate
protected boolean includePrivate -
includeSticky
protected boolean includeSticky -
includeOnlyStickyMessages
protected boolean includeOnlyStickyMessages -
includeMessageAudits
protected boolean includeMessageAudits -
bothAccessibleByUserAndGroups
protected boolean bothAccessibleByUserAndGroups
-
-
Constructor Details
-
MessageQueryImpl
-
-
Method Details
-
id
- Specified by:
id
in interfaceMessageQuery
-
externalId
- Specified by:
externalId
in interfaceMessageQuery
-
category
- Specified by:
category
in interfaceMessageQuery
-
conversationId
- Specified by:
conversationId
in interfaceMessageQuery
-
actionInstanceId
- Specified by:
actionInstanceId
in interfaceMessageQuery
-
createdAfter
- Specified by:
createdAfter
in interfaceMessageQuery
-
createdAfterOrEqual
- Specified by:
createdAfterOrEqual
in interfaceMessageQuery
-
createdBefore
- Specified by:
createdBefore
in interfaceMessageQuery
-
createdBeforeOrEqual
- Specified by:
createdBeforeOrEqual
in interfaceMessageQuery
-
accessibleByUserOrGroups
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
- Specified by:
subType
in interfaceMessageQuery
-
type
- Specified by:
type
in interfaceMessageQuery
-
isNotType
- Specified by:
isNotType
in interfaceMessageQuery
-
referenceId
- Specified by:
referenceId
in interfaceMessageQuery
-
referenceType
- Specified by:
referenceType
in interfaceMessageQuery
-
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
- Specified by:
senderIdIn
in interfaceMessageQuery
-
senderIdNotIn
- Specified by:
senderIdNotIn
in interfaceMessageQuery
-
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
Description copied from interface:MessageQuery
Query on sticky messages.- Specified by:
includeSticky
in interfaceMessageQuery
-
includeOnlyStickyMessages
Description copied from interface:MessageQuery
Query on sticky messages only.- Specified by:
includeOnlyStickyMessages
in interfaceMessageQuery
-
includeMessageAudits
Description copied from interface:MessageQuery
Include the message audits for the queried messages- Specified by:
includeMessageAudits
in interfaceMessageQuery
-
executeCount
- Specified by:
executeCount
in classAbstractQuery<MessageQuery,
Message>
-
executeList
- Specified by:
executeList
in classAbstractQuery<MessageQuery,
Message>
-
computeAccessibleRanges
-
getId
- Specified by:
getId
in interfaceCacheAwareQuery<MessageEntity>
-
getExternalId
-
getCategory
-
getConversationId
-
getActionInstanceId
-
getCreatedAfter
-
getCreatedAfterOrEqual
-
getCreatedBefore
-
getCreatedBeforeOrEqual
-
getAccessibleByUser
-
getSubType
-
getReferenceId
-
getReferenceType
-
getSenderId
-
getSenderIds
-
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
-
orderByCreationTime
- Specified by:
orderByCreationTime
in interfaceMessageQuery
-
orderByConversationId
- Specified by:
orderByConversationId
in interfaceMessageQuery
-