Class ResultSet<O>

  • All Implemented Interfaces:
    java.lang.Iterable<O>, java.util.Collection<O>

    public class ResultSet<O>
    extends java.lang.Object
    implements java.util.Collection<O>
    This object is the result for all the queries executed using the storage layer. This object is basically an wrapper of a collection that is configured into the constructor.
    Author:
    javaito
    • Constructor Summary

      Constructors 
      Constructor Description
      ResultSet​(java.util.Collection<O> result, java.lang.Integer affectedInstances, java.lang.Long adaptationTime, java.lang.Long executionTime, java.lang.Long presentationTime, java.lang.Long validationIntegrityTime, java.lang.Long totalTime)  
    • Method Summary

      Modifier and Type Method Description
      boolean add​(O o)  
      boolean addAll​(java.util.Collection<? extends O> c)  
      void clear()  
      boolean contains​(java.lang.Object o)  
      boolean containsAll​(java.util.Collection<?> c)  
      boolean equals​(java.lang.Object o)  
      void forEach​(java.util.function.Consumer<? super O> action)  
      java.lang.Long getAdaptationTime()
      Returns the time consumed adapting the original query.
      java.lang.Integer getAffectedInstances()
      Returns the number of affected storage instances after the execution.
      java.lang.Long getExecutionTime()
      Returns the time consumed executing the action on the underlying technology.
      java.lang.Long getPresentationTime()
      Returns the time consumed transforming the raw information to the expected presentation format.
      java.lang.Long getTotalTime()
      Returns the total time consumed performing the operation.
      java.lang.Long getValidationIntegrityTime()
      Returns the time consumed validating the data integrity.
      int hashCode()  
      boolean isEmpty()  
      java.util.Iterator<O> iterator()  
      java.util.stream.Stream<O> parallelStream()  
      boolean remove​(java.lang.Object o)  
      boolean removeAll​(java.util.Collection<?> c)  
      boolean removeIf​(java.util.function.Predicate<? super O> filter)  
      boolean retainAll​(java.util.Collection<?> c)  
      int size()  
      java.util.Spliterator<O> spliterator()  
      java.util.stream.Stream<O> stream()  
      java.lang.Object[] toArray()  
      <T> T[] toArray​(T[] a)  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        toArray
    • Constructor Detail

      • ResultSet

        public ResultSet​(java.util.Collection<O> result,
                         java.lang.Integer affectedInstances,
                         java.lang.Long adaptationTime,
                         java.lang.Long executionTime,
                         java.lang.Long presentationTime,
                         java.lang.Long validationIntegrityTime,
                         java.lang.Long totalTime)
    • Method Detail

      • getAffectedInstances

        public java.lang.Integer getAffectedInstances()
        Returns the number of affected storage instances after the execution.
        Returns:
        Number of the affected storage instances.
      • getAdaptationTime

        public java.lang.Long getAdaptationTime()
        Returns the time consumed adapting the original query.
        Returns:
        Adaptation time.
      • getExecutionTime

        public java.lang.Long getExecutionTime()
        Returns the time consumed executing the action on the underlying technology.
        Returns:
        Execution time.
      • getPresentationTime

        public java.lang.Long getPresentationTime()
        Returns the time consumed transforming the raw information to the expected presentation format.
        Returns:
        Presentation time.
      • getValidationIntegrityTime

        public java.lang.Long getValidationIntegrityTime()
        Returns the time consumed validating the data integrity.
        Returns:
        Validation integrity time.
      • getTotalTime

        public java.lang.Long getTotalTime()
        Returns the total time consumed performing the operation.
        Returns:
        Total time.
      • size

        public int size()
        Specified by:
        size in interface java.util.Collection<O>
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface java.util.Collection<O>
      • contains

        public boolean contains​(java.lang.Object o)
        Specified by:
        contains in interface java.util.Collection<O>
      • iterator

        public java.util.Iterator<O> iterator()
        Specified by:
        iterator in interface java.util.Collection<O>
        Specified by:
        iterator in interface java.lang.Iterable<O>
      • toArray

        public java.lang.Object[] toArray()
        Specified by:
        toArray in interface java.util.Collection<O>
      • toArray

        public <T> T[] toArray​(T[] a)
        Specified by:
        toArray in interface java.util.Collection<O>
      • add

        public boolean add​(O o)
        Specified by:
        add in interface java.util.Collection<O>
      • remove

        public boolean remove​(java.lang.Object o)
        Specified by:
        remove in interface java.util.Collection<O>
      • containsAll

        public boolean containsAll​(java.util.Collection<?> c)
        Specified by:
        containsAll in interface java.util.Collection<O>
      • addAll

        public boolean addAll​(java.util.Collection<? extends O> c)
        Specified by:
        addAll in interface java.util.Collection<O>
      • removeAll

        public boolean removeAll​(java.util.Collection<?> c)
        Specified by:
        removeAll in interface java.util.Collection<O>
      • removeIf

        public boolean removeIf​(java.util.function.Predicate<? super O> filter)
        Specified by:
        removeIf in interface java.util.Collection<O>
      • retainAll

        public boolean retainAll​(java.util.Collection<?> c)
        Specified by:
        retainAll in interface java.util.Collection<O>
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Collection<O>
      • equals

        public boolean equals​(java.lang.Object o)
        Specified by:
        equals in interface java.util.Collection<O>
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface java.util.Collection<O>
        Overrides:
        hashCode in class java.lang.Object
      • spliterator

        public java.util.Spliterator<O> spliterator()
        Specified by:
        spliterator in interface java.util.Collection<O>
        Specified by:
        spliterator in interface java.lang.Iterable<O>
      • stream

        public java.util.stream.Stream<O> stream()
        Specified by:
        stream in interface java.util.Collection<O>
      • parallelStream

        public java.util.stream.Stream<O> parallelStream()
        Specified by:
        parallelStream in interface java.util.Collection<O>
      • forEach

        public void forEach​(java.util.function.Consumer<? super O> action)
        Specified by:
        forEach in interface java.lang.Iterable<O>