public class Query extends Object implements Serializable
Condition
, offset, limit, sorting specification, etc.
Created by kevan on 14/05/15.Constructor and Description |
---|
Query()
Instantiates a new Query.
|
Modifier and Type | Method and Description |
---|---|
Condition |
getCondition()
Retrieves the
Condition associated with this Query. |
int |
getLimit()
Retrieves the number of elements to retrieve.
|
int |
getOffset()
Retrieves the offset of the first element to be retrieved
|
String |
getScrollIdentifier() |
String |
getScrollTimeValidity() |
String |
getSortby()
Retrieves the sorting specifications for this Query in String format, if any.
|
String |
getText()
Retrieves the text to be used in full-text searches, if any.
|
boolean |
isForceRefresh()
Determines whether or not an index refresh is needed before performing this Query
|
void |
setCondition(Condition condition)
Sets the
Condition associated with this Query. |
void |
setForceRefresh(boolean forceRefresh)
Specifies whether or not an index refresh is needed before performing this Query.
|
void |
setLimit(int limit)
Sets the number of elements to retrieve.
|
void |
setOffset(int offset)
Sets the offset of the first element to be retrieved
|
void |
setScrollIdentifier(String scrollIdentifier) |
void |
setScrollTimeValidity(String scrollTimeValidity) |
void |
setSortby(String sortby)
Sets the String representation of the sorting specifications for this Query if any.
|
void |
setText(String text)
Sets to be used in full-text searches
|
public String getText()
null
if no full-text search is needed for this Querypublic void setText(String text)
text
- the text to be used in full-text searches or null
if no full-text search is needed for this Querypublic int getOffset()
public void setOffset(int offset)
offset
- zero or a positive integer specifying the position of the first item to be retrieved in the total ordered collection of matching itemspublic int getLimit()
-1
if all of them should be retrievedpublic void setLimit(int limit)
limit
- a positive integer specifying how many matching items should be retrieved or -1
if all of them should be retrievedpublic String getSortby()
null
if no sorting is required) String of comma (,
) separated property names on which ordering should be performed, ordering elements
according to the property order in the String, considering each in turn and moving on to the next one in case of equality of all preceding ones. Each property name is
optionally followed by a column (:
) and an order specifier: asc
or desc
.public void setSortby(String sortby)
getSortby()
method documentation for format.sortby
- the String representation of the sorting specifications for this Query or null
if no sorting is requiredpublic Condition getCondition()
Condition
associated with this Query.Condition
associated with this Querypublic void setCondition(Condition condition)
Condition
associated with this Query.condition
- the Condition
associated with this Querypublic boolean isForceRefresh()
true
if an index refresh is needed before performing this Query, false
otherwisepublic void setForceRefresh(boolean forceRefresh)
forceRefresh
- true
if an index refresh is needed before performing this Query, false
otherwisepublic String getScrollIdentifier()
public void setScrollIdentifier(String scrollIdentifier)
public String getScrollTimeValidity()
public void setScrollTimeValidity(String scrollTimeValidity)
Copyright © 2014–2022 Apache Software Foundation. All rights reserved.