Code example for CallableStatement

Methods: getString

0
    /** 
     * From DB to Java. 
     */ 
    @Override 
    public Integer getNullableResult(CallableStatement cs, int index) throws SQLException {
        return dbToJava(cs.getString(index));
    } 
 
    /** 
     * From Java to DB. 
     */ 
    @Override 
    public void setNonNullParameter(PreparedStatement ps, final int i, final Integer intparam, final JdbcType type)
            throws SQLException { 
        if (intparam != null && intparam > 0) {
            ps.setString(i, intparam.toString());
        } else { 
            ps.setString(i, DEFAULT);
        } 
    }