Available Methods
- execute ( )
- close ( )
- setInt ( )
- setString ( )
- registerOutParameter ( )
- getResultSet ( )
- executeUpdate ( )
- executeQuery ( )
- getString ( )
- getInt ( )
- wasNull ( )
- getMoreResults ( )
- setLong ( )
- getObject ( )
- setObject ( )
- setTimestamp ( )
- getBigDecimal ( )
- setDouble ( )
- getUpdateCount ( )
- getParameterMetaData ( )
- addBatch ( )
- getClob ( )
- getWarnings ( )
- getTimestamp ( )
- setNull ( )
- setFloat ( )
- setBoolean ( )
- setTime ( )
- getBoolean ( )
- setDate ( )
- getLong ( )
- executeBatch ( )
- setShort ( )
- getByte ( )
- getBlob ( )
- getBytes ( )
- setBigDecimal ( )
- getArray ( )
- getDouble ( )
- getDate ( )
- getTime ( )
- getFloat ( )
- clearParameters ( )
- setQueryTimeout ( )
- cancel ( )
- setBytes ( )
- setFetchSize ( )
- setArray ( )
Related Classes
- java.io.File
- java.io.InputStream
- java.util.Date
- java.util.Iterator
- java.lang.reflect.Method
- java.util.Properties
- java.util.LinkedHashMap
- java.util.Calendar
- org.junit.Assert
- java.math.BigDecimal
- java.util.concurrent.Callable
- java.io.Reader
- java.sql.SQLException
- java.sql.Connection
- java.sql.ResultSet
- javax.sql.DataSource
- java.sql.PreparedStatement
- java.sql.Statement
- java.sql.Timestamp
- java.sql.DriverManager
- java.lang.reflect.Proxy
- java.sql.Date
- java.sql.ResultSetMetaData
- java.sql.Types
- org.apache.hadoop.conf.Configuration
Java Code Examples for java.sql.CallableStatement#setArray()
The following examples show how to use
java.sql.CallableStatement#setArray() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PostgreSQLTypeFunctions.java From binnavi with Apache License 2.0 | 7 votes |
/** * Increments the offsets of all members which have an offset > startOffset. * * @param connection The connection to the database. * @param members The ids of the members whose updates should be updated. * @param delta The value that is added to all member offsets. * @param implicitDelta The delta that is added to the implicitly update member offsets. * @param implicitlyUpdatedMembers * @param module The module that contains the members. * @throws CouldntSaveDataException Thrown if the member offsets could not be updated. */ public static void updateMemberOffsets(final Connection connection, final List<Integer> members, final int delta, final List<Integer> implicitlyUpdatedMembers, final int implicitDelta, final INaviModule module) throws CouldntSaveDataException { try { final CallableStatement statement = connection.prepareCall("{ call update_member_offsets(?, ?, ?, ?, ?) }"); try { statement.setInt(1, module.getConfiguration().getId()); statement.setArray(2, connection.createArrayOf("int4", members.toArray())); statement.setInt(3, delta); statement.setArray(4, connection.createArrayOf("int4", implicitlyUpdatedMembers.toArray())); statement.setInt(5, implicitDelta); statement.execute(); } finally { statement.close(); } } catch (final SQLException exception) { throw new CouldntSaveDataException(exception); } }