Class BaseResult

    • Constructor Summary

      Constructors 
      Constructor Description
      BaseResult​(StoreQuery query)
      Constructor
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract java.lang.Object basicGetAttribute​(java.lang.String name)
      Get the actual attribute value
      protected abstract java.lang.Object basicGetKey()
      Get the actual key value
      protected abstract java.lang.Object basicGetValue()
      Get the actual value
      java.util.List<java.lang.Object> getAggregatorResults()
      Retrieve the aggregator value(s)
      <T> T getAttribute​(Attribute<T> attribute)
      Retrieve the given attribute value for this cache entry
      java.lang.Object getKey()
      Return the key for this cache entry.
      java.lang.Object getValue()
      Return the value for this cache entry.
      void setAggregateResults​(java.util.List<java.lang.Object> aggregateResults)
      Set the aggregate results for this row
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • BaseResult

        public BaseResult​(StoreQuery query)
        Constructor
        Parameters:
        query -
    • Method Detail

      • setAggregateResults

        public void setAggregateResults​(java.util.List<java.lang.Object> aggregateResults)
        Set the aggregate results for this row
        Parameters:
        aggregateResults -
      • getKey

        public java.lang.Object getKey()
        Return the key for this cache entry.
        Specified by:
        getKey in interface Result
        Returns:
        key object
      • basicGetKey

        protected abstract java.lang.Object basicGetKey()
        Get the actual key value
        Returns:
        key
      • getAggregatorResults

        public java.util.List<java.lang.Object> getAggregatorResults()
                                                              throws SearchException
        Retrieve the aggregator value(s)
        Specified by:
        getAggregatorResults in interface Result
        Returns:
        the aggregators value as a List. The aggregator results will be in the same order they were added to the query
        Throws:
        SearchException - if no aggregators were requested in the query
      • getValue

        public java.lang.Object getValue()
                                  throws SearchException
        Return the value for this cache entry.
        Specified by:
        getValue in interface Result
        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).
        Throws:
        SearchException - if values were not selected by the originating query
      • basicGetValue

        protected abstract java.lang.Object basicGetValue()
        Get the actual value
        Returns:
        value
      • getAttribute

        public <T> T getAttribute​(Attribute<T> attribute)
        Retrieve the given attribute value for this cache entry
        Specified by:
        getAttribute in interface Result
        Parameters:
        attribute - the attribute to retrieve
        Returns:
        the attribute value, or null if there is none
      • basicGetAttribute

        protected abstract java.lang.Object basicGetAttribute​(java.lang.String name)
        Get the actual attribute value
        Returns:
        attribute
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object