📄 callablestatement.java
字号:
* @param i the first parameter is 1, the second is 2, * and so on * @return the parameter value as a <code>Ref</code> object in the * Java programming language. If the value was SQL <code>NULL</code>, the value * <code>null</code> is returned. * @exception SQLException if a database access error occurs * @since 1.2 */ Ref getRef (int i) throws SQLException; /** * Retrieves the value of the designated JDBC <code>BLOB</code> parameter as a * {@link Blob} object in the Java programming language. * @param i the first parameter is 1, the second is 2, and so on * @return the parameter value as a <code>Blob</code> object in the * Java programming language. If the value was SQL <code>NULL</code>, the value * <code>null</code> is returned. * @exception SQLException if a database access error occurs * @since 1.2 */ Blob getBlob (int i) throws SQLException; /** * Retrieves the value of the designated JDBC <code>CLOB</code> parameter as a * <code>Clob</code> object in the Java programming language. * @param i the first parameter is 1, the second is 2, and * so on * @return the parameter value as a <code>Clob</code> object in the * Java programming language. If the value was SQL <code>NULL</code>, the * value <code>null</code> is returned. * @exception SQLException if a database access error occurs * @since 1.2 */ Clob getClob (int i) throws SQLException; /** * * Retrieves the value of the designated JDBC <code>ARRAY</code> parameter as an * {@link Array} object in the Java programming language. * @param i the first parameter is 1, the second is 2, and * so on * @return the parameter value as an <code>Array</code> object in * the Java programming language. If the value was SQL <code>NULL</code>, the * value <code>null</code> is returned. * @exception SQLException if a database access error occurs * @since 1.2 */ Array getArray (int i) throws SQLException; /** * Retrieves the value of the designated JDBC <code>DATE</code> parameter as a * <code>java.sql.Date</code> object, using * the given <code>Calendar</code> object * to construct the date. * With a <code>Calendar</code> object, the driver * can calculate the date taking into account a custom timezone and locale. * If no <code>Calendar</code> object is specified, the driver uses the * default timezone and locale. * * @param parameterIndex the first parameter is 1, the second is 2, * and so on * @param cal the <code>Calendar</code> object the driver will use * to construct the date * @return the parameter value. If the value is SQL <code>NULL</code>, the result * is <code>null</code>. * @exception SQLException if a database access error occurs * @see #setDate * @since 1.2 */ java.sql.Date getDate(int parameterIndex, Calendar cal) throws SQLException; /** * Retrieves the value of the designated JDBC <code>TIME</code> parameter as a * <code>java.sql.Time</code> object, using * the given <code>Calendar</code> object * to construct the time. * With a <code>Calendar</code> object, the driver * can calculate the time taking into account a custom timezone and locale. * If no <code>Calendar</code> object is specified, the driver uses the * default timezone and locale. * * @param parameterIndex the first parameter is 1, the second is 2, * and so on * @param cal the <code>Calendar</code> object the driver will use * to construct the time * @return the parameter value; if the value is SQL <code>NULL</code>, the result * is <code>null</code>. * @exception SQLException if a database access error occurs * @see #setTime * @since 1.2 */ java.sql.Time getTime(int parameterIndex, Calendar cal) throws SQLException; /** * Retrieves the value of the designated JDBC <code>TIMESTAMP</code> parameter as a * <code>java.sql.Timestamp</code> object, using * the given <code>Calendar</code> object to construct * the <code>Timestamp</code> object. * With a <code>Calendar</code> object, the driver * can calculate the timestamp taking into account a custom timezone and locale. * If no <code>Calendar</code> object is specified, the driver uses the * default timezone and locale. * * * @param parameterIndex the first parameter is 1, the second is 2, * and so on * @param cal the <code>Calendar</code> object the driver will use * to construct the timestamp * @return the parameter value. If the value is SQL <code>NULL</code>, the result * is <code>null</code>. * @exception SQLException if a database access error occurs * @see #setTimestamp * @since 1.2 */ java.sql.Timestamp getTimestamp(int parameterIndex, Calendar cal) throws SQLException; /** * Registers the designated output parameter. This version of * the method <code>registerOutParameter</code> * should be used for a user-defined or <code>REF</code> output parameter. Examples * of user-defined types include: <code>STRUCT</code>, <code>DISTINCT</code>, * <code>JAVA_OBJECT</code>, and named array types. * * Before executing a stored procedure call, you must explicitly * call <code>registerOutParameter</code> to register the type from * <code>java.sql.Types</code> for each * OUT parameter. For a user-defined parameter, the fully-qualified SQL * type name of the parameter should also be given, while a <code>REF</code> * parameter requires that the fully-qualified type name of the * referenced type be given. A JDBC driver that does not need the * type code and type name information may ignore it. To be portable, * however, applications should always provide these values for * user-defined and <code>REF</code> parameters. * * Although it is intended for user-defined and <code>REF</code> parameters, * this method may be used to register a parameter of any JDBC type. * If the parameter does not have a user-defined or <code>REF</code> type, the * <i>typeName</i> parameter is ignored. * * <P><B>Note:</B> When reading the value of an out parameter, you * must use the getter method whose Java type corresponds to the * parameter's registered SQL type. * * @param paramIndex the first parameter is 1, the second is 2,... * @param sqlType a value from {@link java.sql.Types} * @param typeName the fully-qualified name of an SQL structured type * @exception SQLException if a database access error occurs * @see Types * @since 1.2 */ void registerOutParameter (int paramIndex, int sqlType, String typeName) throws SQLException; //--------------------------JDBC 3.0----------------------------- /** * Registers the OUT parameter named * <code>parameterName</code> to the JDBC type * <code>sqlType</code>. All OUT parameters must be registered * before a stored procedure is executed. * <p> * The JDBC type specified by <code>sqlType</code> for an OUT * parameter determines the Java type that must be used * in the <code>get</code> method to read the value of that parameter. * <p> * If the JDBC type expected to be returned to this output parameter * is specific to this particular database, <code>sqlType</code> * should be <code>java.sql.Types.OTHER</code>. The method * {@link #getObject} retrieves the value. * @param parameterName the name of the parameter * @param sqlType the JDBC type code defined by <code>java.sql.Types</code>. * If the parameter is of JDBC type <code>NUMERIC</code> * or <code>DECIMAL</code>, the version of * <code>registerOutParameter</code> that accepts a scale value * should be used. * @exception SQLException if a database access error occurs * @since 1.4 * @see Types */ void registerOutParameter(String parameterName, int sqlType) throws SQLException; /** * Registers the parameter named * <code>parameterName</code> to be of JDBC type * <code>sqlType</code>. This method must be called * before a stored procedure is executed. * <p> * The JDBC type specified by <code>sqlType</code> for an OUT * parameter determines the Java type that must be used * in the <code>get</code> method to read the value of that parameter. * <p> * This version of <code>registerOutParameter</code> should be * used when the parameter is of JDBC type <code>NUMERIC</code> * or <code>DECIMAL</code>. * @param parameterName the name of the parameter * @param sqlType SQL type code defined by <code>java.sql.Types</code>. * @param scale the desired number of digits to the right of the * decimal point. It must be greater than or equal to zero. * @exception SQLException if a database access error occurs * @since 1.4 * @see Types */ void registerOutParameter(String parameterName, int sqlType, int scale) throws SQLException; /** * Registers the designated output parameter. This version of * the method <code>registerOutParameter</code> * should be used for a user-named or REF output parameter. Examples * of user-named types include: STRUCT, DISTINCT, JAVA_OBJECT, and * named array types. * * Before executing a stored procedure call, you must explicitly * call <code>registerOutParameter</code> to register the type from * <code>java.sql.Types</code> for each * OUT parameter. For a user-named parameter the fully-qualified SQL * type name of the parameter should also be given, while a REF * parameter requires that the fully-qualified type name of the * referenced type be given. A JDBC driver that does not need the * type code and type name information may ignore it. To be portable, * however, applications should always provide these values for * user-named and REF parameters. * * Although it is intended for user-named and REF parameters, * this method may be used to register a parameter of any JDBC type. * If the parameter does not have a user-named or REF type, the * typeName parameter is ignored. * * <P><B>Note:</B> When reading the value of an out parameter, you * must use the <code>getXXX</code> method whose Java type XXX corresponds to the * parameter's registered SQL type. * * @param parameterName the name of the parameter * @param sqlType a value from {@link java.sql.Types} * @param typeName the fully-qualified name of an SQL structured type * @exception SQLException if a database access error occurs * @see Types * @since 1.4 */ void registerOutParameter (String parameterName, int sqlType, String typeName) throws SQLException; /** * Retrieves the value of the designated JDBC <code>DATALINK</code> parameter as a * <code>java.net.URL</code> object. * * @param parameterIndex the first parameter is 1, the second is 2,... * @return a <code>java.net.URL</code> object that represents the * JDBC <code>DATALINK</code> value used as the designated * parameter * @exception SQLException if a database access error occurs, * or if the URL being returned is * not a valid URL on the Java platform * @see #setURL * @since 1.4 */ java.net.URL getURL(int parameterIndex) throws SQLException; /** * Sets the designated parameter to the given <code>java.net.URL</code> object. * The driver converts this to an SQL <code>DATALINK</code> value when * it sends it to the database. * * @param parameterName the name of the parameter * @param val the parameter value * @exception SQLException if a database access error occurs, * or if a URL is malformed * @see #getURL * @since 1.4 */ void setURL(String parameterName, java.net.URL val) throws SQLException; /** * Sets the designated parameter to SQL <code>NULL</code>. * * <P><B>Note:</B> You must specify the parameter's SQL type. * * @param parameterName the name of the parameter * @param sqlType the SQL type code defined in <code>java.sql.Types</code> * @exception SQLException if a database access error occurs * @since 1.4 */ void setNull(String parameterName, int sqlType) throws SQLException; /** * Sets the designated parameter to the given Java <code>boolean</code> value. * The driver converts this * to an SQL <code>BIT</code> value when it sends it to the database. * * @param parameterName the name of the parameter * @param x the parameter value * @exception SQLException if a database access error occurs * @see #getBoolean * @since 1.4 */ void setBoolean(String parameterName, boolean x) throws SQLException; /** * Sets the designated parameter to the given Java <code>byte</code> value. * The driver converts this * to an SQL <code>TINYINT</code> value when it sends it to the database. * * @param parameterName the name of the parameter * @param x the parameter value * @exception SQLException if a database access error occurs * @see #getByte * @since 1.4 */ void setByte(String parameterName, byte x) throws SQLException; /** * Sets the designated parameter to the given Java <code>short</code> value. * The driver converts this * to an SQL <code>SMALLINT</code> value when it sends it to the database. * * @param parameterName the name of the parameter * @param x the parameter value * @exception SQLException if a database access error occurs * @see #getShort * @since 1.4 */ void setShort(String parameterName, short x) throws SQLException; /** * Sets the designated parameter to the given Java <code>int</code> value. * The driver converts this * to an SQL <code>INTEGER</code> value when it sends it to the database. * * @param parameterName the name of the parameter * @param x the parameter value * @exception SQLException if a database access error occurs * @see #getInt * @since 1.4 */ void setInt(String parameterName, int x) throws SQLException; /** * Sets the designated parameter to the given Java <code>long</code> value. * The driver converts this * to an SQL <code>BIGINT</code> value when it sends it to the database. * * @param parameterName the name of the parameter * @param x the parameter value * @exception SQLException if a database access error occurs * @see #getLong * @since 1.4 */ void setLong(String parameterName, long x) throws SQLException; /**
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -