bayard 2003/04/01 15:29:00
Modified: dbutils/src/java/org/apache/commons/dbutils/driver
StatementWrapper.java PreparedStatementWrapper.java
Log:
Updated so they compile on JDK 1.4 [just these classes. More to go] but don't work
with the extra. By JDK1.4 I'm really meaning JDBC 3.0.
CVS: ----------------------------------------------------------------------
CVS: PR:
CVS: If this change addresses a PR in the problem report tracking
CVS: database, then enter the PR number(s) here.
CVS: Obtained from:
CVS: If this change has been taken from another system, such as NCSA,
CVS: then name the system in this line, otherwise delete it.
CVS: Submitted by:
CVS: If this code has been contributed to Apache by someone else; i.e.,
CVS: they sent us a patch or a new module, then include their name/email
CVS: address here. If this is your work then delete this line.
CVS: Reviewed by:
CVS: If we are doing pre-commit code reviews and someone else has
CVS: reviewed your changes, include their name(s) here.
CVS: If you have not had it reviewed then delete this line.
Revision Changes Path
1.3 +30 -0
jakarta-commons-sandbox/dbutils/src/java/org/apache/commons/dbutils/driver/StatementWrapper.java
Index: StatementWrapper.java
===================================================================
RCS file:
/home/cvs/jakarta-commons-sandbox/dbutils/src/java/org/apache/commons/dbutils/driver/StatementWrapper.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- StatementWrapper.java 11 Nov 2002 03:15:02 -0000 1.2
+++ StatementWrapper.java 1 Apr 2003 23:29:00 -0000 1.3
@@ -131,5 +131,35 @@
protected ResultSet wrap(ResultSet rs) {
return new ResultSetWrapper(rs, this);
}
+
+ // new unimplemented methods that help for compilation on later versions of JDK
+ // might want to use some reflection here
+ public int executeUpdate(String unknown, int unknown2) {
+ throw new UnsupportedOperationException("Not JDBC 2.0");
+ }
+ public int executeUpdate(String unknown, int[] unknown2) {
+ throw new UnsupportedOperationException("Not JDBC 2.0");
+ }
+ public int executeUpdate(String unknown, String[] unknown2) {
+ throw new UnsupportedOperationException("Not JDBC 2.0");
+ }
+ public ResultSet getGeneratedKeys() {
+ throw new UnsupportedOperationException("Not JDBC 2.0");
+ }
+ public boolean getMoreResults(int unknown) {
+ throw new UnsupportedOperationException("Not JDBC 2.0");
+ }
+ public int getResultSetHoldability() {
+ throw new UnsupportedOperationException("Not JDBC 2.0");
+ }
+ public boolean execute(String unknown, int unknown2) {
+ throw new UnsupportedOperationException("Not JDBC 2.0");
+ }
+ public boolean execute(String unknown, String[] unknown2) {
+ throw new UnsupportedOperationException("Not JDBC 2.0");
+ }
+ public boolean execute(String unknown, int[] unknown2) {
+ throw new UnsupportedOperationException("Not JDBC 2.0");
+ }
}
1.2 +11 -0
jakarta-commons-sandbox/dbutils/src/java/org/apache/commons/dbutils/driver/PreparedStatementWrapper.java
Index: PreparedStatementWrapper.java
===================================================================
RCS file:
/home/cvs/jakarta-commons-sandbox/dbutils/src/java/org/apache/commons/dbutils/driver/PreparedStatementWrapper.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- PreparedStatementWrapper.java 10 Nov 2002 20:52:32 -0000 1.1
+++ PreparedStatementWrapper.java 1 Apr 2003 23:29:00 -0000 1.2
@@ -1,11 +1,13 @@
package org.apache.commons.dbutils.driver;
import java.sql.Connection;
+import java.sql.ParameterMetaData;
import java.sql.PreparedStatement;
import java.sql.Statement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.math.BigDecimal;
+import java.net.URL;
import java.sql.Date;
import java.sql.Time;
import java.sql.Timestamp;
@@ -167,5 +169,14 @@
public void setNull(int idx, int type, String string) throws SQLException {
this.prep.setNull(idx, type, string);
}
+
+ // new unimplemented methods that help for compilation on later versions of JDK
+ // might want to use some reflection here
+ public ParameterMetaData getParameterMetaData() {
+ throw new UnsupportedOperationException("Not JDBC 2.0");
+ }
+ public void setURL(int unknown, URL unknown2) {
+ throw new UnsupportedOperationException("Not JDBC 2.0");
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]