Class ExecutionResult

java.lang.Object
com.amazon.rdsdata.client.ExecutionResult

public class ExecutionResult
extends java.lang.Object
  • Method Summary

    Modifier and Type Method Description
    java.lang.Long getNumberOfRecordsUpdated()
    Will return the number of records inserted/updated by the query.
    <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> 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.
    <T> T singleValue​(java.lang.Class<T> convertToType)
    Returns the single value from the first row and the first column from the result set, converting it to the type ExecutionResult

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getNumberOfRecordsUpdated

      public java.lang.Long getNumberOfRecordsUpdated()
      Will return the number of records inserted/updated by the query.
      Returns:
      the number of records updated.
    • 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, a MappingException is 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 List of instances of the specified class with the mapped data
      Throws:
      MappingException - if failed to map RDS Data API results to the specified class
    • singleValue

      public <T> T singleValue​(java.lang.Class<T> convertToType)
      Returns the single value from the first row and the first column from the result set, converting it to the type ExecutionResult
      Parameters:
      convertToType - type to convert to
      Returns:
      a value of a type ExecutionResult from the first row and the first column from the result set
      Throws:
      EmptyResultSetException - if the result set is empty