Commit 33cee6b9 authored by guus's avatar guus

Updating dbutil to match java 6 interface of java.sql. Updating build dependency to JDK 7.

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/branches/maven-externalsbased@13949 b35dd754-fafc-0310-a699-88a17e54d16e
parent 2f4e31cb
...@@ -14,6 +14,7 @@ package org.jivesoftware.database; ...@@ -14,6 +14,7 @@ package org.jivesoftware.database;
import java.sql.*; import java.sql.*;
import java.util.Map; import java.util.Map;
import java.util.Properties; import java.util.Properties;
import java.util.concurrent.Executor;
/** /**
* An implementation of the Connection interface that wraps an underlying * An implementation of the Connection interface that wraps an underlying
...@@ -228,4 +229,24 @@ public abstract class AbstractConnection implements Connection { ...@@ -228,4 +229,24 @@ public abstract class AbstractConnection implements Connection {
public Struct createStruct(String typeName, Object[] attributes) throws SQLException { public Struct createStruct(String typeName, Object[] attributes) throws SQLException {
return connection.createStruct(typeName, attributes); return connection.createStruct(typeName, attributes);
} }
public void setSchema(String schema) throws SQLException {
connection.setSchema(schema);
}
public String getSchema() throws SQLException {
return connection.getSchema();
}
public void abort(Executor executor) throws SQLException {
connection.abort(executor);
}
public void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException {
connection.setNetworkTimeout(executor, milliseconds);
}
public int getNetworkTimeout() throws SQLException {
return connection.getNetworkTimeout();
}
} }
...@@ -864,6 +864,14 @@ public abstract class CallableStatementWrapper extends StatementWrapper ...@@ -864,6 +864,14 @@ public abstract class CallableStatementWrapper extends StatementWrapper
cstmt.setNClob(parameterName, reader); cstmt.setNClob(parameterName, reader);
} }
public <T> T getObject(int parameterIndex, Class<T> type) throws SQLException {
return cstmt.getObject(parameterIndex, type);
}
public <T> T getObject(String parameterName, Class<T> type) throws SQLException {
return cstmt.getObject(parameterName, type);
}
public CallableStatementWrapper(CallableStatement cstmt) { public CallableStatementWrapper(CallableStatement cstmt) {
super(cstmt); super(cstmt);
this.cstmt = cstmt; this.cstmt = cstmt;
......
...@@ -26,7 +26,7 @@ public abstract class StatementWrapper implements Statement { ...@@ -26,7 +26,7 @@ public abstract class StatementWrapper implements Statement {
/** /**
* Creates a new StatementWrapper that wraps <tt>stmt</tt>. * Creates a new StatementWrapper that wraps <tt>stmt</tt>.
* *
* @param stmt * @param stmt The to-be-wrapped statement.
*/ */
public StatementWrapper(Statement stmt) { public StatementWrapper(Statement stmt) {
this.stmt = stmt; this.stmt = stmt;
...@@ -199,4 +199,13 @@ public abstract class StatementWrapper implements Statement { ...@@ -199,4 +199,13 @@ public abstract class StatementWrapper implements Statement {
public boolean isPoolable() throws SQLException { public boolean isPoolable() throws SQLException {
return stmt.isPoolable(); return stmt.isPoolable();
} }
public void closeOnCompletion() throws SQLException {
stmt.closeOnCompletion();
}
@Override
public boolean isCloseOnCompletion() throws SQLException {
return stmt.isCloseOnCompletion();
}
} }
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
</parent> </parent>
<groupId>org.igniterealtime.openfire.plugins</groupId> <groupId>org.igniterealtime.openfire.plugins</groupId>
<artifactId>stunserver</artifactId> <artifactId>stunserver</artifactId>
<name>Broadcast plugin</name> <name>STUN server plugin</name>
<build> <build>
<plugins> <plugins>
......
...@@ -180,8 +180,8 @@ ...@@ -180,8 +180,8 @@
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version> <version>2.3.2</version>
<configuration> <configuration>
<source>1.6</source> <source>1.7</source>
<target>1.6</target> <target>1.7</target>
</configuration> </configuration>
</plugin> </plugin>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment