Class NumericColumnMapping

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean getBoolean​(java.sql.ResultSet rs, int param)
      Obtains a value from resultSet at position specified by exprIndex.
      byte getByte​(java.sql.ResultSet rs, int param)
      Obtains a value from resultSet at position specified by exprIndex.
      char getChar​(java.sql.ResultSet rs, int param)
      Obtains a value from resultSet at position specified by exprIndex.
      double getDouble​(java.sql.ResultSet rs, int param)
      Obtains a value from resultSet at position specified by exprIndex.
      float getFloat​(java.sql.ResultSet rs, int param)
      Obtains a value from resultSet at position specified by exprIndex.
      int getInt​(java.sql.ResultSet rs, int param)
      Obtains a value from resultSet at position specified by exprIndex.
      int getJDBCType()
      Method to return the java.sql.Types type that this relates to.
      long getLong​(java.sql.ResultSet rs, int param)
      Obtains a value from resultSet at position specified by exprIndex.
      java.lang.Object getObject​(java.sql.ResultSet rs, int param)
      Accessor for the value from a result set.
      short getShort​(java.sql.ResultSet rs, int param)
      Obtains a value from resultSet at position specified by exprIndex.
      private void initialize()
      Initialise the mapping, setting any default precision.
      boolean isIntegerBased()
      Accessor for whether the mapping is integer-based.
      void setBoolean​(java.sql.PreparedStatement ps, int param, boolean value)
      Sets a value into ps at position specified by paramIndex.
      void setByte​(java.sql.PreparedStatement ps, int param, byte value)
      Sets a value into ps at position specified by paramIndex.
      void setChar​(java.sql.PreparedStatement ps, int param, char value)
      Sets a value into ps at position specified by paramIndex.
      void setDouble​(java.sql.PreparedStatement ps, int param, double value)
      Sets a value into ps at position specified by paramIndex.
      void setFloat​(java.sql.PreparedStatement ps, int param, float value)
      Sets a value into ps at position specified by paramIndex.
      void setInt​(java.sql.PreparedStatement ps, int param, int value)
      Sets a value into ps at position specified by paramIndex.
      void setLong​(java.sql.PreparedStatement ps, int param, long value)
      Sets a value into ps at position specified by paramIndex.
      void setObject​(java.sql.PreparedStatement ps, int param, java.lang.Object value)
      Sets a value into ps at position specified by paramIndex.
      void setShort​(java.sql.PreparedStatement ps, int param, short value)
      Sets a value into ps at position specified by paramIndex.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • INT_MAX_DECIMAL_DIGITS

        private static final int INT_MAX_DECIMAL_DIGITS
        See Also:
        Constant Field Values
    • Method Detail

      • initialize

        private void initialize()
        Initialise the mapping, setting any default precision.
      • setChar

        public void setChar​(java.sql.PreparedStatement ps,
                            int param,
                            char value)
        Description copied from interface: ColumnMapping
        Sets a value into ps at position specified by paramIndex.
        Specified by:
        setChar in interface ColumnMapping
        Overrides:
        setChar in class AbstractColumnMapping
        Parameters:
        ps - PreparedStatement
        param - the position of the value in the statement
        value - the value
      • getChar

        public char getChar​(java.sql.ResultSet rs,
                            int param)
        Description copied from interface: ColumnMapping
        Obtains a value from resultSet at position specified by exprIndex.
        Specified by:
        getChar in interface ColumnMapping
        Overrides:
        getChar in class AbstractColumnMapping
        Parameters:
        rs - ResultSet
        param - the position of the value in the result
        Returns:
        the value
      • setInt

        public void setInt​(java.sql.PreparedStatement ps,
                           int param,
                           int value)
        Description copied from interface: ColumnMapping
        Sets a value into ps at position specified by paramIndex.
        Specified by:
        setInt in interface ColumnMapping
        Overrides:
        setInt in class AbstractColumnMapping
        Parameters:
        ps - PreparedStatement
        param - the position of the value in the statement
        value - the value
      • getInt

        public int getInt​(java.sql.ResultSet rs,
                          int param)
        Description copied from interface: ColumnMapping
        Obtains a value from resultSet at position specified by exprIndex.
        Specified by:
        getInt in interface ColumnMapping
        Overrides:
        getInt in class AbstractColumnMapping
        Parameters:
        rs - ResultSet
        param - the position of the value in the result
        Returns:
        the value
      • setByte

        public void setByte​(java.sql.PreparedStatement ps,
                            int param,
                            byte value)
        Description copied from interface: ColumnMapping
        Sets a value into ps at position specified by paramIndex.
        Specified by:
        setByte in interface ColumnMapping
        Overrides:
        setByte in class AbstractColumnMapping
        Parameters:
        ps - PreparedStatement
        param - the position of the value in the statement
        value - the value
      • getByte

        public byte getByte​(java.sql.ResultSet rs,
                            int param)
        Description copied from interface: ColumnMapping
        Obtains a value from resultSet at position specified by exprIndex.
        Specified by:
        getByte in interface ColumnMapping
        Overrides:
        getByte in class AbstractColumnMapping
        Parameters:
        rs - ResultSet
        param - the position of the value in the result
        Returns:
        the value
      • setBoolean

        public void setBoolean​(java.sql.PreparedStatement ps,
                               int param,
                               boolean value)
        Description copied from interface: ColumnMapping
        Sets a value into ps at position specified by paramIndex.
        Specified by:
        setBoolean in interface ColumnMapping
        Overrides:
        setBoolean in class AbstractColumnMapping
        Parameters:
        ps - PreparedStatement
        param - the position of the value in the statement
        value - the value
      • getBoolean

        public boolean getBoolean​(java.sql.ResultSet rs,
                                  int param)
        Description copied from interface: ColumnMapping
        Obtains a value from resultSet at position specified by exprIndex.
        Specified by:
        getBoolean in interface ColumnMapping
        Overrides:
        getBoolean in class AbstractColumnMapping
        Parameters:
        rs - ResultSet
        param - the position of the value in the result
        Returns:
        the value
      • setDouble

        public void setDouble​(java.sql.PreparedStatement ps,
                              int param,
                              double value)
        Description copied from interface: ColumnMapping
        Sets a value into ps at position specified by paramIndex.
        Specified by:
        setDouble in interface ColumnMapping
        Overrides:
        setDouble in class AbstractColumnMapping
        Parameters:
        ps - PreparedStatement
        param - the position of the value in the statement
        value - the value
      • getDouble

        public double getDouble​(java.sql.ResultSet rs,
                                int param)
        Description copied from interface: ColumnMapping
        Obtains a value from resultSet at position specified by exprIndex.
        Specified by:
        getDouble in interface ColumnMapping
        Overrides:
        getDouble in class AbstractColumnMapping
        Parameters:
        rs - ResultSet
        param - the position of the value in the result
        Returns:
        the value
      • setFloat

        public void setFloat​(java.sql.PreparedStatement ps,
                             int param,
                             float value)
        Description copied from interface: ColumnMapping
        Sets a value into ps at position specified by paramIndex.
        Specified by:
        setFloat in interface ColumnMapping
        Overrides:
        setFloat in class AbstractColumnMapping
        Parameters:
        ps - PreparedStatement
        param - the position of the value in the statement
        value - the value
      • getFloat

        public float getFloat​(java.sql.ResultSet rs,
                              int param)
        Description copied from interface: ColumnMapping
        Obtains a value from resultSet at position specified by exprIndex.
        Specified by:
        getFloat in interface ColumnMapping
        Overrides:
        getFloat in class AbstractColumnMapping
        Parameters:
        rs - ResultSet
        param - the position of the value in the result
        Returns:
        the value
      • setShort

        public void setShort​(java.sql.PreparedStatement ps,
                             int param,
                             short value)
        Description copied from interface: ColumnMapping
        Sets a value into ps at position specified by paramIndex.
        Specified by:
        setShort in interface ColumnMapping
        Overrides:
        setShort in class AbstractColumnMapping
        Parameters:
        ps - PreparedStatement
        param - the position of the value in the statement
        value - the value
      • getShort

        public short getShort​(java.sql.ResultSet rs,
                              int param)
        Description copied from interface: ColumnMapping
        Obtains a value from resultSet at position specified by exprIndex.
        Specified by:
        getShort in interface ColumnMapping
        Overrides:
        getShort in class AbstractColumnMapping
        Parameters:
        rs - ResultSet
        param - the position of the value in the result
        Returns:
        the value
      • setLong

        public void setLong​(java.sql.PreparedStatement ps,
                            int param,
                            long value)
        Description copied from interface: ColumnMapping
        Sets a value into ps at position specified by paramIndex.
        Specified by:
        setLong in interface ColumnMapping
        Overrides:
        setLong in class AbstractColumnMapping
        Parameters:
        ps - PreparedStatement
        param - the position of the value in the statement
        value - the value
      • getLong

        public long getLong​(java.sql.ResultSet rs,
                            int param)
        Description copied from interface: ColumnMapping
        Obtains a value from resultSet at position specified by exprIndex.
        Specified by:
        getLong in interface ColumnMapping
        Overrides:
        getLong in class AbstractColumnMapping
        Parameters:
        rs - ResultSet
        param - the position of the value in the result
        Returns:
        the value
      • setObject

        public void setObject​(java.sql.PreparedStatement ps,
                              int param,
                              java.lang.Object value)
        Description copied from interface: ColumnMapping
        Sets a value into ps at position specified by paramIndex.
        Specified by:
        setObject in interface ColumnMapping
        Overrides:
        setObject in class AbstractColumnMapping
        Parameters:
        ps - PreparedStatement
        param - the position of the value in the statement
        value - the value
      • getObject

        public java.lang.Object getObject​(java.sql.ResultSet rs,
                                          int param)
        Accessor for the value from a result set.
        Specified by:
        getObject in interface ColumnMapping
        Overrides:
        getObject in class AbstractColumnMapping
        Parameters:
        rs - Result Set
        param - Position in result set
        Returns:
        The value of the object