// @(#)$Id: PreparedStatement.jml,v 1.5 2007/12/19 02:03:46 chalin Exp $ // Copyright (C) 2005 Iowa State University // // This file is part of the runtime library of the Java Modeling Language. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public License // as published by the Free Software Foundation; either version 2.1, // of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with JML; see the file LesserGPL.txt. If not, write to the Free // Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA // 02110-1301 USA. package java.sql; import java.net.URL; import java.util.Calendar; import java.io.Reader; import java.io.InputStream; import java.math.BigDecimal; public interface PreparedStatement extends Statement { /* * NOTE: This file has only been partially specified. Feel free to complete. * (http://java.sun.com/j2se/1.4.2/docs/api/java/sql/PreparedStatement.html) */ public /*@non_null*/ ResultSet executeQuery() throws SQLException; public int executeUpdate() throws SQLException; public void setNull(int parameterIndex, int sqlType) throws SQLException; public void setBoolean(int parameterIndex, boolean x) throws SQLException; public void setByte(int parameterIndex, byte x) throws SQLException; public void setShort(int parameterIndex, short x) throws SQLException; public void setInt(int parameterIndex, int x) throws SQLException; public void setLong(int parameterIndex, long x) throws SQLException; public void setFloat(int parameterIndex, float x) throws SQLException; public void setDouble(int parameterIndex, double x) throws SQLException; public void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException; public void setString(int parameterIndex, String x) throws SQLException; public void setBytes(int parameterIndex, byte[] x) throws SQLException; public void setDate(int parameterIndex, Date x) throws SQLException; public void setTime(int parameterIndex, Time x) throws SQLException; public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException; public void setAsciiStream(int parameterIndex, InputStream x, int length) throws SQLException; public void setUnicodeStream(int parameterIndex, InputStream x, int length) throws SQLException; public void setBinaryStream(int parameterIndex, InputStream x, int length) throws SQLException; public void clearParameters() throws SQLException; public void setObject(int parameterIndex, Object x, int targetSqlType, int scale) throws SQLException; public void setObject(int parameterIndex, Object x, int targetSqlType) throws SQLException; public void setObject(int parameterIndex, Object x) throws SQLException; public boolean execute() throws SQLException; public void addBatch() throws SQLException; public void setCharacterStream(int parameterIndex, Reader reader, int length) throws SQLException; public void setRef(int i, Ref x) throws SQLException; public void setBlob(int i, Blob x) throws SQLException; public void setClob(int i, Clob x) throws SQLException; public void setArray(int i, Array x) throws SQLException; public /*@nullable*/ ResultSetMetaData getMetaData() throws SQLException; public void setDate(int parameterIndex, Date x, Calendar cal) throws SQLException; public void setTime(int parameterIndex, Time x, Calendar cal) throws SQLException; public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) throws SQLException; public void setNull(int paramIndex, int sqlType, String typeName) throws SQLException; public void setURL(int parameterIndex, URL x) throws SQLException; public ParameterMetaData getParameterMetaData() throws SQLException; }