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

📄 embedcallablestatement.java

📁 derby database source code.good for you.
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
	{		checkStatus();		try {			DataValueDescriptor param = getParms().getParameterForGet(parameterIndex-1);			int v = param.getInt();			wasNull = (v == 0) && param.isNull();			return v;		} catch (StandardException e)		{			throw EmbedResultSet.noStateChangeException(e);		}	}    /**	 * @see CallableStatement#getLong     * @exception SQLException NoOutputParameters thrown.     */    public long getLong(int parameterIndex) throws SQLException 	{		checkStatus();		try {			DataValueDescriptor param = getParms().getParameterForGet(parameterIndex-1);			long v = param.getLong();			wasNull = (v == 0L) && param.isNull();			return v;		} catch (StandardException e)		{			throw EmbedResultSet.noStateChangeException(e);		}	}    /**	 * @see CallableStatement#getFloat     * @exception SQLException NoOutputParameters thrown.     */    public float getFloat(int parameterIndex) throws SQLException 	{		checkStatus();		try {			DataValueDescriptor param = getParms().getParameterForGet(parameterIndex-1);			float v = param.getFloat();			wasNull = (v == 0.0) && param.isNull();			return v;		} catch (StandardException e)		{			throw EmbedResultSet.noStateChangeException(e);		}	}    /**	 * @see CallableStatement#getDouble     * @exception SQLException NoOutputParameters thrown.     */    public double getDouble(int parameterIndex) throws SQLException 	{		checkStatus();		try {			DataValueDescriptor param = getParms().getParameterForGet(parameterIndex-1);			double v = param.getDouble();			wasNull = (v == 0.0) && param.isNull();			return v;		} catch (StandardException e)		{			throw EmbedResultSet.noStateChangeException(e);		}	}    /**	 * @see CallableStatement#getBytes     * @exception SQLException NoOutputParameters thrown.     */    public byte[] getBytes(int parameterIndex) throws SQLException 	{		checkStatus();		try {			byte[] v =  getParms().getParameterForGet(parameterIndex-1).getBytes();			wasNull = (v == null);			return v;		} catch (StandardException e)		{			throw EmbedResultSet.noStateChangeException(e);		}	}    /**	 * @see CallableStatement#getDate     * @exception SQLException NoOutputParameters thrown.     */    public Date getDate(int parameterIndex) throws SQLException	{		checkStatus();		try {			Date v =  getParms().getParameterForGet(parameterIndex-1).getDate(getCal());			wasNull = (v == null);			return v;		} catch (StandardException e)		{			throw EmbedResultSet.noStateChangeException(e);		}	}    /**	 * @see CallableStatement#getTime     * @exception SQLException NoOutputParameters thrown.     */	public Time getTime(int parameterIndex) throws SQLException 	{		checkStatus();		try {			Time v =  getParms().getParameterForGet(parameterIndex-1).getTime(getCal());			wasNull = (v == null);			return v;		} catch (StandardException e)		{			throw EmbedResultSet.noStateChangeException(e);		}	}    /**	 * @see CallableStatement#getTimestamp     * @exception SQLException NoOutputParameters thrown.     */    public Timestamp getTimestamp(int parameterIndex)	    throws SQLException 	{		checkStatus();		try {			Timestamp v =  getParms().getParameterForGet(parameterIndex-1).getTimestamp(getCal());			wasNull = (v == null);			return v;		} catch (StandardException e)		{			throw EmbedResultSet.noStateChangeException(e);		}	}    /**     * Get the value of a SQL DATE parameter as a java.sql.Date object     *     * @param parameterIndex the first parameter is 1, the second is 2, ...     * @return the parameter value; if the value is SQL NULL, the result is      * null     * @exception SQLException if a database-access error occurs.     */    public java.sql.Date getDate(int parameterIndex, Calendar cal)       throws SQLException 	{		return getDate(parameterIndex);	}    /**     * Get the value of a SQL TIME parameter as a java.sql.Time object.     *     * @param parameterIndex the first parameter is 1, the second is 2, ...     * @return the parameter value; if the value is SQL NULL, the result is 	 * null     * @exception SQLException if a database-access error occurs.     */    public java.sql.Time getTime(int parameterIndex, Calendar cal)       throws SQLException 	{		return getTime(parameterIndex);	}    /**     * Get the value of a SQL TIMESTAMP parameter as a java.sql.Timestamp      * object.     *     * @param parameterIndex the first parameter is 1, the second is 2, ...     * @return the parameter value; if the value is SQL NULL, the result is      * null     * @exception SQLException if a database-access error occurs.     */    public java.sql.Timestamp getTimestamp(int parameterIndex, Calendar cal)       throws SQLException 	{		return getTimestamp(parameterIndex);	}    /**	 * @see CallableStatement#getObject     * @exception SQLException NoOutputParameters thrown.     */	public Object getObject(int parameterIndex) throws SQLException 	{		checkStatus();		try {			Object v = getParms().getObject(parameterIndex-1);			wasNull = (v == null);			return v;		} catch (StandardException e)		{			throw EmbedResultSet.noStateChangeException(e);		}	}	/**	    * JDBC 3.0	    *	    * Retrieve the value of the designated JDBC DATALINK parameter as a java.net.URL object	    *	    * @param parameterIndex - the first parameter is 1, the second is 2	    * @return a java.net.URL object that represents the JDBC DATALINK value used as	    * the designated parameter	    * @exception SQLException Feature not implemented for now.		*/		public URL getURL(int parameterIndex)	    throws SQLException		{			throw Util.notImplemented();		}		/**	    * JDBC 3.0	    *	    * Sets the designated parameter to the given java.net.URL object. The driver	    * converts this to an SQL DATALINK value when it sends it to the database.	    *	    * @param parameterName - the name of the parameter	    * @param val - the parameter value	    * @exception SQLException Feature not implemented for now.		*/		public void setURL(String parameterName, URL val)	    throws SQLException		{			throw Util.notImplemented();		}		/**	    * JDBC 3.0	    *	    * Retrieves the value of a JDBC DATALINK parameter as a java.net.URL object	    *	    * @param parameterName - the name of the parameter	    * @return the parameter value. If the value is SQL NULL, the result is null.	    * @exception SQLException Feature not implemented for now.		*/		public URL getURL(String parameterName)	    throws SQLException		{			throw Util.notImplemented();		}		/**	     * JDBC 2.0	     *	     * Get a BLOB OUT parameter.	     *	     * @param i the first parameter is 1, the second is 2, ...	     * @return an object representing a BLOB	     * @exception SQLException if a database-access error occurs.	     */	    public Blob getBlob (int i) throws SQLException {			throw Util.notImplemented();		}	    /**	     * JDBC 2.0	     *	     * Get a CLOB OUT parameter.	     *	     * @param i the first parameter is 1, the second is 2, ...	     * @return an object representing a CLOB	     * @exception SQLException if a database-access error occurs.	     */	    public Clob getClob (int i) throws SQLException {			throw Util.notImplemented();		}	public void addBatch() throws SQLException {		checkStatus();		ParameterValueSet pvs = getParms();		int numberOfParameters = pvs.getParameterCount();		for (int j=1; j<=numberOfParameters; j++) {			switch (pvs.getParameterMode(j)) {			case JDBC30Translation.PARAMETER_MODE_IN:			case JDBC30Translation.PARAMETER_MODE_UNKNOWN:				break;			case JDBC30Translation.PARAMETER_MODE_OUT:			case JDBC30Translation.PARAMETER_MODE_IN_OUT:				throw newSQLException(SQLState.OUTPUT_PARAMS_NOT_ALLOWED);			}		}		super.addBatch();	}}

⌨️ 快捷键说明

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