public class BapiQueryResult extends Object
BapiQuery
.
Use the methods get(String)
, get(int)
, getIfPresent(String)
, collect(String)
,
size()
, isEmpty()
, or has(String)
to access the content of the BapiQueryResult
.
Use the methods hasFailed()
, hasSuccessMessages()
, hasInformationMessages()
,
hasWarningMessages()
, or hasErrorMessages()
to inspect the resulting messages from the BAPI call.
Constructor and Description |
---|
BapiQueryResult() |
Modifier and Type | Method and Description |
---|---|
CollectedResultCollection |
collect(String elementName)
Collects the resulting elements with the given name from the parameters of this result.
|
ResultElement |
get(int index)
Returns the element with the given name from this result.
|
ResultElement |
get(String elementName)
Returns the element with the given name from this result.
|
List<RemoteFunctionMessage> |
getErrorMessages() |
com.google.common.base.Optional<ResultElement> |
getIfPresent(String elementName)
Returns the element with the given name from this result.
|
List<RemoteFunctionMessage> |
getInformationMessages() |
QueryT |
getQuery()
ERP query from which this result originates.
|
ArrayList<ResultElement> |
getResultElements() |
List<RemoteFunctionMessage> |
getSuccessMessages() |
List<RemoteFunctionMessage> |
getWarningMessages() |
boolean |
has(String elementName)
Indicates whether the element with the given name exists in the result.
|
boolean |
hasErrorMessages() |
boolean |
hasFailed() |
boolean |
hasInformationMessages()
Indicates whether information messages occurred during BAPI execution.
|
boolean |
hasSuccessMessages()
Indicates whether success messages occurred during BAPI execution.
|
boolean |
hasWarningMessages()
Indicates whether warning messages occurred during BAPI execution.
|
boolean |
isEmpty() |
Iterator<ResultElement> |
iterator() |
int |
size() |
String |
toString() |
boolean |
wasSuccessful() |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public boolean hasSuccessMessages()
public boolean hasInformationMessages()
public boolean hasWarningMessages()
public boolean hasFailed()
public boolean wasSuccessful()
public boolean hasErrorMessages()
public int size()
public boolean isEmpty()
public boolean has(String elementName)
elementName
- The name of the element to be accessed.public com.google.common.base.Optional<ResultElement> getIfPresent(String elementName) throws IllegalArgumentException
elementName
- The name of the element to be accessed.ResultElement
representing the corresponding element.IllegalArgumentException
public ResultElement get(int index) throws IndexOutOfBoundsException
index
- The index of the element to be accessed.ResultElement
representing the corresponding element.IndexOutOfBoundsException
- If the given index is out of bounds.public ResultElement get(String elementName) throws IllegalArgumentException
elementName
- The name of the element to be accessed.ResultElement
representing the corresponding element.IllegalArgumentException
- If the element could not be found.public CollectedResultCollection collect(String elementName)
elementName
- The name of the nested elements to be collected.ResultCollection
representing the corresponding elements.public ArrayList<ResultElement> getResultElements()
public Iterator<ResultElement> iterator()
iterator
in interface Iterable<ResultElement>
@Generated(value="lombok") public String toString()
@Generated(value="lombok") public QueryT getQuery()
QueryResult
getQuery
in interface QueryResult<QueryT extends Query<QueryT,QueryResultT>,QueryResultT extends com.sap.cloud.sdk.s4hana.connectivity.rfc.AbstractRemoteFunctionQueryResult<QueryT,QueryResultT>>
@Generated(value="lombok") public List<RemoteFunctionMessage> getSuccessMessages()
@Generated(value="lombok") public List<RemoteFunctionMessage> getInformationMessages()
@Generated(value="lombok") public List<RemoteFunctionMessage> getWarningMessages()
@Generated(value="lombok") public List<RemoteFunctionMessage> getErrorMessages()
Copyright © 2017 SAP SE. All rights reserved.