/** * {@inheritDoc} */ 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); }
/** * {@inheritDoc} */ public Object getKey() { if (query.requestsKeys()) { return basicGetKey(); } throw new SearchException("keys not included in query. Use includeKeys() to add keys to results."); }
/** * {@inheritDoc} */ 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."); }
sb.append(getKey()); } else { sb.append("[no key]"); if (query.requestsValues()) { sb.append("value="); sb.append(getValue()); } else { sb.append("[no value]"); Map<String, String> attrs = new HashMap<String, String>(); for (Attribute a : query.requestedAttributes()) { attrs.put(a.getAttributeName(), String.valueOf(getAttribute(a))); sb.append("aggregateResults=" + getAggregatorResults()); } else { sb.append("[no aggregateResults]");
private void setResultAggregators(List<AggregatorInstance<?>> aggregators, BaseResult result) { List<Object> aggregateResults = new ArrayList<Object>(); for (AggregatorInstance<?> aggregator : aggregators) { aggregateResults.add(aggregator.aggregateResult()); } if (!aggregateResults.isEmpty()) { result.setAggregateResults(aggregateResults); } }
sb.append(getKey()); } else { sb.append("[no key]"); if (query.requestsValues()) { sb.append("value="); sb.append(getValue()); } else { sb.append("[no value]"); Map<String, String> attrs = new HashMap<String, String>(); for (Attribute a : query.requestedAttributes()) { attrs.put(a.getAttributeName(), String.valueOf(getAttribute(a))); sb.append("aggregateResults=" + getAggregatorResults()); } else { sb.append("[no aggregateResults]");
private void setResultAggregators(List<AggregatorInstance<?>> aggregators, BaseResult result) { List<Object> aggregateResults = new ArrayList<Object>(); for (AggregatorInstance<?> aggregator : aggregators) { aggregateResults.add(aggregator.aggregateResult()); } if (!aggregateResults.isEmpty()) { result.setAggregateResults(aggregateResults); } }
sb.append(getKey()); } else { sb.append("[no key]"); if (query.requestsValues()) { sb.append("value="); sb.append(getValue()); } else { sb.append("[no value]"); Map<String, String> attrs = new HashMap<String, String>(); for (Attribute a : query.requestedAttributes()) { attrs.put(a.getAttributeName(), String.valueOf(getAttribute(a))); sb.append("aggregateResults=" + getAggregatorResults()); } else { sb.append("[no aggregateResults]");
private void setResultAggregators(List<AggregatorInstance<?>> aggregators, BaseResult result) { List<Object> aggregateResults = new ArrayList<Object>(); for (AggregatorInstance<?> aggregator : aggregators) { aggregateResults.add(aggregator.aggregateResult()); } if (!aggregateResults.isEmpty()) { result.setAggregateResults(aggregateResults); } }
/** * {@inheritDoc} */ 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); }
/** * {@inheritDoc} */ 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."); }
/** * {@inheritDoc} */ public Object getKey() { if (query.requestsKeys()) { return basicGetKey(); } throw new SearchException("keys not included in query. Use includeKeys() to add keys to results."); }
sb.append(getKey()); } else { sb.append("[no key]"); if (query.requestsValues()) { sb.append("value="); sb.append(getValue()); } else { sb.append("[no value]"); Map<String, String> attrs = new HashMap<String, String>(); for (Attribute a : query.requestedAttributes()) { attrs.put(a.getAttributeName(), String.valueOf(getAttribute(a))); sb.append("aggregateResults=" + getAggregatorResults()); } else { sb.append("[no aggregateResults]");
private void setResultAggregators(List<AggregatorInstance<?>> aggregators, BaseResult result) { List<Object> aggregateResults = new ArrayList<Object>(); for (AggregatorInstance<?> aggregator : aggregators) { aggregateResults.add(aggregator.aggregateResult()); } if (!aggregateResults.isEmpty()) { result.setAggregateResults(aggregateResults); } }
/** * {@inheritDoc} */ 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); }
/** * {@inheritDoc} */ 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."); }
/** * {@inheritDoc} */ public Object getKey() { if (query.requestsKeys()) { return basicGetKey(); } throw new SearchException("keys not included in query. Use includeKeys() to add keys to results."); }
/** * {@inheritDoc} */ 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); }
/** * {@inheritDoc} */ 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."); }
/** * {@inheritDoc} */ public Object getKey() { if (query.requestsKeys()) { return basicGetKey(); } throw new SearchException("keys not included in query. Use includeKeys() to add keys to results."); }