Package org.infinispan.query.core.impl
Class EmptyResultQuery<T>
java.lang.Object
org.infinispan.query.dsl.impl.BaseQuery<T>
org.infinispan.query.core.impl.BaseEmbeddedQuery<T>
org.infinispan.query.core.impl.EmptyResultQuery<T>
- All Implemented Interfaces:
Iterable<T>,org.infinispan.query.dsl.PaginationContext<org.infinispan.query.dsl.Query<T>>,org.infinispan.query.dsl.ParameterContext<org.infinispan.query.dsl.Query<T>>,org.infinispan.query.dsl.Query<T>
A query that does not return any results because the query filter is a boolean contradiction.
- Since:
- 8.0
- Author:
- anistor@redhat.com
-
Field Summary
Fields inherited from class org.infinispan.query.core.impl.BaseEmbeddedQuery
cache, partitionHandlingSupport, queryStatistics, statementTypeFields inherited from class org.infinispan.query.dsl.impl.BaseQuery
hitCountAccuracy, local, maxResults, namedParameters, projection, queryFactory, queryString, startOffset, timeout -
Constructor Summary
ConstructorsConstructorDescriptionEmptyResultQuery(org.infinispan.query.dsl.QueryFactory queryFactory, org.infinispan.AdvancedCache<?, ?> cache, String queryString, org.infinispan.objectfilter.impl.syntax.parser.IckleParsingResult.StatementType statementType, Map<String, Object> namedParameters, long startOffset, int maxResults, LocalQueryStatistics queryStatistics) -
Method Summary
Modifier and TypeMethodDescriptionintprotected Comparator<Comparable<?>[]>Create a comparator to be used for ordering the results returned byBaseEmbeddedQuery.getInternalIterator().protected org.infinispan.commons.util.CloseableIterator<org.infinispan.objectfilter.ObjectFilter.FilterResult>Create an iterator over the results of the query, in no particular order.protected voidrecordQuery(long time) toString()Methods inherited from class org.infinispan.query.core.impl.BaseEmbeddedQuery
execute, getResultSize, isSelectStatement, iterator, list, resetQueryMethods inherited from class org.infinispan.query.dsl.impl.BaseQuery
entryIterator, getMaxResults, getParameters, getProjection, getQueryString, getStartOffset, hasProjections, hitCountAccuracy, hitCountAccuracy, isLocal, local, maxResults, setParameter, setParameters, startOffset, timeout, validateNamedParametersMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
EmptyResultQuery
public EmptyResultQuery(org.infinispan.query.dsl.QueryFactory queryFactory, org.infinispan.AdvancedCache<?, ?> cache, String queryString, org.infinispan.objectfilter.impl.syntax.parser.IckleParsingResult.StatementType statementType, Map<String, Object> namedParameters, long startOffset, int maxResults, LocalQueryStatistics queryStatistics)
-
-
Method Details
-
recordQuery
protected void recordQuery(long time) - Specified by:
recordQueryin classBaseEmbeddedQuery<T>
-
getComparator
Description copied from class:BaseEmbeddedQueryCreate a comparator to be used for ordering the results returned byBaseEmbeddedQuery.getInternalIterator().- Specified by:
getComparatorin classBaseEmbeddedQuery<T>- Returns:
- the comparator or
nullif no sorting needs to be applied
-
getInternalIterator
protected org.infinispan.commons.util.CloseableIterator<org.infinispan.objectfilter.ObjectFilter.FilterResult> getInternalIterator()Description copied from class:BaseEmbeddedQueryCreate an iterator over the results of the query, in no particular order. Ordering will be provided ifBaseEmbeddedQuery.getComparator()returns a non-nullComparator. Please note this it not the same iterator as the one retuend byBaseEmbeddedQuery.iterator().- Specified by:
getInternalIteratorin classBaseEmbeddedQuery<T>
-
executeStatement
public int executeStatement() -
toString
- Overrides:
toStringin classBaseEmbeddedQuery<T>
-