Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-5006591

PLEASE add setInteger()/getInteger() to statements/resultsets!!!

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 1.4.2
    • core-libs
    • x86
    • windows_nt

      Name: rmT116609 Date: 03/02/2004


      A DESCRIPTION OF THE REQUEST :
      There are specific get/set methods for the general types like BigDecimal: CallableStatement.setBigDecimal() and ResultSet.getBigDecimal(), but none for Integer!

      JUSTIFICATION :
      Instead of simple call getInteger()/setInteger() you have to write several lines of code:

      Object o = rs.getObject(1);
      if (o != null) {
           obj.setIntegerValue(UtilClass.toInteger(o));
      }

      As setObject()/getObject() is often too slow and should be avoided and you can depend on the JDBC driver to always map the datatypes correctly, the setInteger()/getInteger() methods should strongly be implemented in Statements and ResultSet!
      (Incident Review ID: 231329)
      ======================================================================

            lancea Lance Andersen
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: