Top Description Inners Methods
net.sf.ehcache.store

public Interface StoreQuery

Known Direct Implementers
net.sf.ehcache.CacheQuery, net.sf.ehcache.CacheQuery.StoreQueryImpl
Imports
java.util.List, .Set, net.sf.ehcache.Cache, net.sf.ehcache.search.Attribute, .Direction, .ExecutionHints, net.sf.ehcache.search.aggregator.Aggregator, .AggregatorInstance, net.sf.ehcache.search.expression.Criteria

An immutable query that a Store can execute
Author
teck

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
StoreQuery.Ordering

An attribute / direction ordering pair

Method Summary

Modifier and TypeMethod and Description
public List<AggregatorInstance<?>>

Returns:

the include aggregator instances (if any)
getAggregatorInstances
()

Get the requested aggregator instances

public List<Aggregator>

Returns:

the include aggregators (if any)
getAggregators
()

Get the requested aggregators

public Cache

Returns:

cache
getCache
()

Get the cache this query originated from

public Criteria

Returns:

the search criteria
getCriteria
()

Get the search criteria

public ExecutionHints

Returns:

null if no hints were provided
getExecutionHints
()

Get execution hints for this query

public List<StoreQuery.Ordering>

Returns:

the request sort orders (if any)
getOrdering
()

Get the requested search orderings

public String[]

Returns:

select target names, searchAttribute or aggregator
getTargets
()

Deprecated
This needs to be cleaned up.
public Set<Attribute<?>>

Returns:

attributes to group by (if any)
groupByAttributes
()

Get the set of attributes to group result set by

public int

Returns:

max results. A negative number means unlimited results
maxResults
()

Get the maximum number of results to return

public Set<Attribute<?>>

Returns:

the requested attributes (if any)
requestedAttributes
()

Get the set of attributes requested by this query

public boolean

Returns:

true if keys requested
requestsKeys
()

Are keys requested?

public boolean

Returns:

true if values requested
requestsValues
()

Are values requested?

public void
targets(String[] targets)

Deprecated
Set the names of the select targets.

Method Detail

getAggregatorInstancesback to summary
public List<AggregatorInstance<?>> getAggregatorInstances()

Get the requested aggregator instances

Returns:List<AggregatorInstance<?>>

the include aggregator instances (if any)

getAggregatorsback to summary
public List<Aggregator> getAggregators()

Get the requested aggregators

Returns:List<Aggregator>

the include aggregators (if any)

getCacheback to summary
public Cache getCache()

Get the cache this query originated from

Returns:Cache

cache

getCriteriaback to summary
public Criteria getCriteria()

Get the search criteria

Returns:Criteria

the search criteria

getExecutionHintsback to summary
public ExecutionHints getExecutionHints()

Get execution hints for this query

Returns:ExecutionHints

null if no hints were provided

getOrderingback to summary
public List<StoreQuery.Ordering> getOrdering()

Get the requested search orderings

Returns:List<StoreQuery.Ordering>

the request sort orders (if any)

getTargetsback to summary
public String[] getTargets()

Deprecated

This needs to be cleaned up. We don't want to introduce any kind of ordering here, as there simply is none.

Meanwhile, this is used to keep the ordering on BMQL created Queries. Yet, QueryManagerBuilder, which creates the QueryManager, doesn't let us qualify the Query type further to add this "ordering" concept of "targets" to it.
And this "ordering" shouldn't become part of the QueryManager API neither as each implementation might require something different.

Returns:String[]

select target names, searchAttribute or aggregator

Annotations
@Deprecated
See Also
API-43
groupByAttributesback to summary
public Set<Attribute<?>> groupByAttributes()

Get the set of attributes to group result set by

Returns:Set<Attribute<?>>

attributes to group by (if any)

Since
2.6
maxResultsback to summary
public int maxResults()

Get the maximum number of results to return

Returns:int

max results. A negative number means unlimited results

requestedAttributesback to summary
public Set<Attribute<?>> requestedAttributes()

Get the set of attributes requested by this query

Returns:Set<Attribute<?>>

the requested attributes (if any)

requestsKeysback to summary
public boolean requestsKeys()

Are keys requested?

Returns:boolean

true if keys requested

requestsValuesback to summary
public boolean requestsValues()

Are values requested?

Returns:boolean

true if values requested

targetsback to summary
public void targets(String[] targets)

Deprecated

Set the names of the select targets. These will either be searchAttribute names or aggregator display names, eg. 'ave(salary)' This is used by BMQL to form the return results.

Annotations
@Deprecated
See Also
StoreQuery#getTargets()
net.sf.ehcache.store back to summary

public Interface StoreQuery.Ordering

Known Direct Implementers
net.sf.ehcache.CacheQuery.OrderingImpl

An attribute / direction ordering pair

Method Summary

Modifier and TypeMethod and Description
public Attribute<?>

Returns:

attribute
getAttribute
()

Attribute to order by

public Direction

Returns:

direction
getDirection
()

Ordering direction

Method Detail

getAttributeback to summary
public Attribute<?> getAttribute()

Attribute to order by

Returns:Attribute<?>

attribute

getDirectionback to summary
public Direction getDirection()

Ordering direction

Returns:Direction

direction