public class DefaultCollectedResultCollection extends Object implements CollectedResultCollection
CollectedResultCollection
interface, allowing strongly typed access to specific
fields annotated with ElementName
in elements of a ResultCollection
.ResultCollection
Constructor and Description |
---|
DefaultCollectedResultCollection(String collectedElementName,
Iterable<ResultElement> resultElements) |
Modifier and Type | Method and Description |
---|---|
BigDecimal |
asBigDecimal()
Deprecated.
This method is deprecated and will be removed in the future.
|
List<BigDecimal> |
asBigDecimalList()
Returns a list of values from this instance.
|
Set<BigDecimal> |
asBigDecimalSet()
Returns a set of values from this instance.
|
BigInteger |
asBigInteger()
Deprecated.
This method is deprecated and will be removed in the future.
|
List<BigInteger> |
asBigIntegerList()
Returns a list of values from this instance.
|
Set<BigInteger> |
asBigIntegerSet()
Returns a set of values from this instance.
|
boolean |
asBoolean()
Deprecated.
This method is deprecated and will be removed in the future.
|
List<Boolean> |
asBooleanList()
Returns a list of values from this instance.
|
Set<Boolean> |
asBooleanSet()
Returns a set of values from this instance.
|
byte |
asByte()
Deprecated.
This method is deprecated and will be removed in the future.
|
List<Byte> |
asByteList()
Returns a list of values from this instance.
|
Set<Byte> |
asByteSet()
Returns a set of values from this instance.
|
char |
asCharacter()
Deprecated.
This method is deprecated and will be removed in the future.
|
List<Character> |
asCharacterList()
Returns a list of values from this instance.
|
Set<Character> |
asCharacterSet()
Returns a set of values from this instance.
|
double |
asDouble()
Deprecated.
This method is deprecated and will be removed in the future.
|
List<Double> |
asDoubleList()
Returns a list of values from this instance.
|
Set<Double> |
asDoubleSet()
Returns a set of values from this instance.
|
float |
asFloat()
Deprecated.
This method is deprecated and will be removed in the future.
|
List<Float> |
asFloatList()
Returns a list of values from this instance.
|
Set<Float> |
asFloatSet()
Returns a set of values from this instance.
|
int |
asInteger()
Deprecated.
This method is deprecated and will be removed in the future.
|
List<Integer> |
asIntegerList()
Returns a list of values from this instance.
|
Set<Integer> |
asIntegerSet()
Returns a set of values from this instance.
|
<T> List<T> |
asList(Class<T> objectType)
Returns a list of values from this instance.
|
long |
asLong()
Deprecated.
This method is deprecated and will be removed in the future.
|
List<Long> |
asLongList()
Returns a list of values from this instance.
|
Set<Long> |
asLongSet()
Returns a set of values from this instance.
|
<T> Set<T> |
asSet(Class<T> objectType)
Returns a set of values from this instance.
|
short |
asShort()
Deprecated.
This method is deprecated and will be removed in the future.
|
List<Short> |
asShortList()
Returns a list of values from this instance.
|
Set<Short> |
asShortSet()
Returns a set of values from this instance.
|
String |
asString()
Deprecated.
This method is deprecated and will be removed in the future.
|
List<String> |
asStringList()
Returns a list of values from this instance.
|
Set<String> |
asStringSet()
Returns a set of values from this instance.
|
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
ResultObject |
getAsObject()
Deprecated.
This method is deprecated and will be removed in the future.
|
ResultPrimitive |
getAsPrimitive()
Deprecated.
This method is deprecated and will be removed in the future.
|
String |
getCollectedElementName()
The common name of all elements addressed by this collection.
|
Iterable<ResultElement> |
getResultElements() |
int |
hashCode() |
boolean |
isResultCollection()
Deprecated.
This method is deprecated and will be removed in the future.
|
boolean |
isResultObject()
Deprecated.
This method is deprecated and will be removed in the future.
|
boolean |
isResultPrimitive()
Deprecated.
This method is deprecated and will be removed in the future.
|
Iterator<ResultElement> |
iterator() |
String |
toString() |
public DefaultCollectedResultCollection(String collectedElementName, Iterable<ResultElement> resultElements)
@Nonnull public <T> List<T> asList(@Nonnull Class<T> objectType) throws UnsupportedOperationException
CollectedResultCollection
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;
}
asList
in interface CollectedResultCollection
T
- The type into which the values should be converted.objectType
- Class object of the type into which the values should be converted.T
.UnsupportedOperationException
- If the value could not be found or could not be converted to the given type.@Nonnull public <T> Set<T> asSet(@Nonnull Class<T> objectType) throws UnsupportedOperationException
CollectedResultCollection
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;
}
asSet
in interface CollectedResultCollection
T
- The type into which the values should be converted.objectType
- Class object of the type into which the values should be converted.T
.UnsupportedOperationException
- If the value could not be found or could not be converted to the given type.@Nonnull public List<Boolean> asBooleanList() throws UnsupportedOperationException
CollectedResultCollection
Boolean
.asBooleanList
in interface CollectedResultCollection
Boolean
.UnsupportedOperationException
- If the value could not be found or could not be converted to the given type.@Nonnull public Set<Boolean> asBooleanSet() throws UnsupportedOperationException
CollectedResultCollection
Boolean
.asBooleanSet
in interface CollectedResultCollection
Boolean
.UnsupportedOperationException
- If the value could not be found or could not be converted to the given type.@Nonnull public List<Byte> asByteList() throws UnsupportedOperationException
CollectedResultCollection
Byte
.asByteList
in interface CollectedResultCollection
Byte
.UnsupportedOperationException
- If the value could not be found or could not be converted to the given type.@Nonnull public Set<Byte> asByteSet() throws UnsupportedOperationException
CollectedResultCollection
Byte
.asByteSet
in interface CollectedResultCollection
Byte
.UnsupportedOperationException
- If the value could not be found or could not be converted to the given type.@Nonnull public List<Character> asCharacterList() throws UnsupportedOperationException
CollectedResultCollection
Character
.asCharacterList
in interface CollectedResultCollection
Character
.UnsupportedOperationException
- If the value could not be found or could not be converted to the given type.@Nonnull public Set<Character> asCharacterSet() throws UnsupportedOperationException
CollectedResultCollection
Character
.asCharacterSet
in interface CollectedResultCollection
Character
.UnsupportedOperationException
- If the value could not be found or could not be converted to the given type.@Nonnull public List<String> asStringList() throws UnsupportedOperationException
CollectedResultCollection
String
.asStringList
in interface CollectedResultCollection
String
.UnsupportedOperationException
- If the value could not be found or could not be converted to the given type.@Nonnull public Set<String> asStringSet() throws UnsupportedOperationException
CollectedResultCollection
String
.asStringSet
in interface CollectedResultCollection
String
.UnsupportedOperationException
- If the value could not be found or could not be converted to the given type.@Nonnull public List<Integer> asIntegerList() throws UnsupportedOperationException
CollectedResultCollection
Integer
.asIntegerList
in interface CollectedResultCollection
Integer
.UnsupportedOperationException
- If the value could not be found or could not be converted to the given type.@Nonnull public Set<Integer> asIntegerSet() throws UnsupportedOperationException
CollectedResultCollection
Integer
.asIntegerSet
in interface CollectedResultCollection
Integer
.UnsupportedOperationException
- If the value could not be found or could not be converted to the given type.@Nonnull public List<Short> asShortList() throws UnsupportedOperationException
CollectedResultCollection
Short
.asShortList
in interface CollectedResultCollection
Short
.UnsupportedOperationException
- If the value could not be found or could not be converted to the given type.@Nonnull public Set<Short> asShortSet() throws UnsupportedOperationException
CollectedResultCollection
Short
.asShortSet
in interface CollectedResultCollection
Short
.UnsupportedOperationException
- If the value could not be found or could not be converted to the given type.@Nonnull public List<Long> asLongList() throws UnsupportedOperationException
CollectedResultCollection
Long
.asLongList
in interface CollectedResultCollection
Long
.UnsupportedOperationException
- If the value could not be found or could not be converted to the given type.@Nonnull public Set<Long> asLongSet() throws UnsupportedOperationException
CollectedResultCollection
Long
.asLongSet
in interface CollectedResultCollection
Long
.UnsupportedOperationException
- If the value could not be found or could not be converted to the given type.@Nonnull public List<Float> asFloatList() throws UnsupportedOperationException
CollectedResultCollection
Float
.asFloatList
in interface CollectedResultCollection
Float
.UnsupportedOperationException
- If the value could not be found or could not be converted to the given type.@Nonnull public Set<Float> asFloatSet() throws UnsupportedOperationException
CollectedResultCollection
Float
.asFloatSet
in interface CollectedResultCollection
Float
.UnsupportedOperationException
- If the value could not be found or could not be converted to the given type.@Nonnull public List<Double> asDoubleList() throws UnsupportedOperationException
CollectedResultCollection
Double
.asDoubleList
in interface CollectedResultCollection
Double
.UnsupportedOperationException
- If the value could not be found or could not be converted to the given type.@Nonnull public Set<Double> asDoubleSet() throws UnsupportedOperationException
CollectedResultCollection
Double
.asDoubleSet
in interface CollectedResultCollection
Double
.UnsupportedOperationException
- If the value could not be found or could not be converted to the given type.@Nonnull public List<BigInteger> asBigIntegerList() throws UnsupportedOperationException
CollectedResultCollection
BigInteger
.asBigIntegerList
in interface CollectedResultCollection
BigInteger
.UnsupportedOperationException
- If the value could not be found or could not be converted to the given type.@Nonnull public Set<BigInteger> asBigIntegerSet() throws UnsupportedOperationException
CollectedResultCollection
BigInteger
.asBigIntegerSet
in interface CollectedResultCollection
BigInteger
.UnsupportedOperationException
- If the value could not be found or could not be converted to the given type.@Nonnull public List<BigDecimal> asBigDecimalList() throws UnsupportedOperationException
CollectedResultCollection
BigDecimal
.asBigDecimalList
in interface CollectedResultCollection
BigDecimal
.UnsupportedOperationException
- If the value could not be found or could not be converted to the given type.@Nonnull public Set<BigDecimal> asBigDecimalSet() throws UnsupportedOperationException
CollectedResultCollection
BigDecimal
.asBigDecimalSet
in interface CollectedResultCollection
BigDecimal
.UnsupportedOperationException
- If the value could not be found or could not be converted to the given type.@Deprecated public boolean isResultPrimitive()
@Deprecated public boolean isResultCollection()
@Deprecated public boolean isResultObject()
@Deprecated @Nonnull public ResultPrimitive getAsPrimitive() throws UnsupportedOperationException
UnsupportedOperationException
@Deprecated @Nonnull public ResultObject getAsObject() throws UnsupportedOperationException
UnsupportedOperationException
@Deprecated public boolean asBoolean() throws UnsupportedOperationException
UnsupportedOperationException
@Deprecated public byte asByte() throws UnsupportedOperationException
UnsupportedOperationException
@Deprecated public char asCharacter() throws UnsupportedOperationException
UnsupportedOperationException
@Deprecated @Nonnull public String asString() throws UnsupportedOperationException
UnsupportedOperationException
@Deprecated public int asInteger() throws UnsupportedOperationException
UnsupportedOperationException
@Deprecated public short asShort() throws UnsupportedOperationException
UnsupportedOperationException
@Deprecated public long asLong() throws UnsupportedOperationException
UnsupportedOperationException
@Deprecated public float asFloat() throws UnsupportedOperationException
UnsupportedOperationException
@Deprecated public double asDouble() throws UnsupportedOperationException
UnsupportedOperationException
@Deprecated @Nonnull public BigInteger asBigInteger() throws UnsupportedOperationException
UnsupportedOperationException
@Deprecated @Nonnull public BigDecimal asBigDecimal() throws UnsupportedOperationException
UnsupportedOperationException
@Nonnull public Iterator<ResultElement> iterator()
protected boolean canEqual(Object other)
public String getCollectedElementName()
public Iterable<ResultElement> getResultElements()
Copyright © 2019 SAP SE. All rights reserved.