Example usage for org.springframework.jdbc.core SqlParameter getScale

List of usage examples for org.springframework.jdbc.core SqlParameter getScale

Introduction

In this page you can find the example usage for org.springframework.jdbc.core SqlParameter getScale.

Prototype

@Nullable
public Integer getScale() 

Source Link

Document

Return the scale of the parameter, if any.

Usage

From source file:org.hxzon.util.db.springjdbc.StatementCreatorUtils.java

/**
 * Set the value for a parameter. The method used is based on the SQL type
 * of the parameter and we can handle complex types like arrays and LOBs.
 * @param ps the prepared statement or callable statement
 * @param paramIndex index of the parameter we are setting
 * @param param the parameter as it is declared including type
 * @param inValue the value to set// w  w w.j  a va2  s . com
 * @throws SQLException if thrown by PreparedStatement methods
 */
public static void setParameterValue(PreparedStatement ps, int paramIndex, SqlParameter param, Object inValue)
        throws SQLException {

    setParameterValueInternal(ps, paramIndex, param.getSqlType(), param.getTypeName(), param.getScale(),
            inValue);
}

From source file:org.springframework.jdbc.core.StatementCreatorUtils.java

/**
 * Set the value for a parameter. The method used is based on the SQL type
 * of the parameter and we can handle complex types like arrays and LOBs.
 * @param ps the prepared statement or callable statement
 * @param paramIndex index of the parameter we are setting
 * @param param the parameter as it is declared including type
 * @param inValue the value to set/*  www  . j av a 2 s .  co m*/
 * @throws SQLException if thrown by PreparedStatement methods
 */
public static void setParameterValue(PreparedStatement ps, int paramIndex, SqlParameter param,
        @Nullable Object inValue) throws SQLException {

    setParameterValueInternal(ps, paramIndex, param.getSqlType(), param.getTypeName(), param.getScale(),
            inValue);
}