diff --git a/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java b/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java index 7f939b2fa5..237f1f3b09 100644 --- a/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java +++ b/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java @@ -66,20 +66,20 @@ import com.alibaba.druid.util.TransactionInfo; */ public abstract class DruidAbstractDataSource extends WrapperAdapter implements DruidAbstractDataSourceMBean, DataSource, DataSourceProxy, Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - public final static int DEFAULT_INITIAL_SIZE = 0; - public final static int DEFAULT_MAX_ACTIVE_SIZE = 8; - public final static int DEFAULT_MAX_IDLE = 8; - public final static int DEFAULT_MIN_IDLE = 0; - public final static int DEFAULT_MAX_WAIT = -1; - public final static String DEFAULT_VALIDATION_QUERY = null; // - public final static boolean DEFAULT_TEST_ON_BORROW = true; - public final static boolean DEFAULT_TEST_ON_RETURN = false; - public final static boolean DEFAULT_WHILE_IDLE = false; - public static final long DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS = -1L; - public static final long DEFAULT_TIME_BETWEEN_CONNECT_ERROR_MILLIS = 30 * 1000; - public static final int DEFAULT_NUM_TESTS_PER_EVICTION_RUN = 3; + public final static int DEFAULT_INITIAL_SIZE = 0; + public final static int DEFAULT_MAX_ACTIVE_SIZE = 8; + public final static int DEFAULT_MAX_IDLE = 8; + public final static int DEFAULT_MIN_IDLE = 0; + public final static int DEFAULT_MAX_WAIT = -1; + public final static String DEFAULT_VALIDATION_QUERY = null; // + public final static boolean DEFAULT_TEST_ON_BORROW = true; + public final static boolean DEFAULT_TEST_ON_RETURN = false; + public final static boolean DEFAULT_WHILE_IDLE = false; + public static final long DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS = -1L; + public static final long DEFAULT_TIME_BETWEEN_CONNECT_ERROR_MILLIS = 30 * 1000; + public static final int DEFAULT_NUM_TESTS_PER_EVICTION_RUN = 3; /** * The default value for {@link #getMinEvictableIdleTimeMillis}. @@ -87,136 +87,140 @@ public abstract class DruidAbstractDataSource extends WrapperAdapter implements * @see #getMinEvictableIdleTimeMillis * @see #setMinEvictableIdleTimeMillis */ - public static final long DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS = 1000L * 60L * 30L; + public static final long DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS = 1000L * 60L * 30L; - protected boolean defaultAutoCommit = true; - protected Boolean defaultReadOnly; - protected Integer defaultTransactionIsolation; - protected String defaultCatalog = null; + protected boolean defaultAutoCommit = true; + protected Boolean defaultReadOnly; + protected Integer defaultTransactionIsolation; + protected String defaultCatalog = null; - protected String name; + protected String name; - protected String username; - protected String password; - protected String jdbcUrl; - protected String driverClass; - protected Properties connectionProperties = new Properties(); + protected String username; + protected String password; + protected String jdbcUrl; + protected String driverClass; + protected Properties connectionProperties = new Properties(); - protected PasswordCallback passwordCallback; - protected NameCallback userCallback; + protected PasswordCallback passwordCallback; + protected NameCallback userCallback; - protected ConnectionFactory connectionFactory; + protected ConnectionFactory connectionFactory; - protected int initialSize = DEFAULT_INITIAL_SIZE; - protected int maxActive = DEFAULT_MAX_ACTIVE_SIZE; - protected int minIdle = DEFAULT_MIN_IDLE; - protected int maxIdle = DEFAULT_MAX_IDLE; - protected long maxWait = DEFAULT_MAX_WAIT; + protected int initialSize = DEFAULT_INITIAL_SIZE; + protected int maxActive = DEFAULT_MAX_ACTIVE_SIZE; + protected int minIdle = DEFAULT_MIN_IDLE; + protected int maxIdle = DEFAULT_MAX_IDLE; + protected long maxWait = DEFAULT_MAX_WAIT; - protected String validationQuery = DEFAULT_VALIDATION_QUERY; - protected int validationQueryTimeout = -1; - private boolean testOnBorrow = DEFAULT_TEST_ON_BORROW; - private boolean testOnReturn = DEFAULT_TEST_ON_RETURN; - private boolean testWhileIdle = DEFAULT_WHILE_IDLE; - protected boolean poolPreparedStatements = false; - protected boolean sharePreparedStatements = false; - protected int maxPoolPreparedStatementPerConnectionSize = 10; + protected String validationQuery = DEFAULT_VALIDATION_QUERY; + protected int validationQueryTimeout = -1; + private boolean testOnBorrow = DEFAULT_TEST_ON_BORROW; + private boolean testOnReturn = DEFAULT_TEST_ON_RETURN; + private boolean testWhileIdle = DEFAULT_WHILE_IDLE; + protected boolean poolPreparedStatements = false; + protected boolean sharePreparedStatements = false; + protected int maxPoolPreparedStatementPerConnectionSize = 10; - protected boolean inited = false; + protected boolean inited = false; - protected PrintWriter logWriter = new PrintWriter( - System.out); + protected PrintWriter logWriter = new PrintWriter( + System.out); - protected List filters = new ArrayList(); - protected ExceptionSorter exceptionSorter = null; + protected List filters = new ArrayList(); + protected ExceptionSorter exceptionSorter = null; - protected Driver driver; + protected Driver driver; - protected int queryTimeout; - protected int transactionQueryTimeout; + protected int queryTimeout; + protected int transactionQueryTimeout; - protected long createErrorCount; + protected long createErrorCount; - protected long createTimespan; + protected long createTimespan; - protected int maxWaitThreadCount = -1; + protected int maxWaitThreadCount = -1; - protected boolean accessToUnderlyingConnectionAllowed = true; + protected boolean accessToUnderlyingConnectionAllowed = true; - protected long timeBetweenEvictionRunsMillis = DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS; + protected long timeBetweenEvictionRunsMillis = DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS; - protected int numTestsPerEvictionRun = DEFAULT_NUM_TESTS_PER_EVICTION_RUN; + protected int numTestsPerEvictionRun = DEFAULT_NUM_TESTS_PER_EVICTION_RUN; - protected long minEvictableIdleTimeMillis = DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS; + protected long minEvictableIdleTimeMillis = DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS; - protected boolean removeAbandoned; + protected boolean removeAbandoned; - protected long removeAbandonedTimeoutMillis = 300 * 1000; + protected long removeAbandonedTimeoutMillis = 300 * 1000; - protected boolean logAbandoned; + protected boolean logAbandoned; - protected int maxOpenPreparedStatements = -1; + protected int maxOpenPreparedStatements = -1; - protected List connectionInitSqls; + protected List connectionInitSqls; - protected String dbType; + protected String dbType; - protected long timeBetweenConnectErrorMillis = DEFAULT_TIME_BETWEEN_CONNECT_ERROR_MILLIS; + protected long timeBetweenConnectErrorMillis = DEFAULT_TIME_BETWEEN_CONNECT_ERROR_MILLIS; - protected ValidConnectionChecker validConnectionChecker = null; + protected ValidConnectionChecker validConnectionChecker = null; - protected final AtomicLong errorCount = new AtomicLong(); - protected final AtomicLong dupCloseCount = new AtomicLong(); + protected final AtomicLong errorCount = new AtomicLong(); + protected final AtomicLong dupCloseCount = new AtomicLong(); protected final ConcurrentIdentityHashMap activeConnections = new ConcurrentIdentityHashMap(); - protected long id; + protected long id; - protected Date createdTime; + protected Date createdTime; - protected int connectionErrorRetryAttempts = 30; + protected int connectionErrorRetryAttempts = 30; - protected boolean breakAfterAcquireFailure = false; + protected boolean breakAfterAcquireFailure = false; - protected long transactionThresholdMillis = 0L; + protected long transactionThresholdMillis = 0L; - protected final AtomicLong commitCount = new AtomicLong(); - protected final AtomicLong startTransactionCount = new AtomicLong(); - protected final AtomicLong rollbackCount = new AtomicLong(); - protected final AtomicLong cachedPreparedStatementHitCount = new AtomicLong(); - protected final AtomicLong preparedStatementCount = new AtomicLong(); - protected final AtomicLong closedPreparedStatementCount = new AtomicLong(); - protected final AtomicLong cachedPreparedStatementCount = new AtomicLong(); - protected final AtomicLong cachedPreparedStatementDeleteCount = new AtomicLong(); - protected final AtomicLong cachedPreparedStatementMissCount = new AtomicLong(); + protected final AtomicLong commitCount = new AtomicLong(); + protected final AtomicLong startTransactionCount = new AtomicLong(); + protected final AtomicLong rollbackCount = new AtomicLong(); + protected final AtomicLong cachedPreparedStatementHitCount = new AtomicLong(); + protected final AtomicLong preparedStatementCount = new AtomicLong(); + protected final AtomicLong closedPreparedStatementCount = new AtomicLong(); + protected final AtomicLong cachedPreparedStatementCount = new AtomicLong(); + protected final AtomicLong cachedPreparedStatementDeleteCount = new AtomicLong(); + protected final AtomicLong cachedPreparedStatementMissCount = new AtomicLong(); - protected final Histogram transactionHistogram = new Histogram( - 10, - 100, - 1000, - 10 * 1000, - 100 * 1000); + protected final Histogram transactionHistogram = new Histogram( + 10, + 100, + 1000, + 10 * 1000, + 100 * 1000); - private boolean dupCloseLogEnable = true; + private boolean dupCloseLogEnable = true; - private ObjectName objectName; + private ObjectName objectName; - private final AtomicLong executeCount = new AtomicLong(); + private final AtomicLong executeCount = new AtomicLong(); - protected Throwable createError; - protected Throwable lastError; - protected long lastErrorTimeMillis; - protected Throwable lastCreateError; - protected long lastCreateErrorTimeMillis; + protected Throwable createError; + protected Throwable lastError; + protected long lastErrorTimeMillis; + protected Throwable lastCreateError; + protected long lastCreateErrorTimeMillis; - protected boolean isOracle = false; + protected boolean isOracle = false; - protected boolean useOracleImplicitCache = false; + protected boolean useOracleImplicitCache = false; public boolean isOracle() { return isOracle; } + public void setOracle(boolean isOracle) { + this.isOracle = isOracle; + } + public boolean isUseOracleImplicitCache() { return useOracleImplicitCache; } @@ -1136,7 +1140,7 @@ public abstract class DruidAbstractDataSource extends WrapperAdapter implements } public abstract void handleConnectionException(DruidPooledConnection pooledConnection, Throwable t) - throws SQLException; + throws SQLException; protected abstract void recycle(DruidPooledConnection pooledConnection) throws SQLException; diff --git a/src/main/java/com/alibaba/druid/pool/DruidDataSource.java b/src/main/java/com/alibaba/druid/pool/DruidDataSource.java index 37ac05eece..126aefef6d 100644 --- a/src/main/java/com/alibaba/druid/pool/DruidDataSource.java +++ b/src/main/java/com/alibaba/druid/pool/DruidDataSource.java @@ -108,6 +108,8 @@ public class DruidDataSource extends DruidAbstractDataSource implements DruidDat private String initStackTrace; + private boolean closed = false; + public DruidDataSource(){ } @@ -648,6 +650,10 @@ public class DruidDataSource extends DruidAbstractDataSource implements DruidDat public void close() { lock.lock(); try { + if (this.closed) { + return; + } + if (!this.inited) { return; } @@ -675,6 +681,8 @@ public class DruidDataSource extends DruidAbstractDataSource implements DruidDat enable = false; notEmpty.signalAll(); notEmptySignalCount++; + + this.closed = true; } finally { lock.unlock(); } @@ -1051,11 +1059,12 @@ public class DruidDataSource extends DruidAbstractDataSource implements DruidDat static class ActiveConnectionTraceInfo { - private final DruidPooledConnection connection; - private final long connectTime; - private final StackTraceElement[] stackTrace; + private final DruidPooledConnection connection; + private final long connectTime; + private final StackTraceElement[] stackTrace; - public ActiveConnectionTraceInfo(DruidPooledConnection connection, long connectTime, StackTraceElement[] stackTrace){ + public ActiveConnectionTraceInfo(DruidPooledConnection connection, long connectTime, + StackTraceElement[] stackTrace){ super(); this.connection = connection; this.connectTime = connectTime; diff --git a/src/main/java/com/alibaba/druid/pool/DruidPooledConnection.java b/src/main/java/com/alibaba/druid/pool/DruidPooledConnection.java index 6b549f9af3..0f56799e3d 100644 --- a/src/main/java/com/alibaba/druid/pool/DruidPooledConnection.java +++ b/src/main/java/com/alibaba/druid/pool/DruidPooledConnection.java @@ -541,12 +541,16 @@ public class DruidPooledConnection implements javax.sql.PooledConnection, Connec if (iface == null) { return null; } - + if (iface == Connection.class) { if (conn instanceof ConnectionProxy) { return conn.unwrap(iface); } - + + return (T) conn; + } + + if (iface.isInstance(conn)) { return (T) conn; } diff --git a/src/test/java/com/alibaba/druid/bvt/pool/TestOraclePrefetch.java b/src/test/java/com/alibaba/druid/bvt/pool/TestOraclePrefetch.java new file mode 100644 index 0000000000..bcfff18baf --- /dev/null +++ b/src/test/java/com/alibaba/druid/bvt/pool/TestOraclePrefetch.java @@ -0,0 +1,85 @@ +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 oracle.jdbc.OracleConnection; +import oracle.jdbc.internal.OraclePreparedStatement; + +import com.alibaba.druid.bvt.util.OracleMockDriver; +import com.alibaba.druid.pool.DruidDataSource; +import com.alibaba.druid.util.JdbcUtils; + +public class TestOraclePrefetch 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"); + } + + protected void tearDown() throws Exception { + JdbcUtils.close(dataSource); + } + + public void test_oracle() throws Exception { + + String sql = "SELECT 1"; + + { + Connection conn = dataSource.getConnection(); + + { + OracleConnection oracleConn = conn.unwrap(OracleConnection.class); + Assert.assertEquals(50, oracleConn.getDefaultRowPrefetch()); + } + + PreparedStatement stmt = conn.prepareStatement(sql); + + { + OraclePreparedStatement oracleStmt = stmt.unwrap(OraclePreparedStatement.class); + Assert.assertEquals(50, oracleStmt.getRowPrefetch()); + } + + ResultSet rs = stmt.executeQuery(); + rs.next(); + + rs.close(); + stmt.close(); + conn.close(); + } + + { + Connection conn = dataSource.getConnection(); + + { + OracleConnection oracleConn = conn.unwrap(OracleConnection.class); + Assert.assertEquals(50, oracleConn.getDefaultRowPrefetch()); + } + + PreparedStatement stmt = conn.prepareStatement(sql); + + ResultSet rs = stmt.executeQuery(); + rs.next(); + + { + OraclePreparedStatement oracleStmt = stmt.unwrap(OraclePreparedStatement.class); + Assert.assertEquals(2, oracleStmt.getRowPrefetch()); + } + + rs.close(); + stmt.close(); + conn.close(); + } + + dataSource.close(); + } +} diff --git a/src/test/java/com/alibaba/druid/bvt/util/OracleMockConnection.java b/src/test/java/com/alibaba/druid/bvt/util/OracleMockConnection.java new file mode 100644 index 0000000000..99766e658d --- /dev/null +++ b/src/test/java/com/alibaba/druid/bvt/util/OracleMockConnection.java @@ -0,0 +1,926 @@ +package com.alibaba.druid.bvt.util; + +import java.math.BigDecimal; +import java.math.BigInteger; +import java.sql.Array; +import java.sql.CallableStatement; +import java.sql.Connection; +import java.sql.Date; +import java.sql.PreparedStatement; +import java.sql.SQLException; +import java.sql.Time; +import java.sql.Timestamp; +import java.util.Calendar; +import java.util.EnumSet; +import java.util.Properties; +import java.util.TimeZone; + +import oracle.jdbc.OracleOCIFailover; +import oracle.jdbc.OracleSavepoint; +import oracle.jdbc.aq.AQDequeueOptions; +import oracle.jdbc.aq.AQEnqueueOptions; +import oracle.jdbc.aq.AQMessage; +import oracle.jdbc.aq.AQNotificationRegistration; +import oracle.jdbc.dcn.DatabaseChangeRegistration; +import oracle.jdbc.internal.OracleConnection; +import oracle.jdbc.pool.OracleConnectionCacheCallback; +import oracle.sql.ARRAY; +import oracle.sql.BINARY_DOUBLE; +import oracle.sql.BINARY_FLOAT; +import oracle.sql.DATE; +import oracle.sql.INTERVALDS; +import oracle.sql.INTERVALYM; +import oracle.sql.NUMBER; +import oracle.sql.TIMESTAMP; +import oracle.sql.TIMESTAMPLTZ; +import oracle.sql.TIMESTAMPTZ; +import oracle.sql.TypeDescriptor; + +import com.alibaba.druid.mock.MockConnection; +import com.alibaba.druid.mock.MockConnectionClosedException; +import com.alibaba.druid.mock.MockDriver; + +public class OracleMockConnection extends MockConnection implements oracle.jdbc.OracleConnection { + + private int defaultRowPrefetch = 10; + + public OracleMockConnection(){ + super(); + } + + public OracleMockConnection(MockDriver driver, String url, Properties connectProperties){ + super(driver, url, connectProperties); + + String val = (String) connectProperties.get("defaultRowPrefetch"); + if (val != null) { + defaultRowPrefetch = Integer.parseInt(val); + } + } + + @Override + public Connection _getPC() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void abort() throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void applyConnectionAttributes(Properties arg0) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void archive(int arg0, int arg1, String arg2) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void cancel() throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void clearAllApplicationContext(String arg0) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void close(Properties arg0) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void close(int arg0) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void commit(EnumSet arg0) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public ARRAY createARRAY(String arg0, Object arg1) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public BINARY_DOUBLE createBINARY_DOUBLE(double arg0) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public BINARY_FLOAT createBINARY_FLOAT(float arg0) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public DATE createDATE(Date arg0) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public DATE createDATE(Time arg0) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public DATE createDATE(Timestamp arg0) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public DATE createDATE(String arg0) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public DATE createDATE(Date arg0, Calendar arg1) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public DATE createDATE(Time arg0, Calendar arg1) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public DATE createDATE(Timestamp arg0, Calendar arg1) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public INTERVALDS createINTERVALDS(String arg0) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public INTERVALYM createINTERVALYM(String arg0) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public NUMBER createNUMBER(boolean arg0) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public NUMBER createNUMBER(byte arg0) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public NUMBER createNUMBER(short arg0) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public NUMBER createNUMBER(int arg0) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public NUMBER createNUMBER(long arg0) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public NUMBER createNUMBER(float arg0) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public NUMBER createNUMBER(double arg0) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public NUMBER createNUMBER(BigDecimal arg0) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public NUMBER createNUMBER(BigInteger arg0) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public NUMBER createNUMBER(String arg0, int arg1) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public Array createOracleArray(String arg0, Object arg1) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public TIMESTAMP createTIMESTAMP(Date arg0) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public TIMESTAMP createTIMESTAMP(DATE arg0) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public TIMESTAMP createTIMESTAMP(Time arg0) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public TIMESTAMP createTIMESTAMP(Timestamp arg0) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public TIMESTAMP createTIMESTAMP(String arg0) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public TIMESTAMPLTZ createTIMESTAMPLTZ(Date arg0, Calendar arg1) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public TIMESTAMPLTZ createTIMESTAMPLTZ(Time arg0, Calendar arg1) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public TIMESTAMPLTZ createTIMESTAMPLTZ(Timestamp arg0, Calendar arg1) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public TIMESTAMPLTZ createTIMESTAMPLTZ(String arg0, Calendar arg1) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public TIMESTAMPLTZ createTIMESTAMPLTZ(DATE arg0, Calendar arg1) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public TIMESTAMPTZ createTIMESTAMPTZ(Date arg0) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public TIMESTAMPTZ createTIMESTAMPTZ(Time arg0) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public TIMESTAMPTZ createTIMESTAMPTZ(Timestamp arg0) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public TIMESTAMPTZ createTIMESTAMPTZ(String arg0) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public TIMESTAMPTZ createTIMESTAMPTZ(DATE arg0) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public TIMESTAMPTZ createTIMESTAMPTZ(Date arg0, Calendar arg1) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public TIMESTAMPTZ createTIMESTAMPTZ(Time arg0, Calendar arg1) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public TIMESTAMPTZ createTIMESTAMPTZ(Timestamp arg0, Calendar arg1) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public TIMESTAMPTZ createTIMESTAMPTZ(String arg0, Calendar arg1) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public AQMessage dequeue(String arg0, AQDequeueOptions arg1, byte[] arg2) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public AQMessage dequeue(String arg0, AQDequeueOptions arg1, String arg2) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public void enqueue(String arg0, AQEnqueueOptions arg1, AQMessage arg2) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public TypeDescriptor[] getAllTypeDescriptorsInCurrentSchema() throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getAuthenticationAdaptorName() throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean getAutoClose() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public CallableStatement getCallWithKey(String arg0) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public Properties getConnectionAttributes() throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public int getConnectionReleasePriority() throws SQLException { + // TODO Auto-generated method stub + return 0; + } + + @Override + public boolean getCreateStatementAsRefCursor() { + // TODO Auto-generated method stub + return false; + } + + @Override + public String getCurrentSchema() throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getDataIntegrityAlgorithmName() throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public DatabaseChangeRegistration getDatabaseChangeRegistration(int arg0) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public int getDefaultExecuteBatch() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int getDefaultRowPrefetch() { + return defaultRowPrefetch; + } + + @Override + public TimeZone getDefaultTimeZone() throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public Object getDescriptor(String arg0) { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getEncryptionAlgorithmName() throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public short getEndToEndECIDSequenceNumber() throws SQLException { + // TODO Auto-generated method stub + return 0; + } + + @Override + public String[] getEndToEndMetrics() throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean getExplicitCachingEnabled() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean getImplicitCachingEnabled() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean getIncludeSynonyms() { + // TODO Auto-generated method stub + return false; + } + + @Override + public Object getJavaObject(String arg0) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public Properties getProperties() { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean getRemarksReporting() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean getRestrictGetTables() { + // TODO Auto-generated method stub + return false; + } + + @Override + public String getSQLType(Object arg0) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getSessionTimeZone() { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getSessionTimeZoneOffset() throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public int getStatementCacheSize() throws SQLException { + // TODO Auto-generated method stub + return 0; + } + + @Override + public PreparedStatement getStatementWithKey(String arg0) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public int getStmtCacheSize() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public short getStructAttrCsId() throws SQLException { + // TODO Auto-generated method stub + return 0; + } + + @Override + public TypeDescriptor[] getTypeDescriptorsFromList(String[][] arg0) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public TypeDescriptor[] getTypeDescriptorsFromListInCurrentSchema(String[] arg0) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public Properties getUnMatchedConnectionAttributes() throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getUserName() throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean getUsingXAFlag() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean getXAErrorFlag() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean isLogicalConnection() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean isProxySession() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean isUsable() { + // TODO Auto-generated method stub + return false; + } + + @Override + public void openProxySession(int arg0, Properties arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void oracleReleaseSavepoint(OracleSavepoint arg0) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void oracleRollback(OracleSavepoint arg0) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public OracleSavepoint oracleSetSavepoint() throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public OracleSavepoint oracleSetSavepoint(String arg0) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public OracleConnection physicalConnectionWithin() { + // TODO Auto-generated method stub + return null; + } + + @Override + public int pingDatabase() throws SQLException { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int pingDatabase(int arg0) throws SQLException { + // TODO Auto-generated method stub + return 0; + } + + @Override + public CallableStatement prepareCallWithKey(String arg0) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public PreparedStatement prepareStatementWithKey(String arg0) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public void purgeExplicitCache() throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void purgeImplicitCache() throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void putDescriptor(String arg0, Object arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public AQNotificationRegistration[] registerAQNotification(String[] arg0, Properties[] arg1, Properties arg2) + throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public void registerConnectionCacheCallback(OracleConnectionCacheCallback arg0, Object arg1, int arg2) + throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public DatabaseChangeRegistration registerDatabaseChangeNotification(Properties arg0) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public void registerSQLType(String arg0, Class arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void registerSQLType(String arg0, String arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void registerTAFCallback(OracleOCIFailover arg0, Object arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setApplicationContext(String arg0, String arg1, String arg2) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setAutoClose(boolean arg0) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setConnectionReleasePriority(int arg0) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setCreateStatementAsRefCursor(boolean arg0) { + // TODO Auto-generated method stub + + } + + @Override + public void setDefaultExecuteBatch(int arg0) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setDefaultRowPrefetch(int defaultRowPrefetch) throws SQLException { + this.defaultRowPrefetch = defaultRowPrefetch; + } + + @Override + public void setDefaultTimeZone(TimeZone arg0) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setEndToEndMetrics(String[] arg0, short arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setExplicitCachingEnabled(boolean arg0) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setImplicitCachingEnabled(boolean arg0) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setIncludeSynonyms(boolean arg0) { + // TODO Auto-generated method stub + + } + + @Override + public void setPlsqlWarnings(String arg0) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setRemarksReporting(boolean arg0) { + // TODO Auto-generated method stub + + } + + @Override + public void setRestrictGetTables(boolean arg0) { + // TODO Auto-generated method stub + + } + + @Override + public void setSessionTimeZone(String arg0) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setStatementCacheSize(int arg0) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setStmtCacheSize(int arg0) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setStmtCacheSize(int arg0, boolean arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setUsingXAFlag(boolean arg0) { + // TODO Auto-generated method stub + + } + + @Override + public void setWrapper(oracle.jdbc.OracleConnection arg0) { + // TODO Auto-generated method stub + + } + + @Override + public void setXAErrorFlag(boolean arg0) { + // TODO Auto-generated method stub + + } + + @Override + public void shutdown(DatabaseShutdownMode arg0) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void startup(DatabaseStartupMode arg0) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void startup(String arg0, int arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void unregisterAQNotification(AQNotificationRegistration arg0) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void unregisterDatabaseChangeNotification(DatabaseChangeRegistration arg0) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void unregisterDatabaseChangeNotification(int arg0) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void unregisterDatabaseChangeNotification(long arg0, String arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void unregisterDatabaseChangeNotification(int arg0, String arg1, int arg2) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public oracle.jdbc.OracleConnection unwrap() { + // TODO Auto-generated method stub + return null; + } + + @Override + public PreparedStatement prepareStatement(String sql) throws SQLException { + if (isClosed()) { + throw new MockConnectionClosedException(); + } + + return new OracleMockPreparedStatement(this, sql); + } +} diff --git a/src/test/java/com/alibaba/druid/bvt/util/OracleMockDriver.java b/src/test/java/com/alibaba/druid/bvt/util/OracleMockDriver.java new file mode 100644 index 0000000000..bf734756bd --- /dev/null +++ b/src/test/java/com/alibaba/druid/bvt/util/OracleMockDriver.java @@ -0,0 +1,14 @@ +package com.alibaba.druid.bvt.util; + +import java.sql.Connection; +import java.sql.SQLException; +import java.util.Properties; + +import com.alibaba.druid.mock.MockDriver; + + +public class OracleMockDriver extends MockDriver { + public Connection connect(String url, Properties info) throws SQLException { + return new OracleMockConnection(this, url, info); + } +} diff --git a/src/test/java/com/alibaba/druid/bvt/util/OracleMockPreparedStatement.java b/src/test/java/com/alibaba/druid/bvt/util/OracleMockPreparedStatement.java new file mode 100644 index 0000000000..ea00c169b0 --- /dev/null +++ b/src/test/java/com/alibaba/druid/bvt/util/OracleMockPreparedStatement.java @@ -0,0 +1,899 @@ +package com.alibaba.druid.bvt.util; + +import java.io.InputStream; +import java.io.Reader; +import java.math.BigDecimal; +import java.net.URL; +import java.sql.Array; +import java.sql.Blob; +import java.sql.Clob; +import java.sql.Date; +import java.sql.Ref; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Time; +import java.sql.Timestamp; +import java.util.Calendar; + +import oracle.jdbc.OracleParameterMetaData; +import oracle.jdbc.OracleResultSetCache; +import oracle.jdbc.dcn.DatabaseChangeRegistration; +import oracle.sql.ARRAY; +import oracle.sql.BFILE; +import oracle.sql.BINARY_DOUBLE; +import oracle.sql.BINARY_FLOAT; +import oracle.sql.BLOB; +import oracle.sql.CHAR; +import oracle.sql.CLOB; +import oracle.sql.CustomDatum; +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.RAW; +import oracle.sql.REF; +import oracle.sql.ROWID; +import oracle.sql.STRUCT; +import oracle.sql.StructDescriptor; +import oracle.sql.TIMESTAMP; +import oracle.sql.TIMESTAMPLTZ; +import oracle.sql.TIMESTAMPTZ; + +import com.alibaba.druid.mock.MockPreparedStatement; + +public class OracleMockPreparedStatement extends MockPreparedStatement implements oracle.jdbc.internal.OraclePreparedStatement { + + private int executeBatch = 50; + private int rowPrefetch; + + public OracleMockPreparedStatement(OracleMockConnection conn, String sql){ + super(conn, sql); + this.rowPrefetch = conn.getDefaultRowPrefetch(); + } + + @Override + public OracleParameterMetaData OracleGetParameterMetaData() throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public void defineParameterType(int arg0, int arg1, int arg2) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void defineParameterTypeBytes(int arg0, int arg1, int arg2) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void defineParameterTypeChars(int arg0, int arg1, int arg2) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public int getExecuteBatch() { + return executeBatch; + } + + @Override + public ResultSet getReturnResultSet() throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public void registerReturnParameter(int arg0, int arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void registerReturnParameter(int arg0, int arg1, int arg2) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void registerReturnParameter(int arg0, int arg1, String arg2) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public int sendBatch() throws SQLException { + // TODO Auto-generated method stub + return 0; + } + + @Override + public void setARRAY(int arg0, ARRAY arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setARRAYAtName(String arg0, ARRAY arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setArrayAtName(String arg0, Array arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setAsciiStreamAtName(String arg0, InputStream arg1, int arg2) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setBFILE(int arg0, BFILE arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setBFILEAtName(String arg0, BFILE arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setBLOB(int arg0, BLOB arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setBLOBAtName(String arg0, BLOB arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setBfile(int arg0, BFILE arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setBfileAtName(String arg0, BFILE arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setBigDecimalAtName(String arg0, BigDecimal arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setBinaryDouble(int arg0, double arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setBinaryDouble(int arg0, BINARY_DOUBLE arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setBinaryDoubleAtName(String arg0, double arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setBinaryDoubleAtName(String arg0, BINARY_DOUBLE arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setBinaryFloat(int arg0, float arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setBinaryFloat(int arg0, BINARY_FLOAT arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setBinaryFloatAtName(String arg0, float arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setBinaryFloatAtName(String arg0, BINARY_FLOAT arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setBinaryStreamAtName(String arg0, InputStream arg1, int arg2) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setBlobAtName(String arg0, Blob arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setBooleanAtName(String arg0, boolean arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setByteAtName(String arg0, byte arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setBytesAtName(String arg0, byte[] arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setBytesForBlob(int arg0, byte[] arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setBytesForBlobAtName(String arg0, byte[] arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setCHAR(int arg0, CHAR arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setCHARAtName(String arg0, CHAR arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setCLOB(int arg0, CLOB arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setCLOBAtName(String arg0, CLOB arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setClobAtName(String arg0, Clob arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setCursor(int arg0, ResultSet arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setCursorAtName(String arg0, ResultSet arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setCustomDatum(int arg0, CustomDatum arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setCustomDatumAtName(String arg0, CustomDatum arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setDATE(int arg0, DATE arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setDATEAtName(String arg0, DATE arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setDateAtName(String arg0, Date arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setDateAtName(String arg0, Date arg1, Calendar arg2) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setDisableStmtCaching(boolean arg0) { + // TODO Auto-generated method stub + + } + + @Override + public void setDoubleAtName(String arg0, double arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setExecuteBatch(int executeBatch) throws SQLException { + this.executeBatch = executeBatch; + } + + @Override + public void setFixedCHAR(int arg0, String arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setFixedCHARAtName(String arg0, String arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setFloatAtName(String arg0, float arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setFormOfUse(int arg0, short arg1) { + // TODO Auto-generated method stub + + } + + @Override + public void setINTERVALDS(int arg0, INTERVALDS arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setINTERVALDSAtName(String arg0, INTERVALDS arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setINTERVALYM(int arg0, INTERVALYM arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setINTERVALYMAtName(String arg0, INTERVALYM arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setIntAtName(String arg0, int arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setLongAtName(String arg0, long arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setNUMBER(int arg0, NUMBER arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setNUMBERAtName(String arg0, NUMBER arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setNullAtName(String arg0, int arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setNullAtName(String arg0, int arg1, String arg2) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setOPAQUE(int arg0, OPAQUE arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setOPAQUEAtName(String arg0, OPAQUE arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setORAData(int arg0, ORAData arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setORADataAtName(String arg0, ORAData arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setObjectAtName(String arg0, Object arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setObjectAtName(String arg0, Object arg1, int arg2) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setObjectAtName(String arg0, Object arg1, int arg2, int arg3) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setOracleObject(int arg0, Datum arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setOracleObjectAtName(String arg0, Datum arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setPlsqlIndexTable(int arg0, Object arg1, int arg2, int arg3, int arg4, int arg5) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setRAW(int arg0, RAW arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setRAWAtName(String arg0, RAW arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setREF(int arg0, REF arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setREFAtName(String arg0, REF arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setROWID(int arg0, ROWID arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setROWIDAtName(String arg0, ROWID arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setRefAtName(String arg0, Ref arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setRefType(int arg0, REF arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setRefTypeAtName(String arg0, REF arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setSTRUCT(int arg0, STRUCT arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setSTRUCTAtName(String arg0, STRUCT arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setShortAtName(String arg0, short arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setStringAtName(String arg0, String arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setStringForClob(int arg0, String arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setStringForClobAtName(String arg0, String arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setStructDescriptor(int arg0, StructDescriptor arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setStructDescriptorAtName(String arg0, StructDescriptor arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setTIMESTAMP(int arg0, TIMESTAMP arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setTIMESTAMPAtName(String arg0, TIMESTAMP arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setTIMESTAMPLTZ(int arg0, TIMESTAMPLTZ arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setTIMESTAMPLTZAtName(String arg0, TIMESTAMPLTZ arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setTIMESTAMPTZ(int arg0, TIMESTAMPTZ arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setTIMESTAMPTZAtName(String arg0, TIMESTAMPTZ arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setTimeAtName(String arg0, Time arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setTimeAtName(String arg0, Time arg1, Calendar arg2) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setTimestampAtName(String arg0, Timestamp arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setTimestampAtName(String arg0, Timestamp arg1, Calendar arg2) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setURLAtName(String arg0, URL arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setUnicodeStreamAtName(String arg0, InputStream arg1, int arg2) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void clearDefines() throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void closeWithKey(String arg0) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public int creationState() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public void defineColumnType(int arg0, int arg1) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void defineColumnType(int arg0, int arg1, int arg2) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void defineColumnType(int arg0, int arg1, String arg2) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void defineColumnType(int arg0, int arg1, int arg2, short arg3) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void defineColumnTypeBytes(int arg0, int arg1, int arg2) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void defineColumnTypeChars(int arg0, int arg1, int arg2) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public int getLobPrefetchSize() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public long getRegisteredQueryId() throws SQLException { + // TODO Auto-generated method stub + return 0; + } + + @Override + public String[] getRegisteredTableNames() throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public int getRowPrefetch() { + return rowPrefetch; + } + + @Override + public boolean isNCHAR(int arg0) throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public void setDatabaseChangeRegistration(DatabaseChangeRegistration arg0) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setLobPrefetchSize(int arg0) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setResultSetCache(OracleResultSetCache arg0) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setRowPrefetch(int rowPrefetch) throws SQLException { + this.rowPrefetch = rowPrefetch; + } + + @Override + public long getChecksum() throws SQLException { + // TODO Auto-generated method stub + return 0; + } + + @Override + public boolean getFixedString() { + // TODO Auto-generated method stub + return false; + } + + @Override + public SqlKind getSqlKind() throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public int getcacheState() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public boolean getserverCursor() { + // TODO Auto-generated method stub + return false; + } + + @Override + public int getstatementType() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public void setFixedString(boolean arg0) { + // TODO Auto-generated method stub + + } + + @Override + public void setSnapshotSCN(long arg0) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void enterExplicitCache() throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void enterImplicitCache() throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void exitExplicitCacheToActive() throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void exitExplicitCacheToClose() throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void exitImplicitCacheToActive() throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void exitImplicitCacheToClose() throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public String getOriginalSql() throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public void setCharacterStreamAtName(String arg0, Reader arg1, int arg2) throws SQLException { + // TODO Auto-generated method stub + + } + + @Override + public void setCheckBindTypes(boolean arg0) { + // TODO Auto-generated method stub + + } + + @Override + public void setInternalBytes(int arg0, byte[] arg1, int arg2) throws SQLException { + // TODO Auto-generated method stub + + } + +}