Code example for ResultSet

Methods: getObject

0
	 * @see org.seasar.extension.jdbc.ValueType#getValue(java.sql.ResultSet, java.lang.String) 
	 */ 
	public Object getValue(ResultSet resultSet, String columnName)
		throws SQLException { 
	 
		return resultSet.getObject(columnName);
	} 
 
	/** 
	 * @see org.seasar.extension.jdbc.ValueType#bindValue(java.sql.PreparedStatement, int, java.lang.Object) 
	 */ 
	public void bindValue(PreparedStatement ps, int index, Object value)
		throws SQLException { 
 
		if (value == null) {
			ps.setNull(index, Types.VARCHAR);
		} else { 
			ps.setObject(index, value);
		} 
	}