Top Description Methods
net.sf.ehcache.search

public Interface Result

Known Direct Implementers
net.sf.ehcache.search.impl.BaseResult
Imports
java.util.List

Represents a single cache entry that has been selected by a cache query.

Authors
teck, Greg Luck

Method Summary

Modifier and TypeMethod and Description
public List<Object>

Returns:

the aggregators value as a List. The aggregator results will be in the same order they were added to the query
getAggregatorResults
()

Retrieve the aggregator value(s)

public <T> T

Returns:

the attribute value, or null if there is none
getAttribute
(Attribute<T>
the attribute to retrieve
attribute
)

Retrieve the given attribute value for this cache entry

public Object

Returns:

key object
getKey
()

Return the key for this cache entry.

public Object

Returns:

value object. This value might be null if the value is no longer referenced by the cache (ie. a concurrent update removed this entry).
getValue
()

Return the value for this cache entry.

Method Detail

getAggregatorResultsback to summary
public List<Object> getAggregatorResults() throws SearchException

Retrieve the aggregator value(s)

Returns:List<Object>

the aggregators value as a List. The aggregator results will be in the same order they were added to the query

Exceptions
SearchException:
if no aggregators were requested in the query
getAttributeback to summary
public <T> T getAttribute(Attribute<T> attribute) throws SearchException

Retrieve the given attribute value for this cache entry

Parameters
attribute:Attribute<T>

the attribute to retrieve

Returns:T

the attribute value, or null if there is none

Exceptions
SearchException:
if the given attribute was not explicitly selected by the originating query
getKeyback to summary
public Object getKey() throws SearchException

Return the key for this cache entry.

Returns:Object

key object

Exceptions
SearchException:
if keys were not selected by the originating query
getValueback to summary
public Object getValue() throws SearchException

Return the value for this cache entry.

Returns:Object

value object. This value might be null if the value is no longer referenced by the cache (ie. a concurrent update removed this entry).

Exceptions
SearchException:
if values were not selected by the originating query