Class AbstractSelectResults<T>

java.lang.Object
org.springframework.data.gemfire.repository.query.AbstractSelectResults<T>
All Implemented Interfaces:
Iterable<T>, Collection<T>, org.apache.geode.cache.query.SelectResults<T>
Direct Known Subclasses:
PagedSelectResults

public class AbstractSelectResults<T> extends Object implements org.apache.geode.cache.query.SelectResults<T>
An abstract base class implementation of Apache Geode's SelectResults interface and Java Collection interface, which delegates to, and is backed by a given, required SelectResults instance.
Since:
2.4.0
See Also:
  • Constructor Details

    • AbstractSelectResults

      public AbstractSelectResults(@NonNull org.apache.geode.cache.query.SelectResults<T> selectResults)
      Constructs a new instance of SelectResults initialized with the given, required SelectResults instance backing this base class.
      Parameters:
      selectResults - SelectResults delegate backing this implementation; must not be null.
      Throws:
      IllegalArgumentException - if SelectResults is null.
      See Also:
      • SelectResults
  • Method Details

    • getSelectResults

      @NonNull protected org.apache.geode.cache.query.SelectResults<T> getSelectResults()
      Return the configured, underlying SelectResults used as the delegate backing this SelectResults implementation.
      Returns:
      the configured, underlying SelectResults.
      See Also:
      • SelectResults
    • asList

      public List<T> asList()
      Specified by:
      asList in interface org.apache.geode.cache.query.SelectResults<T>
    • asSet

      public Set<T> asSet()
      Specified by:
      asSet in interface org.apache.geode.cache.query.SelectResults<T>
    • getCollectionType

      public org.apache.geode.cache.query.types.CollectionType getCollectionType()
      Specified by:
      getCollectionType in interface org.apache.geode.cache.query.SelectResults<T>
    • isModifiable

      public boolean isModifiable()
      Specified by:
      isModifiable in interface org.apache.geode.cache.query.SelectResults<T>
    • occurrences

      public int occurrences(T result)
      Specified by:
      occurrences in interface org.apache.geode.cache.query.SelectResults<T>
    • setElementType

      public void setElementType(org.apache.geode.cache.query.types.ObjectType objectType)
      Specified by:
      setElementType in interface org.apache.geode.cache.query.SelectResults<T>
    • add

      public boolean add(T result)
      Specified by:
      add in interface Collection<T>
    • addAll

      public boolean addAll(Collection<? extends T> results)
      Specified by:
      addAll in interface Collection<T>
    • clear

      public void clear()
      Specified by:
      clear in interface Collection<T>
    • contains

      public boolean contains(Object result)
      Specified by:
      contains in interface Collection<T>
    • containsAll

      public boolean containsAll(Collection<?> results)
      Specified by:
      containsAll in interface Collection<T>
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface Collection<T>
    • iterator

      public Iterator<T> iterator()
      Specified by:
      iterator in interface Collection<T>
      Specified by:
      iterator in interface Iterable<T>
    • remove

      public boolean remove(Object result)
      Specified by:
      remove in interface Collection<T>
    • removeAll

      public boolean removeAll(Collection<?> results)
      Specified by:
      removeAll in interface Collection<T>
    • retainAll

      public boolean retainAll(Collection<?> results)
      Specified by:
      retainAll in interface Collection<T>
    • size

      public int size()
      Specified by:
      size in interface Collection<T>
    • toArray

      public Object[] toArray()
      Specified by:
      toArray in interface Collection<T>
    • toArray

      public <E> E[] toArray(E[] array)
      Specified by:
      toArray in interface Collection<T>