/* * Copyright 2007-2010 Brian S O'Neill * * 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.cojen.dirmi.jdbc; import java.rmi.Remote; import java.sql.SQLException; import java.sql.SQLWarning; import org.cojen.dirmi.Batched; import org.cojen.dirmi.RemoteFailure; /** * * * @author Brian S O'Neill */ @RemoteFailure(exception=SQLException.class) public interface RemoteStatement extends Remote { ResultSetTransport executeQuery(String sql) throws SQLException; int executeUpdate(String sql) throws SQLException; void close() throws SQLException; int getMaxFieldSize() throws SQLException; @Batched void setMaxFieldSize(int max) throws SQLException; int getMaxRows() throws SQLException; @Batched void setMaxRows(int max) throws SQLException; @Batched void setEscapeProcessing(boolean enable) throws SQLException; int getQueryTimeout() throws SQLException; @Batched void setQueryTimeout(int seconds) throws SQLException; void cancel() throws SQLException; SQLWarning getWarnings() throws SQLException; @Batched void clearWarnings() throws SQLException; @Batched void setCursorName(String name) throws SQLException; boolean execute(String sql) throws SQLException; ResultSetTransport getResultSet() throws SQLException; int getUpdateCount() throws SQLException; boolean getMoreResults() throws SQLException; @Batched void setFetchDirection(int direction) throws SQLException; int getFetchDirection() throws SQLException; @Batched void setFetchSize(int rows) throws SQLException; int getFetchSize() throws SQLException; int getResultSetConcurrency() throws SQLException; int getResultSetType() throws SQLException; @Batched void addBatch(String sql) throws SQLException; @Batched void clearBatch() throws SQLException; int[] executeBatch() throws SQLException; boolean getMoreResults(int current) throws SQLException; ResultSetTransport getGeneratedKeys() throws SQLException; int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException; int executeUpdate(String sql, int[] columnIndexes) throws SQLException; int executeUpdate(String sql, String[] columnNames) throws SQLException; boolean execute(String sql, int autoGeneratedKeys) throws SQLException; boolean execute(String sql, int[] columnIndexes) throws SQLException; boolean execute(String sql, String[] columnNames) throws SQLException; int getResultSetHoldability() throws SQLException; boolean isClosed() throws SQLException; }