Interface CollectedResultCollection

All Known Implementing Classes:
DefaultCollectedResultCollection

public interface CollectedResultCollection
A collection consisting of elements collected by their ElementName via the ResultCollection.collect(String) method. This class offers several methods to access the content in a strongly typed manner.
See Also:
  • Method Details

    • asList

      @Nonnull <T> List<T> asList(@Nonnull Class<T> objectType) throws UnsupportedOperationException
      Returns a list of values from this instance. The values are represented as an object of the given type.

      Important: In order to deserialize a result element to an object of a given type, you have to annotate all relevant field members of the respective class with ElementName. For example:

       class MyObject
       {
           @ElementName( "MANDT" )
           SapClient sapClient;
       }
       
       
      Type Parameters:
      T - The type into which the values should be converted.
      Parameters:
      objectType - Class object of the type into which the values should be converted.
      Returns:
      The list of values as objects of type T.
      Throws:
      UnsupportedOperationException - If the value could not be found or could not be converted to the given type.
    • asSet

      @Nonnull <T> Set<T> asSet(@Nonnull Class<T> objectType) throws UnsupportedOperationException
      Returns a set of values from this instance. The values are represented as an object of the given type.

      Important: In order to deserialize a result element to an object of a given type, you have to annotate all relevant field members of the respective class with ElementName. For example:

       class MyObject
       {
           @ElementName( "MANDT" )
           SapClient sapClient;
       }
       
       
      Type Parameters:
      T - The type into which the values should be converted.
      Parameters:
      objectType - Class object of the type into which the values should be converted.
      Returns:
      The set of values as objects of type T.
      Throws:
      UnsupportedOperationException - If the value could not be found or could not be converted to the given type.
    • asBooleanList

      @Nonnull List<Boolean> asBooleanList() throws UnsupportedOperationException
      Returns a list of values from this instance. The values are represented as Boolean.
      Returns:
      The list of values as Boolean.
      Throws:
      UnsupportedOperationException - If the value could not be found or could not be converted to the given type.
    • asBooleanSet

      @Nonnull Set<Boolean> asBooleanSet() throws UnsupportedOperationException
      Returns a set of values from this instance. The values are represented as Boolean.
      Returns:
      The set of values as Boolean.
      Throws:
      UnsupportedOperationException - If the value could not be found or could not be converted to the given type.
    • asByteList

      @Nonnull List<Byte> asByteList() throws UnsupportedOperationException
      Returns a list of values from this instance. The values are represented as Byte.
      Returns:
      The list of values as Byte.
      Throws:
      UnsupportedOperationException - If the value could not be found or could not be converted to the given type.
    • asByteSet

      @Nonnull Set<Byte> asByteSet() throws UnsupportedOperationException
      Returns a set of values from this instance. The values are represented as Byte.
      Returns:
      The set of values as Byte.
      Throws:
      UnsupportedOperationException - If the value could not be found or could not be converted to the given type.
    • asCharacterList

      @Nonnull List<Character> asCharacterList() throws UnsupportedOperationException
      Returns a list of values from this instance. The values are represented as Character.
      Returns:
      The list of values as Character.
      Throws:
      UnsupportedOperationException - If the value could not be found or could not be converted to the given type.
    • asCharacterSet

      @Nonnull Set<Character> asCharacterSet() throws UnsupportedOperationException
      Returns a set of values from this instance. The values are represented as Character.
      Returns:
      The set of values as Character.
      Throws:
      UnsupportedOperationException - If the value could not be found or could not be converted to the given type.
    • asStringList

      @Nonnull List<String> asStringList() throws UnsupportedOperationException
      Returns a list of values from this instance. The values are represented as String.
      Returns:
      The list of values as String.
      Throws:
      UnsupportedOperationException - If the value could not be found or could not be converted to the given type.
    • asStringSet

      @Nonnull Set<String> asStringSet() throws UnsupportedOperationException
      Returns a set of values from this instance. The values are represented as String.
      Returns:
      The set of values as String.
      Throws:
      UnsupportedOperationException - If the value could not be found or could not be converted to the given type.
    • asIntegerList

      @Nonnull List<Integer> asIntegerList() throws UnsupportedOperationException
      Returns a list of values from this instance. The values are represented as Integer.
      Returns:
      The list of values as Integer.
      Throws:
      UnsupportedOperationException - If the value could not be found or could not be converted to the given type.
    • asIntegerSet

      @Nonnull Set<Integer> asIntegerSet() throws UnsupportedOperationException
      Returns a set of values from this instance. The values are represented as Integer.
      Returns:
      The set of values as Integer.
      Throws:
      UnsupportedOperationException - If the value could not be found or could not be converted to the given type.
    • asShortList

      @Nonnull List<Short> asShortList() throws UnsupportedOperationException
      Returns a list of values from this instance. The values are represented as Short.
      Returns:
      The list of values as Short.
      Throws:
      UnsupportedOperationException - If the value could not be found or could not be converted to the given type.
    • asShortSet

      @Nonnull Set<Short> asShortSet() throws UnsupportedOperationException
      Returns a set of values from this instance. The values are represented as Short.
      Returns:
      The set of values as Short.
      Throws:
      UnsupportedOperationException - If the value could not be found or could not be converted to the given type.
    • asLongList

      @Nonnull List<Long> asLongList() throws UnsupportedOperationException
      Returns a list of values from this instance. The values are represented as Long.
      Returns:
      The list of values as Long.
      Throws:
      UnsupportedOperationException - If the value could not be found or could not be converted to the given type.
    • asLongSet

      @Nonnull Set<Long> asLongSet() throws UnsupportedOperationException
      Returns a set of values from this instance. The values are represented as Long.
      Returns:
      The set of values as Long.
      Throws:
      UnsupportedOperationException - If the value could not be found or could not be converted to the given type.
    • asFloatList

      @Nonnull List<Float> asFloatList() throws UnsupportedOperationException
      Returns a list of values from this instance. The values are represented as Float.
      Returns:
      The list of values as Float.
      Throws:
      UnsupportedOperationException - If the value could not be found or could not be converted to the given type.
    • asFloatSet

      @Nonnull Set<Float> asFloatSet() throws UnsupportedOperationException
      Returns a set of values from this instance. The values are represented as Float.
      Returns:
      The set of values as Float.
      Throws:
      UnsupportedOperationException - If the value could not be found or could not be converted to the given type.
    • asDoubleList

      @Nonnull List<Double> asDoubleList() throws UnsupportedOperationException
      Returns a list of values from this instance. The values are represented as Double.
      Returns:
      The list of values as Double.
      Throws:
      UnsupportedOperationException - If the value could not be found or could not be converted to the given type.
    • asDoubleSet

      @Nonnull Set<Double> asDoubleSet() throws UnsupportedOperationException
      Returns a set of values from this instance. The values are represented as Double.
      Returns:
      The set of values as Double.
      Throws:
      UnsupportedOperationException - If the value could not be found or could not be converted to the given type.
    • asBigIntegerList

      @Nonnull List<BigInteger> asBigIntegerList() throws UnsupportedOperationException
      Returns a list of values from this instance. The values are represented as BigInteger.
      Returns:
      The list of values as BigInteger.
      Throws:
      UnsupportedOperationException - If the value could not be found or could not be converted to the given type.
    • asBigIntegerSet

      @Nonnull Set<BigInteger> asBigIntegerSet() throws UnsupportedOperationException
      Returns a set of values from this instance. The values are represented as BigInteger.
      Returns:
      The set of values as BigInteger.
      Throws:
      UnsupportedOperationException - If the value could not be found or could not be converted to the given type.
    • asBigDecimalList

      @Nonnull List<BigDecimal> asBigDecimalList() throws UnsupportedOperationException
      Returns a list of values from this instance. The values are represented as BigDecimal.
      Returns:
      The list of values as BigDecimal.
      Throws:
      UnsupportedOperationException - If the value could not be found or could not be converted to the given type.
    • asBigDecimalSet

      @Nonnull Set<BigDecimal> asBigDecimalSet() throws UnsupportedOperationException
      Returns a set of values from this instance. The values are represented as BigDecimal.
      Returns:
      The set of values as BigDecimal.
      Throws:
      UnsupportedOperationException - If the value could not be found or could not be converted to the given type.