improve java.sql.Wrapper support

This commit is contained in:
wenshao
2012-12-19 14:58:23 +08:00
parent ce9c120dbe
commit 2a028bdc05
28 changed files with 1203 additions and 125 deletions
@@ -67,6 +67,7 @@ public class TestOraclePrefetch extends TestCase {
oracleStmt = stmt.unwrap(OraclePreparedStatement.class);
Assert.assertEquals(50, oracleStmt.getRowPrefetch());
Assert.assertTrue(stmt.isWrapperFor(PreparedStatementHolder.class));
stmtHolder = stmt.unwrap(PreparedStatementHolder.class);
Assert.assertNotNull(stmtHolder);
Assert.assertEquals(0, stmtHolder.getHitCount());
@@ -23,6 +23,9 @@ import junit.framework.Assert;
import junit.framework.TestCase;
import com.alibaba.druid.pool.DruidDataSource;
import com.alibaba.druid.pool.DruidPooledConnection;
import com.alibaba.druid.pool.DruidPooledPreparedStatement;
import com.alibaba.druid.pool.DruidPooledResultSet;
import com.alibaba.druid.test.util.OracleMockDriver;
import com.alibaba.druid.util.JdbcUtils;
import com.alibaba.druid.wall.WallConfig;
@@ -61,9 +64,39 @@ public class TestOracleWall2 extends TestCase {
{
Connection conn = dataSource.getConnection();
Assert.assertTrue(conn.isWrapperFor(DruidPooledConnection.class));
Assert.assertNotNull(conn.unwrap(DruidPooledConnection.class));
Assert.assertFalse(conn.isWrapperFor(oracle.jdbc.OracleConnection.class));
Assert.assertNull(conn.unwrap(oracle.jdbc.OracleConnection.class));
Assert.assertFalse(conn.isWrapperFor(java.sql.Connection.class));
Assert.assertNull(conn.unwrap(java.sql.Connection.class));
// /////////////
PreparedStatement stmt = conn.prepareStatement(sql);
Assert.assertNull(stmt.unwrap(oracle.jdbc.OraclePreparedStatement.class));
Assert.assertFalse(stmt.isWrapperFor(oracle.jdbc.OraclePreparedStatement.class));
Assert.assertTrue(stmt.isWrapperFor(DruidPooledPreparedStatement.class));
Assert.assertNotNull(stmt.unwrap(DruidPooledPreparedStatement.class));
Assert.assertFalse(stmt.isWrapperFor(java.sql.PreparedStatement.class));
Assert.assertNull(stmt.unwrap(java.sql.PreparedStatement.class));
ResultSet rs = stmt.executeQuery();
Assert.assertNull(rs.unwrap(oracle.jdbc.OracleResultSet.class));
Assert.assertFalse(rs.isWrapperFor(oracle.jdbc.OracleResultSet.class));
Assert.assertTrue(rs.isWrapperFor(DruidPooledResultSet.class));
Assert.assertNotNull(rs.unwrap(DruidPooledResultSet.class));
Assert.assertFalse(rs.isWrapperFor(java.sql.ResultSet.class));
Assert.assertNull(rs.unwrap(java.sql.ResultSet.class));
rs.next();
rs.close();
@@ -0,0 +1,123 @@
/*
* Copyright 1999-2011 Alibaba Group Holding Ltd.
*
* 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 com.alibaba.druid.bvt.pool;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import junit.framework.Assert;
import junit.framework.TestCase;
import com.alibaba.druid.pool.DruidDataSource;
import com.alibaba.druid.pool.DruidPooledConnection;
import com.alibaba.druid.pool.DruidPooledPreparedStatement;
import com.alibaba.druid.pool.DruidPooledResultSet;
import com.alibaba.druid.test.util.OracleMockDriver;
import com.alibaba.druid.util.JdbcUtils;
import com.alibaba.druid.wall.WallConfig;
import com.alibaba.druid.wall.WallFilter;
public class TestOracleWall3 extends TestCase {
private DruidDataSource dataSource;
protected void setUp() throws Exception {
dataSource = new DruidDataSource();
WallFilter wall = new WallFilter();
wall.setConfig(new WallConfig());
wall.getConfig().setWrapAllow(true);
dataSource.setOracle(true);
dataSource.setUrl("jdbc:mock:xxx");
dataSource.setDriver(new OracleMockDriver());
dataSource.setPoolPreparedStatements(true);
dataSource.setConnectionProperties("defaultRowPrefetch=50");
dataSource.setFilters("stat");
dataSource.getProxyFilters().add(wall);
dataSource.setDbType("oracle");
// dataSource.setFilters("log4j");
}
protected void tearDown() throws Exception {
JdbcUtils.close(dataSource);
}
public void test_oracle() throws Exception {
String sql = "SELECT 1";
{
Connection conn = dataSource.getConnection();
Assert.assertTrue(conn.isWrapperFor(DruidPooledConnection.class));
Assert.assertNotNull(conn.unwrap(DruidPooledConnection.class));
Assert.assertTrue(conn.isWrapperFor(oracle.jdbc.OracleConnection.class));
Assert.assertNotNull(conn.unwrap(oracle.jdbc.OracleConnection.class));
Assert.assertTrue(conn.isWrapperFor(java.sql.Connection.class));
Assert.assertNotNull(conn.unwrap(java.sql.Connection.class));
// /////////////
PreparedStatement stmt = conn.prepareStatement(sql);
Assert.assertNotNull(stmt.unwrap(oracle.jdbc.OraclePreparedStatement.class));
Assert.assertTrue(stmt.isWrapperFor(oracle.jdbc.OraclePreparedStatement.class));
Assert.assertTrue(stmt.isWrapperFor(DruidPooledPreparedStatement.class));
Assert.assertNotNull(stmt.unwrap(DruidPooledPreparedStatement.class));
Assert.assertTrue(stmt.isWrapperFor(java.sql.PreparedStatement.class));
Assert.assertNotNull(stmt.unwrap(java.sql.PreparedStatement.class));
ResultSet rs = stmt.executeQuery();
Assert.assertNotNull(rs.unwrap(oracle.jdbc.OracleResultSet.class));
Assert.assertTrue(rs.isWrapperFor(oracle.jdbc.OracleResultSet.class));
Assert.assertTrue(rs.isWrapperFor(DruidPooledResultSet.class));
Assert.assertNotNull(rs.unwrap(DruidPooledResultSet.class));
Assert.assertTrue(rs.isWrapperFor(java.sql.ResultSet.class));
Assert.assertNotNull(rs.unwrap(java.sql.ResultSet.class));
rs.next();
rs.close();
stmt.close();
conn.close();
}
for (int i = 0; i < 10; ++i) {
Connection conn = dataSource.getConnection();
PreparedStatement stmt = conn.prepareStatement(sql);
ResultSet rs = stmt.executeQuery();
rs.next();
rs.close();
stmt.close();
conn.close();
}
Assert.assertEquals(1, dataSource.getCachedPreparedStatementCount());
}
}
@@ -0,0 +1,123 @@
/*
* Copyright 1999-2011 Alibaba Group Holding Ltd.
*
* 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 com.alibaba.druid.bvt.pool;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import junit.framework.Assert;
import junit.framework.TestCase;
import com.alibaba.druid.pool.DruidDataSource;
import com.alibaba.druid.pool.DruidPooledConnection;
import com.alibaba.druid.pool.DruidPooledPreparedStatement;
import com.alibaba.druid.pool.DruidPooledResultSet;
import com.alibaba.druid.test.util.OracleMockDriverJdbc3;
import com.alibaba.druid.util.JdbcUtils;
import com.alibaba.druid.wall.WallConfig;
import com.alibaba.druid.wall.WallFilter;
public class TestOracleWallJdbc3 extends TestCase {
private DruidDataSource dataSource;
protected void setUp() throws Exception {
dataSource = new DruidDataSource();
WallFilter wall = new WallFilter();
wall.setConfig(new WallConfig());
wall.getConfig().setWrapAllow(true);
dataSource.setOracle(true);
dataSource.setUrl("jdbc:mock:xxx");
dataSource.setDriver(new OracleMockDriverJdbc3());
dataSource.setPoolPreparedStatements(true);
dataSource.setConnectionProperties("defaultRowPrefetch=50");
dataSource.setFilters("stat");
dataSource.getProxyFilters().add(wall);
dataSource.setDbType("oracle");
// dataSource.setFilters("log4j");
}
protected void tearDown() throws Exception {
JdbcUtils.close(dataSource);
}
public void test_oracle() throws Exception {
String sql = "SELECT 1";
{
Connection conn = dataSource.getConnection();
Assert.assertTrue(conn.isWrapperFor(DruidPooledConnection.class));
Assert.assertNotNull(conn.unwrap(DruidPooledConnection.class));
Assert.assertTrue(conn.isWrapperFor(oracle.jdbc.OracleConnection.class));
Assert.assertNotNull(conn.unwrap(oracle.jdbc.OracleConnection.class));
Assert.assertTrue(conn.isWrapperFor(java.sql.Connection.class));
Assert.assertNotNull(conn.unwrap(java.sql.Connection.class));
// /////////////
PreparedStatement stmt = conn.prepareStatement(sql);
Assert.assertNotNull(stmt.unwrap(oracle.jdbc.OraclePreparedStatement.class));
Assert.assertTrue(stmt.isWrapperFor(oracle.jdbc.OraclePreparedStatement.class));
Assert.assertTrue(stmt.isWrapperFor(DruidPooledPreparedStatement.class));
Assert.assertNotNull(stmt.unwrap(DruidPooledPreparedStatement.class));
Assert.assertTrue(stmt.isWrapperFor(java.sql.PreparedStatement.class));
Assert.assertNotNull(stmt.unwrap(java.sql.PreparedStatement.class));
ResultSet rs = stmt.executeQuery();
Assert.assertNotNull(rs.unwrap(oracle.jdbc.OracleResultSet.class));
Assert.assertTrue(rs.isWrapperFor(oracle.jdbc.OracleResultSet.class));
Assert.assertTrue(rs.isWrapperFor(DruidPooledResultSet.class));
Assert.assertNotNull(rs.unwrap(DruidPooledResultSet.class));
Assert.assertTrue(rs.isWrapperFor(java.sql.ResultSet.class));
Assert.assertNotNull(rs.unwrap(java.sql.ResultSet.class));
rs.next();
rs.close();
stmt.close();
conn.close();
}
for (int i = 0; i < 10; ++i) {
Connection conn = dataSource.getConnection();
PreparedStatement stmt = conn.prepareStatement(sql);
ResultSet rs = stmt.executeQuery();
rs.next();
rs.close();
stmt.close();
conn.close();
}
Assert.assertEquals(1, dataSource.getCachedPreparedStatementCount());
}
}
@@ -0,0 +1,115 @@
/*
* Copyright 1999-2011 Alibaba Group Holding Ltd.
*
* 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 com.alibaba.druid.bvt.pool;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import junit.framework.Assert;
import junit.framework.TestCase;
import com.alibaba.druid.pool.DruidDataSource;
import com.alibaba.druid.pool.DruidPooledConnection;
import com.alibaba.druid.pool.DruidPooledPreparedStatement;
import com.alibaba.druid.pool.DruidPooledResultSet;
import com.alibaba.druid.test.util.OracleMockDriver;
import com.alibaba.druid.util.JdbcUtils;
public class TestOracleWrap extends TestCase {
private DruidDataSource dataSource;
protected void setUp() throws Exception {
dataSource = new DruidDataSource();
dataSource.setOracle(true);
dataSource.setUrl("jdbc:mock:xxx");
dataSource.setDriver(new OracleMockDriver());
dataSource.setPoolPreparedStatements(true);
dataSource.setConnectionProperties("defaultRowPrefetch=50");
dataSource.setDbType("oracle");
// dataSource.setFilters("log4j");
}
protected void tearDown() throws Exception {
JdbcUtils.close(dataSource);
}
public void test_oracle() throws Exception {
String sql = "SELECT 1";
{
Connection conn = dataSource.getConnection();
Assert.assertTrue(conn.isWrapperFor(DruidPooledConnection.class));
Assert.assertNotNull(conn.unwrap(DruidPooledConnection.class));
Assert.assertTrue(conn.isWrapperFor(oracle.jdbc.OracleConnection.class));
Assert.assertNotNull(conn.unwrap(oracle.jdbc.OracleConnection.class));
Assert.assertTrue(conn.isWrapperFor(java.sql.Connection.class));
Assert.assertNotNull(conn.unwrap(java.sql.Connection.class));
// /////////////
PreparedStatement stmt = conn.prepareStatement(sql);
Assert.assertNotNull(stmt.unwrap(oracle.jdbc.OraclePreparedStatement.class));
Assert.assertTrue(stmt.isWrapperFor(oracle.jdbc.OraclePreparedStatement.class));
Assert.assertTrue(stmt.isWrapperFor(DruidPooledPreparedStatement.class));
Assert.assertNotNull(stmt.unwrap(DruidPooledPreparedStatement.class));
Assert.assertTrue(stmt.isWrapperFor(java.sql.PreparedStatement.class));
Assert.assertNotNull(stmt.unwrap(java.sql.PreparedStatement.class));
ResultSet rs = stmt.executeQuery();
Assert.assertNotNull(rs.unwrap(oracle.jdbc.OracleResultSet.class));
Assert.assertTrue(rs.isWrapperFor(oracle.jdbc.OracleResultSet.class));
Assert.assertTrue(rs.isWrapperFor(DruidPooledResultSet.class));
Assert.assertNotNull(rs.unwrap(DruidPooledResultSet.class));
Assert.assertTrue(rs.isWrapperFor(java.sql.ResultSet.class));
Assert.assertNotNull(rs.unwrap(java.sql.ResultSet.class));
rs.next();
rs.close();
stmt.close();
conn.close();
}
for (int i = 0; i < 10; ++i) {
Connection conn = dataSource.getConnection();
PreparedStatement stmt = conn.prepareStatement(sql);
ResultSet rs = stmt.executeQuery();
rs.next();
rs.close();
stmt.close();
conn.close();
}
Assert.assertEquals(1, dataSource.getCachedPreparedStatementCount());
}
}
@@ -0,0 +1,115 @@
/*
* Copyright 1999-2011 Alibaba Group Holding Ltd.
*
* 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 com.alibaba.druid.bvt.pool;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import junit.framework.Assert;
import junit.framework.TestCase;
import com.alibaba.druid.pool.DruidDataSource;
import com.alibaba.druid.pool.DruidPooledConnection;
import com.alibaba.druid.pool.DruidPooledPreparedStatement;
import com.alibaba.druid.pool.DruidPooledResultSet;
import com.alibaba.druid.test.util.OracleMockDriverJdbc3;
import com.alibaba.druid.util.JdbcUtils;
public class TestOracleWrap2 extends TestCase {
private DruidDataSource dataSource;
protected void setUp() throws Exception {
dataSource = new DruidDataSource();
dataSource.setOracle(true);
dataSource.setUrl("jdbc:mock:xxx");
dataSource.setDriver(new OracleMockDriverJdbc3());
dataSource.setPoolPreparedStatements(true);
dataSource.setConnectionProperties("defaultRowPrefetch=50");
dataSource.setDbType("oracle");
// dataSource.setFilters("log4j");
}
protected void tearDown() throws Exception {
JdbcUtils.close(dataSource);
}
public void test_oracle() throws Exception {
String sql = "SELECT 1";
{
Connection conn = dataSource.getConnection();
Assert.assertTrue(conn.isWrapperFor(DruidPooledConnection.class));
Assert.assertNotNull(conn.unwrap(DruidPooledConnection.class));
Assert.assertTrue(conn.isWrapperFor(oracle.jdbc.OracleConnection.class));
Assert.assertNotNull(conn.unwrap(oracle.jdbc.OracleConnection.class));
Assert.assertTrue(conn.isWrapperFor(java.sql.Connection.class));
Assert.assertNotNull(conn.unwrap(java.sql.Connection.class));
// /////////////
PreparedStatement stmt = conn.prepareStatement(sql);
Assert.assertNotNull(stmt.unwrap(oracle.jdbc.OraclePreparedStatement.class));
Assert.assertTrue(stmt.isWrapperFor(oracle.jdbc.OraclePreparedStatement.class));
Assert.assertTrue(stmt.isWrapperFor(DruidPooledPreparedStatement.class));
Assert.assertNotNull(stmt.unwrap(DruidPooledPreparedStatement.class));
Assert.assertTrue(stmt.isWrapperFor(java.sql.PreparedStatement.class));
Assert.assertNotNull(stmt.unwrap(java.sql.PreparedStatement.class));
ResultSet rs = stmt.executeQuery();
Assert.assertNotNull(rs.unwrap(oracle.jdbc.OracleResultSet.class));
Assert.assertTrue(rs.isWrapperFor(oracle.jdbc.OracleResultSet.class));
Assert.assertTrue(rs.isWrapperFor(DruidPooledResultSet.class));
Assert.assertNotNull(rs.unwrap(DruidPooledResultSet.class));
Assert.assertTrue(rs.isWrapperFor(java.sql.ResultSet.class));
Assert.assertNotNull(rs.unwrap(java.sql.ResultSet.class));
rs.next();
rs.close();
stmt.close();
conn.close();
}
for (int i = 0; i < 10; ++i) {
Connection conn = dataSource.getConnection();
PreparedStatement stmt = conn.prepareStatement(sql);
ResultSet rs = stmt.executeQuery();
rs.next();
rs.close();
stmt.close();
conn.close();
}
Assert.assertEquals(1, dataSource.getCachedPreparedStatementCount());
}
}
@@ -730,7 +730,7 @@ public class OracleMockConnection extends MockConnection implements oracle.jdbc.
throw new MockConnectionClosedException();
}
return new OracleMockPreparedStatement(this, sql);
return this.getDriver().createMockPreparedStatement(this, sql);
}
@Override
@@ -0,0 +1,24 @@
package com.alibaba.druid.test.util;
import java.sql.SQLException;
import java.util.Properties;
import com.alibaba.druid.mock.MockDriver;
public class OracleMockConnectionJdbc3 extends OracleMockConnection {
public OracleMockConnectionJdbc3(MockDriver driver, String url, Properties connectProperties){
super(driver, url, connectProperties);
}
@Override
public <T> T unwrap(Class<T> iface) throws SQLException {
throw new UnsupportedOperationException();
}
@Override
public boolean isWrapperFor(Class<?> iface) throws SQLException {
throw new UnsupportedOperationException();
}
}
@@ -19,7 +19,10 @@ import java.sql.Connection;
import java.sql.SQLException;
import java.util.Properties;
import com.alibaba.druid.mock.MockConnection;
import com.alibaba.druid.mock.MockDriver;
import com.alibaba.druid.mock.MockResultSet;
import com.alibaba.druid.mock.MockStatementBase;
public class OracleMockDriver extends MockDriver {
@@ -36,4 +39,12 @@ public class OracleMockDriver extends MockDriver {
public int getMinorVersion() {
return 0;
}
public MockResultSet createMockResultSet(MockStatementBase stmt) {
return new OracleMockResultSet(stmt);
}
public OracleMockPreparedStatement createMockPreparedStatement(MockConnection conn, String sql) {
return new OracleMockPreparedStatement((OracleMockConnection) conn, sql);
}
}
@@ -0,0 +1,50 @@
/*
* Copyright 1999-2011 Alibaba Group Holding Ltd.
*
* 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 com.alibaba.druid.test.util;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.Properties;
import com.alibaba.druid.mock.MockConnection;
import com.alibaba.druid.mock.MockDriver;
import com.alibaba.druid.mock.MockResultSet;
import com.alibaba.druid.mock.MockStatementBase;
public class OracleMockDriverJdbc3 extends MockDriver {
public Connection connect(String url, Properties info) throws SQLException {
return new OracleMockConnectionJdbc3(this, url, info);
}
@Override
public int getMajorVersion() {
return 10;
}
@Override
public int getMinorVersion() {
return 0;
}
public MockResultSet createMockResultSet(MockStatementBase stmt) {
return new OracleMockResultSetJdbc3(stmt);
}
public OracleMockPreparedStatement createMockPreparedStatement(MockConnection conn, String sql) {
return new OracleMockPreparedStatementJdbc3((OracleMockConnection) conn, sql);
}
}
@@ -0,0 +1,21 @@
package com.alibaba.druid.test.util;
import java.sql.SQLException;
public class OracleMockPreparedStatementJdbc3 extends OracleMockPreparedStatement {
public OracleMockPreparedStatementJdbc3(OracleMockConnection conn, String sql){
super(conn, sql);
}
@Override
public <T> T unwrap(Class<T> iface) throws SQLException {
throw new UnsupportedOperationException();
}
@Override
public boolean isWrapperFor(Class<?> iface) throws SQLException {
throw new UnsupportedOperationException();
}
}
@@ -0,0 +1,514 @@
package com.alibaba.druid.test.util;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import oracle.jdbc.OracleResultSet;
import oracle.sql.ARRAY;
import oracle.sql.BFILE;
import oracle.sql.BLOB;
import oracle.sql.CHAR;
import oracle.sql.CLOB;
import oracle.sql.CustomDatum;
import oracle.sql.CustomDatumFactory;
import oracle.sql.DATE;
import oracle.sql.Datum;
import oracle.sql.INTERVALDS;
import oracle.sql.INTERVALYM;
import oracle.sql.NUMBER;
import oracle.sql.OPAQUE;
import oracle.sql.ORAData;
import oracle.sql.ORADataFactory;
import oracle.sql.RAW;
import oracle.sql.REF;
import oracle.sql.ROWID;
import oracle.sql.STRUCT;
import oracle.sql.TIMESTAMP;
import oracle.sql.TIMESTAMPLTZ;
import oracle.sql.TIMESTAMPTZ;
import com.alibaba.druid.mock.MockResultSet;
public class OracleMockResultSet extends MockResultSet implements OracleResultSet {
public OracleMockResultSet(Statement statement){
super(statement);
}
@Override
public ARRAY getARRAY(int arg0) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public ARRAY getARRAY(String arg0) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public BFILE getBFILE(int arg0) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public BFILE getBFILE(String arg0) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public BLOB getBLOB(int arg0) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public BLOB getBLOB(String arg0) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public BFILE getBfile(int arg0) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public BFILE getBfile(String arg0) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public CHAR getCHAR(int arg0) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public CHAR getCHAR(String arg0) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public CLOB getCLOB(int arg0) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public CLOB getCLOB(String arg0) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public ResultSet getCursor(int arg0) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public ResultSet getCursor(String arg0) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public CustomDatum getCustomDatum(int arg0, CustomDatumFactory arg1) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public CustomDatum getCustomDatum(String arg0, CustomDatumFactory arg1) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public DATE getDATE(int arg0) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public DATE getDATE(String arg0) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public INTERVALDS getINTERVALDS(int arg0) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public INTERVALDS getINTERVALDS(String arg0) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public INTERVALYM getINTERVALYM(int arg0) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public INTERVALYM getINTERVALYM(String arg0) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public NUMBER getNUMBER(int arg0) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public NUMBER getNUMBER(String arg0) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public OPAQUE getOPAQUE(int arg0) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public OPAQUE getOPAQUE(String arg0) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public ORAData getORAData(int arg0, ORADataFactory arg1) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public ORAData getORAData(String arg0, ORADataFactory arg1) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public Datum getOracleObject(int arg0) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public Datum getOracleObject(String arg0) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public RAW getRAW(int arg0) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public RAW getRAW(String arg0) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public REF getREF(int arg0) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public REF getREF(String arg0) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public ROWID getROWID(int arg0) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public ROWID getROWID(String arg0) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public STRUCT getSTRUCT(int arg0) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public STRUCT getSTRUCT(String arg0) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public TIMESTAMP getTIMESTAMP(int arg0) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public TIMESTAMP getTIMESTAMP(String arg0) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public TIMESTAMPLTZ getTIMESTAMPLTZ(int arg0) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public TIMESTAMPLTZ getTIMESTAMPLTZ(String arg0) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public TIMESTAMPTZ getTIMESTAMPTZ(int arg0) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public TIMESTAMPTZ getTIMESTAMPTZ(String arg0) throws SQLException {
// TODO Auto-generated method stub
return null;
}
@Override
public void updateARRAY(int arg0, ARRAY arg1) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateARRAY(String arg0, ARRAY arg1) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateBFILE(int arg0, BFILE arg1) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateBFILE(String arg0, BFILE arg1) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateBLOB(int arg0, BLOB arg1) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateBLOB(String arg0, BLOB arg1) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateBfile(int arg0, BFILE arg1) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateBfile(String arg0, BFILE arg1) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateCHAR(int arg0, CHAR arg1) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateCHAR(String arg0, CHAR arg1) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateCLOB(int arg0, CLOB arg1) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateCLOB(String arg0, CLOB arg1) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateCustomDatum(int arg0, CustomDatum arg1) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateCustomDatum(String arg0, CustomDatum arg1) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateDATE(int arg0, DATE arg1) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateDATE(String arg0, DATE arg1) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateINTERVALDS(int arg0, INTERVALDS arg1) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateINTERVALYM(int arg0, INTERVALYM arg1) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateNUMBER(int arg0, NUMBER arg1) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateNUMBER(String arg0, NUMBER arg1) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateORAData(int arg0, ORAData arg1) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateORAData(String arg0, ORAData arg1) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateOracleObject(int arg0, Datum arg1) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateOracleObject(String arg0, Datum arg1) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateRAW(int arg0, RAW arg1) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateRAW(String arg0, RAW arg1) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateREF(int arg0, REF arg1) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateREF(String arg0, REF arg1) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateROWID(int arg0, ROWID arg1) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateROWID(String arg0, ROWID arg1) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateSTRUCT(int arg0, STRUCT arg1) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateSTRUCT(String arg0, STRUCT arg1) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateTIMESTAMP(int arg0, TIMESTAMP arg1) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateTIMESTAMPLTZ(int arg0, TIMESTAMPLTZ arg1) throws SQLException {
// TODO Auto-generated method stub
}
@Override
public void updateTIMESTAMPTZ(int arg0, TIMESTAMPTZ arg1) throws SQLException {
// TODO Auto-generated method stub
}
}
@@ -0,0 +1,22 @@
package com.alibaba.druid.test.util;
import java.sql.SQLException;
import java.sql.Statement;
public class OracleMockResultSetJdbc3 extends OracleMockResultSet {
public OracleMockResultSetJdbc3(Statement statement){
super(statement);
}
@Override
public <T> T unwrap(Class<T> iface) throws SQLException {
throw new UnsupportedOperationException();
}
@Override
public boolean isWrapperFor(Class<?> iface) throws SQLException {
throw new UnsupportedOperationException();
}
}