/*
XBN Java: Generically useful, non-GUI Java code.
http://sourceforge.net/projects/xbnjava
Copyright (C) 1997-2003, Jeff Epstein
All rights reserved.
Modifications: No
Redistribution in binary form, with or without modifications, are permitted provided that the following conditions are met:
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* If modifications are made to source code then this license should indicate that fact in the "Modifications" section above.
* Neither the author, nor the contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
[NOTE: This license contains NO advertising clause.]
*/
package xbn.db;
import java.sql.SQLException;
import java.sql.ResultSet;
/**
A QueryBase object that executes the Statement contained in a DBCSPrepared.
Source code: QueryPrepared.java.
@version 0.9b
@author Jeff Epstein, http://sourceforge.net/projects/xbnjava.
**/
public class QueryPrepared extends QueryBase {
public QueryPrepared(boolean b_throwOnNoRowUpdate) {
super(b_throwOnNoRowUpdate);
}
public QueryPrepared() {
super();
}
public ResultSet getResultSet(DBConnDirect db_connDirect, String s_sql, int i_resultSetType, int i_resultSetConcurrency) throws SQLException {
return getResultSet(new DBCSPrepared(db_connDirect, s_sql, i_resultSetType, i_resultSetConcurrency));
}
public ResultSet getResultSet(DBConnDirect db_connDirect, String s_sql) throws SQLException {
return getResultSet(new DBCSPrepared(db_connDirect, s_sql));
}
public ResultSet getResultSet(DBCSPrepared dbcs_prepared) throws SQLException {
return getResultSet(null, dbcs_prepared);
}
public String getString(DBConnDirect db_connDirect, String s_sql, int i_resultSetType, int i_resultSetConcurrency) throws SQLException {
return getString(new DBCSPrepared(db_connDirect, s_sql, i_resultSetType, i_resultSetConcurrency));
}
public String getString(DBConnDirect db_connDirect, String s_sql) throws SQLException {
return getString(new DBCSPrepared(db_connDirect, s_sql));
}
public String getString(DBCSPrepared dbcs_prepared) throws SQLException {
return getString(null, dbcs_prepared);
}
public int getInt(DBConnDirect db_connDirect, String s_sql, int i_resultSetType, int i_resultSetConcurrency) throws SQLException {
return getInt(new DBCSPrepared(db_connDirect, s_sql, i_resultSetType, i_resultSetConcurrency));
}
public int getInt(DBConnDirect db_connDirect, String s_sql) throws SQLException {
return getInt((new DBCSPrepared(db_connDirect, s_sql)));
}
public int getInt(DBCSPrepared dbcs_prepared) throws SQLException {
return getInt(null, dbcs_prepared);
}
public long getLong(DBConnDirect db_connDirect, String s_sql, int i_resultSetType, int i_resultSetConcurrency) throws SQLException {
return getLong(new DBCSPrepared(db_connDirect, s_sql, i_resultSetType, i_resultSetConcurrency));
}
public long getLong(DBConnDirect db_connDirect, String s_sql) throws SQLException {
return getLong((new DBCSPrepared(db_connDirect, s_sql)));
}
public long getLong(DBCSPrepared dbcs_prepared) throws SQLException {
return getLong(null, dbcs_prepared);
}
public int update(DBConnDirect db_connDirect, String s_sql, int i_resultSetType, int i_resultSetConcurrency) throws SQLException {
return update(new DBCSPrepared(db_connDirect, s_sql, i_resultSetType, i_resultSetConcurrency));
}
public int update(DBConnDirect db_connDirect, String s_sql) throws SQLException {
return update(new DBCSPrepared(db_connDirect, s_sql));
}
public int update(DBCSPrepared dbcs_prepared) throws SQLException {
return update(null, dbcs_prepared);
}
public boolean execute(DBConnDirect db_connDirect, String s_sql, int i_resultSetType, int i_resultSetConcurrency) throws SQLException {
return execute(new DBCSPrepared(db_connDirect, s_sql, i_resultSetType, i_resultSetConcurrency));
}
public boolean execute(DBConnDirect db_connDirect, String s_sql) throws SQLException {
return execute(new DBCSPrepared(db_connDirect, s_sql));
}
public boolean execute(DBCSPrepared dbcs_prepared) throws SQLException {
return execute(null, dbcs_prepared);
}
}