Package org.infinispan.query.dsl
Interface Query
-
- All Superinterfaces:
PaginationContext<Query>
,ParameterContext<Query>
public interface Query extends PaginationContext<Query>, ParameterContext<Query>
An immutable object representing both the query and the result. The result is obtained lazily when one of the methods in this interface is executed first time. The query is executed only once. Further calls will just return the previously cached results. If you intend to re-execute the query to obtain fresh data you need to build another instance using aQueryBuilder
.- Since:
- 6.0
- Author:
- anistor@redhat.com
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String[]
getProjection()
java.lang.String
getQueryString()
Returns the Ickle query string.int
getResultSize()
Gets the total number of results matching the query, ignoring pagination (firstResult, maxResult).<T> java.util.List<T>
list()
Returns the results of a search as a list.-
Methods inherited from interface org.infinispan.query.dsl.PaginationContext
maxResults, startOffset
-
Methods inherited from interface org.infinispan.query.dsl.ParameterContext
getParameters, setParameter, setParameters
-
-
-
-
Method Detail
-
getQueryString
java.lang.String getQueryString()
Returns the Ickle query string.
-
list
<T> java.util.List<T> list()
Returns the results of a search as a list.- Returns:
- list of objects that were found from the search.
-
getResultSize
int getResultSize()
Gets the total number of results matching the query, ignoring pagination (firstResult, maxResult).- Returns:
- total number of results.
-
getProjection
java.lang.String[] getProjection()
- Returns:
- the values for query projections or null if the query does not have projections.
-
-