⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 embedcallablestatement20.java

📁 derby database source code.good for you.
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
/*   Derby - Class org.apache.derby.impl.jdbc.EmbedCallableStatement20   Copyright 1998, 2004 The Apache Software Foundation or its licensors, as applicable.   Licensed under the Apache License, Version 2.0 (the "License");   you may not use this file except in compliance with the License.   You may obtain a copy of the License at      http://www.apache.org/licenses/LICENSE-2.0   Unless required by applicable law or agreed to in writing, software   distributed under the License is distributed on an "AS IS" BASIS,   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   See the License for the specific language governing permissions and   limitations under the License. */package org.apache.derby.impl.jdbc;import java.math.BigDecimal;import java.sql.CallableStatement;import java.sql.SQLException;import java.sql.Date;import java.sql.Time;import java.sql.Timestamp;/* ---- New jdbc 2.0 types ----- */import java.sql.Array;import java.sql.Blob;import java.sql.Clob;import java.sql.Ref;import java.net.URL;import java.util.Map;import java.io.InputStream;import java.io.Reader;import java.util.Calendar;import org.apache.derby.iapi.error.StandardException;import org.apache.derby.iapi.sql.conn.StatementContext;import org.apache.derby.iapi.reference.SQLState;import org.apache.derby.iapi.types.DataValueDescriptor;import org.apache.derby.impl.jdbc.Util;import org.apache.derby.impl.jdbc.EmbedConnection;import org.apache.derby.impl.jdbc.EmbedResultSet;/** * This class extends the EmbedCallableStatement class in order to support new * methods and classes that come with JDBC 2.0. * *	@see org.apache.derby.impl.jdbc.EmbedCallableStatement * *	@author francois */public class EmbedCallableStatement20	extends org.apache.derby.impl.jdbc.EmbedCallableStatement {	//////////////////////////////////////////////////////////////	//	// CONSTRUCTORS	//	//////////////////////////////////////////////////////////////	public EmbedCallableStatement20 (EmbedConnection conn, String sql,								   int resultSetType,								   int resultSetConcurrency,								   int resultSetHoldability)		throws SQLException	{		super(conn, sql, resultSetType, resultSetConcurrency, resultSetHoldability);	}	/////////////////////////////////////////////////////////////////////////	//	//	JDBC 2.0	-	New public methods	//	/////////////////////////////////////////////////////////////////////////    /**     * JDBC 2.0     *     * Get the value of a NUMERIC parameter as a java.math.BigDecimal object.     *     * @param parameterIndex the first parameter is 1, the second is 2, ...     * @return the parameter value (full precision); if the value is SQL NULL,      * the result is null      * @exception SQLException if a database-access error occurs.     */    public BigDecimal getBigDecimal(int parameterIndex) throws SQLException 	{		checkStatus();		try {			DataValueDescriptor dvd = getParms().getParameterForGet(parameterIndex-1);			if (wasNull = dvd.isNull())				return null;						return org.apache.derby.iapi.types.SQLDecimal.getBigDecimal(dvd);					} catch (StandardException e)		{			throw EmbedResultSet.noStateChangeException(e);		}	}    /**     * JDBC 2.0     *     * Returns an object representing the value of OUT parameter @i.     * Use the @map to determine the class from which to construct      * data of SQL structured and distinct types.     *     * @param i the first parameter is 1, the second is 2, ...     * @param map the mapping from SQL type names to Java classes     * @return a java.lang.Object holding the OUT parameter value.     * @exception SQLException if a database-access error occurs.     */	public Object  getObject (int i, java.util.Map map) throws SQLException 	{		if( map == null)            throw Util.generateCsSQLException(SQLState.INVALID_API_PARAMETER,map,"map",                                              "java.sql.CallableStatement.getObject");        if(!(map.isEmpty()))            throw Util.notImplemented();        // Map is empty call the normal getObject method.        return getObject(i);	}    /**     * JDBC 2.0     *     * Get a REF(&lt;structured-type&gt;) OUT parameter.     *     * @param i the first parameter is 1, the second is 2, ...     * @return an object representing data of an SQL REF Type     * @exception SQLException if a database-access error occurs.     */	public Ref getRef (int i) throws SQLException {		throw Util.notImplemented();	}    /**     * JDBC 2.0     *     * Get an Array OUT parameter.     *     * @param i the first parameter is 1, the second is 2, ...     * @return an object representing an SQL array     * @exception SQLException if a database-access error occurs.     */    public Array getArray (int i) throws SQLException {		throw Util.notImplemented();	} 	/*	 * Note: all the JDBC 2.0 Prepared statement methods are duplicated in here	 * because this class inherits from Local/EmbedCallableStatement, which	 * inherits from local/PreparedStatement.  This class should inherit from a	 * local20/PreparedStatement.  Since java does not allow multiple inheritance,	 * duplicate the code here.	 */      /**      * JDBC 2.0      *      * Set a REF(&lt;structured-type&gt;) parameter.      *      * @param i the first parameter is 1, the second is 2, ...      * @param x an object representing data of an SQL REF Type      * @exception SQLException Feature not implemented for now.      */     public void setRef (int i, Ref x) throws SQLException { 		throw Util.notImplemented();	 }      /**      * JDBC 2.0      *      * Set an Array parameter.      *      * @param i the first parameter is 1, the second is 2, ...      * @param x an object representing an SQL array      * @exception SQLException Feature not implemented for now.      */     public void setArray (int i, Array x) throws SQLException { 		throw Util.notImplemented();	 } 	/////////////////////////////////////////////////////////////////////////	//	//	JDBC 3.0	-	New public methods	//	/////////////////////////////////////////////////////////////////////////	/**    * JDBC 3.0    *    * Registers the OUT parameter named parameterName to the JDBC type sqlType.    * All OUT parameters must be registered before a stored procedure is executed.    *    * @param parameterName - the name of the parameter    * @param sqlType - the JDBC type code defined by java.sql.Types. If the    * parameter is of JDBC type NUMERIC or DECIMAL, the version of registerOutParameter    * that accepts a scale value should be used.    * @exception SQLException Feature not implemented for now.	*/	public void registerOutParameter(String parameterName,					int sqlType)    throws SQLException	{		throw Util.notImplemented();	}	/**    * JDBC 3.0    *    * Registers the designated output parameter. This version of the method    * registerOutParameter should be used for a user-named or REF output parameter.    *    * @param parameterName - the name of the parameter    * @param sqlType - the SQL type code defined by java.sql.Types.    * @param typeName - the fully-qualified name of an SQL structure type    * @exception SQLException Feature not implemented for now.	*/	public void registerOutParameter(String parameterName,					int sqlType, String typeName)    throws SQLException	{		throw Util.notImplemented();	}	/**    * JDBC 3.0    *    * Registers the parameter named parameterName to the JDBC type sqlType.    * This method must be called before a stored procedure is executed.    *    * @param parameterName - the name of the parameter    * @param sqlType - the SQL type code defined by java.sql.Types.    * @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 Feature not implemented for now.	*/	public void registerOutParameter(String parameterName,					int sqlType, int scale)    throws SQLException	{		throw Util.notImplemented();	}	/**    * JDBC 3.0    *    * Retrieves the value of a JDBC REF (<structured-type) parameter as a Ref object    * in the Java programming language.    *    * @param parameterName - the name of the parameter    * @return the parameter value as a Ref object in the Java Programming language.    * If the value is SQL NULL, the result is null.    * @exception SQLException Feature not implemented for now.	*/	public Ref getRef(String parameterName)    throws SQLException	{		throw Util.notImplemented();	}	/**    * JDBC 3.0    *    * Retrieves the value of a JDBC BLOB parameter as a Blob object    * in the Java programming language.    *    * @param parameterName - the name of the parameter    * @return the parameter value as a Blob object in the Java Programming language.    * If the value is SQL NULL, the result is null.    * @exception SQLException Feature not implemented for now.	*/	public Blob getBlob(String parameterName)    throws SQLException	{		throw Util.notImplemented();	}	/**    * JDBC 3.0    *    * Retrieves the value of a JDBC CLOB parameter as a Clob object    * in the Java programming language.    *    * @param parameterName - the name of the parameter    * @return the parameter value as a Clob object in the Java Programming language.    * If the value is SQL NULL, the result is null.    * @exception SQLException Feature not implemented for now.	*/	public Clob getClob(String parameterName)    throws SQLException	{		throw Util.notImplemented();	}	/**    * JDBC 3.0    *    * Retrieves the value of a JDBC ARRAY parameter as an Array object    * in the Java programming language.    *    * @param parameterName - the name of the parameter    * @return the parameter value as a Array object in the Java Programming language.    * If the value is SQL NULL, the result is null.    * @exception SQLException Feature not implemented for now.	*/	public Array getArray(String parameterName)    throws SQLException	{		throw Util.notImplemented();	}	/**    * JDBC 3.0    *    * Sets the designated parameter to SQL NULL.    *    * @param parameterName - the name of the parameter    * @param sqlType - the SQL type code defined in java.sql.Types    * @exception SQLException Feature not implemented for now.	*/	public void setNull(String parameterName, int sqlType)    throws SQLException	{		throw Util.notImplemented();	}	/**    * JDBC 3.0    *    * Sets the designated parameter to SQL NULL.    *    * @param parameterName - the name of the parameter    * @param sqlType - the SQL type code defined in java.sql.Types    * @param typeName - the fully-qualified name of an SQL user-defined type    * @exception SQLException Feature not implemented for now.	*/	public void setNull(String parameterName, int sqlType, String typeName)    throws SQLException	{		throw Util.notImplemented();	}	/**    * JDBC 3.0    *    * Sets the designated parameter to the given Java boolean value. The driver

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -