preparedstatement.java
来自「gcc3.2.1源代码」· Java 代码 · 共 558 行 · 第 1/2 页
JAVA
558 行
/* PreparedStatement.java -- Interface for pre-compiled statements. Copyright (C) 1999, 2000 Free Software Foundation, Inc.This file is part of GNU Classpath.GNU Classpath is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; either version 2, or (at your option)any later version. GNU Classpath is distributed in the hope that it will be useful, butWITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNUGeneral Public License for more details.You should have received a copy of the GNU General Public Licensealong with GNU Classpath; see the file COPYING. If not, write to theFree Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA02111-1307 USA.Linking this library statically or dynamically with other modules ismaking a combined work based on this library. Thus, the terms andconditions of the GNU General Public License cover the wholecombination.As a special exception, the copyright holders of this library give youpermission to link this library with independent modules to produce anexecutable, regardless of the license terms of these independentmodules, and to copy and distribute the resulting executable underterms of your choice, provided that you also meet, for each linkedindependent module, the terms and conditions of the license of thatmodule. An independent module is a module which is not derived fromor based on this library. If you modify this library, you may extendthis exception to your version of the library, but you are notobligated to do so. If you do not wish to do so, delete thisexception statement from your version. */package java.sql;import java.io.InputStream;import java.io.Reader;import java.math.BigDecimal;import java.util.Calendar;/** * This interface provides a mechanism for executing pre-compiled * statements. This provides greater efficiency when calling the same * statement multiple times. Parameters are allowed in a statement, * providings for maximum reusability. * * @author Aaron M. Renn (arenn@urbanophile.com) */public interface PreparedStatement extends Statement{/** * This method populates the specified parameter with a SQL NULL value * for the specified type. * * @param index The index of the parameter to set. * @param type The SQL type identifier of the parameter from <code>Types</code> * * @exception SQLException If an error occurs. */public abstract voidsetNull(int index, int type) throws SQLException; /*************************************************************************//** * This method populates the specified parameter with a SQL NULL value * for the specified type. * * @param index The index of the parameter to set. * @param type The SQL type identifier of the parameter from <code>Types</code> * @param name The name of the data type, for user defined types. * * @exception SQLException If an error occurs. */public abstract voidsetNull(int index, int type, String name) throws SQLException; /*************************************************************************//** * This method sets the specified parameter from the given Java * <code>boolean</code> value. * * @param index The index of the parameter value to set. * @param value The value of the parameter. * * @exception SQLException If an error occurs. */public abstract voidsetBoolean(int index, boolean value) throws SQLException;/*************************************************************************//** * This method sets the specified parameter from the given Java * <code>byte</code> value. * * @param index The index of the parameter value to set. * @param value The value of the parameter. * * @exception SQLException If an error occurs. */public abstract voidsetByte(int index, byte value) throws SQLException;/*************************************************************************//** * This method sets the specified parameter from the given Java * <code>short</code> value. * * @param index The index of the parameter value to set. * @param value The value of the parameter. * * @exception SQLException If an error occurs. */public abstract voidsetShort(int index, short value) throws SQLException;/*************************************************************************//** * This method sets the specified parameter from the given Java * <code>int</code> value. * * @param index The index of the parameter value to set. * @param value The value of the parameter. * * @exception SQLException If an error occurs. */public abstract voidsetInt(int index, int value) throws SQLException;/*************************************************************************//** * This method sets the specified parameter from the given Java * <code>long</code> value. * * @param index The index of the parameter value to set. * @param value The value of the parameter. * * @exception SQLException If an error occurs. */public abstract voidsetLong(int index, long value) throws SQLException;/*************************************************************************//** * This method sets the specified parameter from the given Java * <code>float</code> value. * * @param index The index of the parameter value to set. * @param value The value of the parameter. * * @exception SQLException If an error occurs. */public abstract voidsetFloat(int index, float value) throws SQLException;/*************************************************************************//** * This method sets the specified parameter from the given Java * <code>double</code> value. * * @param index The index of the parameter value to set. * @param value The value of the parameter. * * @exception SQLException If an error occurs. */public abstract voidsetDouble(int index, double value) throws SQLException;/*************************************************************************//** * This method sets the specified parameter from the given Java * <code>String</code> value. * * @param index The index of the parameter value to set. * @param value The value of the parameter. * * @exception SQLException If an error occurs. */public abstract voidsetString(int index, String value) throws SQLException;/*************************************************************************//** * This method sets the specified parameter from the given Java * <code>byte</code> array value. * * @param index The index of the parameter value to set. * @param value The value of the parameter. * * @exception SQLException If an error occurs. */public abstract voidsetBytes(int index, byte[] value) throws SQLException;/*************************************************************************//** * This method sets the specified parameter from the given Java * <code>java.math.BigDecimal</code> value. * * @param index The index of the parameter value to set. * @param value The value of the parameter. * * @exception SQLException If an error occurs. */public abstract voidsetBigDecimal(int index, java.math.BigDecimal value) throws SQLException;/*************************************************************************//** * This method sets the specified parameter from the given Java * <code>java.sql.Date</code> value. * * @param index The index of the parameter value to set. * @param value The value of the parameter. * * @exception SQLException If an error occurs. */public abstract voidsetDate(int index, java.sql.Date value) throws SQLException;/*************************************************************************//** * This method sets the specified parameter from the given Java * <code>java.sql.Date</code> value. * * @param index The index of the parameter value to set. * @param value The value of the parameter. * @param calendar The <code>Calendar</code> to use for timezone and locale. * * @exception SQLException If an error occurs. */public abstract voidsetDate(int index, java.sql.Date value, Calendar calendar) throws SQLException;/*************************************************************************//** * This method sets the specified parameter from the given Java * <code>java.sql.Time</code> value. * * @param index The index of the parameter value to set. * @param value The value of the parameter. * * @exception SQLException If an error occurs. */public abstract voidsetTime(int index, java.sql.Time value) throws SQLException;/*************************************************************************//** * This method sets the specified parameter from the given Java * <code>java.sql.Time</code> value. * * @param index The index of the parameter value to set. * @param value The value of the parameter. * @param calendar The <code>Calendar</code> to use for timezone and locale. * * @exception SQLException If an error occurs. */public abstract void
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?