@Unstable public class SimpleEventQuery extends GroupQueryCondition implements PageableEventQuery, SortableEventQuery
EventQuery
.SortableEventQuery.SortClause
conditions
Constructor and Description |
---|
SimpleEventQuery()
An empty query.
|
SimpleEventQuery(long offset,
long limit) |
Modifier and Type | Method and Description |
---|---|
SimpleEventQuery |
addSort(String property,
SortableEventQuery.SortClause.Order order)
Adds a single sort clause to the end of the current sort information.
|
SimpleEventQuery |
after(Date date) |
SimpleEventQuery |
and()
Group together the previous and next condition in a AND group.
|
SimpleEventQuery |
before(Date date) |
SimpleEventQuery |
close()
Stop the current group of conditions.
|
SimpleEventQuery |
eq(String property,
Object value) |
boolean |
equals(Object obj) |
long |
getLimit() |
long |
getOffset() |
List<SortableEventQuery.SortClause> |
getSorts() |
SimpleEventQuery |
greater(String property,
Object value) |
SimpleEventQuery |
greaterOrEq(String property,
Object value) |
int |
hashCode() |
SimpleEventQuery |
in(String property,
List<?> values) |
SimpleEventQuery |
in(String property,
Object... values) |
SimpleEventQuery |
less(String property,
Object value) |
SimpleEventQuery |
lessOrEq(String property,
Object value) |
SimpleEventQuery |
not()
Reverse the following filter.
|
SimpleEventQuery |
open()
Start a new group of conditions.
|
SimpleEventQuery |
or()
Group together the previous and next condition in a OR group.
|
SimpleEventQuery |
setLimit(long limit) |
SimpleEventQuery |
setOffset(long offset) |
String |
toString() |
SimpleEventQuery |
withMail(String entityId)
Select events associated for which the passed entity should receive mails.
|
SimpleEventQuery |
withStatus(boolean read)
Select only event associated with the passed status entity.
|
SimpleEventQuery |
withStatus(String entityId)
Select only event associated with the passed status entity.
|
SimpleEventQuery |
withStatus(String entityId,
boolean read)
Select only event associated with the passed status entity.
|
getConditions, isOr
isReversed
public SimpleEventQuery()
public SimpleEventQuery(long offset, long limit)
offset
- the maximum number of events to returnlimit
- the maximum number of events to returnpublic long getLimit()
getLimit
in interface PageableEventQuery
setLimit(long)
public SimpleEventQuery setLimit(long limit)
limit
- the maximum number of events to return, -1 for no limit (0 return no results)public long getOffset()
getOffset
in interface PageableEventQuery
setOffset(long)
public SimpleEventQuery setOffset(long offset)
offset
- the index where to start returning eventspublic SimpleEventQuery not()
SimpleEventQuery
public SimpleEventQuery or()
SimpleEventQuery
public SimpleEventQuery and()
SimpleEventQuery
public SimpleEventQuery open()
SimpleEventQuery
public SimpleEventQuery close()
SimpleEventQuery
public SimpleEventQuery eq(String property, Object value)
property
- the name of the propertyvalue
- the value the property should be equal toSimpleEventQuery
public SimpleEventQuery less(String property, Object value)
property
- the name of the propertyvalue
- the value the property should be equal toSimpleEventQuery
public SimpleEventQuery lessOrEq(String property, Object value)
property
- the name of the propertyvalue
- the value the property should be equal toSimpleEventQuery
public SimpleEventQuery greater(String property, Object value)
property
- the name of the propertyvalue
- the value the property should be equal toSimpleEventQuery
public SimpleEventQuery greaterOrEq(String property, Object value)
property
- the name of the propertyvalue
- the value the property should be equal toSimpleEventQuery
public SimpleEventQuery before(Date date)
date
- the date before which events should be selectedSimpleEventQuery
public SimpleEventQuery after(Date date)
date
- the date after which the events should be selectedSimpleEventQuery
public SimpleEventQuery in(String property, List<?> values)
property
- the name of the propertyvalues
- the values to compare to the propertySimpleEventQuery
public SimpleEventQuery in(String property, Object... values)
property
- the name of the propertyvalues
- the values to compare to the propertySimpleEventQuery
public SimpleEventQuery withStatus(String entityId)
entityId
- event status entity idSimpleEventQuery
public SimpleEventQuery withStatus(String entityId, boolean read)
entityId
- event status entity idread
- indicate if read or unread statues should selected, null for allSimpleEventQuery
public SimpleEventQuery withStatus(boolean read)
read
- indicate if read or unread events should be selected, null if disabledSimpleEventQuery
public SimpleEventQuery withMail(String entityId)
entityId
- the identifier of the entity that should receive the mailSimpleEventQuery
public List<SortableEventQuery.SortClause> getSorts()
getSorts
in interface SortableEventQuery
public SimpleEventQuery addSort(String property, SortableEventQuery.SortClause.Order order)
property
- the property nameorder
- the sort orderSimpleEventQuery
public int hashCode()
hashCode
in class GroupQueryCondition
public boolean equals(Object obj)
equals
in class GroupQueryCondition
public String toString()
toString
in class GroupQueryCondition
Copyright © 2004–2021 XWiki. All rights reserved.