Package com.amazon.rdsdata.client
Class ExecutionResult
- java.lang.Object
-
- com.amazon.rdsdata.client.ExecutionResult
-
public class ExecutionResult extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> java.util.List<T>mapToList(java.lang.Class<T> mapperClass)Maps the result set retrieved from RDS Data API to the list of instances of the specified class.<T> TmapToSingle(java.lang.Class<T> mapperClass)Maps the first row from the result set retrieved from RDS Data API to the instance of the specified class.
-
-
-
Method Detail
-
mapToSingle
public <T> T mapToSingle(java.lang.Class<T> mapperClass)
Maps the first row from the result set retrieved from RDS Data API to the instance of the specified class. If the result set is empty, aMappingExceptionis thrown.- Parameters:
mapperClass- class to map to- Returns:
- an instance of the specified class with the mapped data
- Throws:
MappingException- if failed to map RDS Data API results to the specified class
-
mapToList
public <T> java.util.List<T> mapToList(java.lang.Class<T> mapperClass)
Maps the result set retrieved from RDS Data API to the list of instances of the specified class.- Parameters:
mapperClass- class to map to- Returns:
- a
Listof instances of the specified class with the mapped data - Throws:
MappingException- if failed to map RDS Data API results to the specified class
-
-