Package java.sql

Examples of java.sql.PreparedStatement.unwrap()


        Connection conn = dataSource.getConnection();
        PreparedStatement stmt = conn.prepareStatement(sql);
        ResultSet rs = stmt.executeQuery();
        rs.next();

        Statement mockStmt = stmt.unwrap(Statement.class);
        Assert.assertEquals(false, mockStmt.isClosed());

        conn.close();

        Assert.assertEquals(true, mockStmt.isClosed());
View Full Code Here


            // /////////////

            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));
           
View Full Code Here

            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();
View Full Code Here

            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));
View Full Code Here

            // /////////////

            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));
           
View Full Code Here

            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();
View Full Code Here

            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));
View Full Code Here

            // /////////////

            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));
           
View Full Code Here

            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();
View Full Code Here

            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));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.