Package net.sf.ehcache.search

Examples of net.sf.ehcache.search.SearchException


    public Object getKey() {
        if (query.requestsKeys()) {
            return basicGetKey();
        }

        throw new SearchException("keys not included in query. Use includeKeys() to add keys to results.");
    }
View Full Code Here


    /**
     * {@inheritDoc}
     */
    public List<Object> getAggregatorResults() throws SearchException {
        if (this.aggregateResults.isEmpty()) {
            throw new SearchException("No aggregators present in query");
        }
        return this.aggregateResults;
    }
View Full Code Here

    public Object getValue() throws SearchException {
        if (query.requestsValues()) {
            return basicGetValue();
        }

        throw new SearchException("values not included in query. Use includeValues() to add values to results.");
    }
View Full Code Here

     */
    public <T> T getAttribute(Attribute<T> attribute) {
        String name = attribute.getAttributeName();

        if (!query.requestedAttributes().contains(attribute)) {
            throw new SearchException("Attribute [" + name + "] not included in query");
        }

        return (T) basicGetAttribute(name);
    }
View Full Code Here

TOP

Related Classes of net.sf.ehcache.search.SearchException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.