Class ResultSupport


  • public class ResultSupport
    extends java.lang.Object

    Supports the creation of a javax.servlet.jsp.jstl.sql.Result object from a source java.sql.ResultSet object. A Result object makes it much easier for page authors to access and manipulate the data resulting from a SQL query.

    Note that these methods hide any SQLExceptions that are caused and return null - to work around that use org.apache.taglibs.standard.tag.common.sql.ResultImpl directly.

    • Constructor Summary

      Constructors 
      Constructor Description
      ResultSupport()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Result toResult​(java.sql.ResultSet rs)
      Converts a ResultSet object to a Result object.
      static Result toResult​(java.sql.ResultSet rs, int maxRows)
      Converts maxRows of a ResultSet object to a Result object.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ResultSupport

        public ResultSupport()
    • Method Detail

      • toResult

        public static Result toResult​(java.sql.ResultSet rs)
        Converts a ResultSet object to a Result object.
        Parameters:
        rs - the ResultSet object
        Returns:
        The Result object created from the ResultSet
      • toResult

        public static Result toResult​(java.sql.ResultSet rs,
                                      int maxRows)
        Converts maxRows of a ResultSet object to a Result object.
        Parameters:
        rs - the ResultSet object
        maxRows - the maximum number of rows to be cached into the Result object.
        Returns:
        The Result object created from the ResultSet, limited by maxRows