Package java.sql

Examples of java.sql.Statement.unwrap()


        Assert.assertNotNull(conn.unwrap(MockConnection.class));

        Statement stmt = conn.createStatement();

        Assert.assertTrue(stmt.isWrapperFor(Statement.class));
        Assert.assertNotNull(stmt.unwrap(Statement.class));

        Assert.assertTrue(stmt.isWrapperFor(StatementProxy.class));
        Assert.assertNotNull(stmt.unwrap(StatementProxy.class));

        Assert.assertTrue(stmt.isWrapperFor(StatementProxyImpl.class));
View Full Code Here


        Assert.assertTrue(stmt.isWrapperFor(Statement.class));
        Assert.assertNotNull(stmt.unwrap(Statement.class));

        Assert.assertTrue(stmt.isWrapperFor(StatementProxy.class));
        Assert.assertNotNull(stmt.unwrap(StatementProxy.class));

        Assert.assertTrue(stmt.isWrapperFor(StatementProxyImpl.class));
        Assert.assertNotNull(stmt.unwrap(StatementProxyImpl.class));

        Assert.assertTrue(stmt.isWrapperFor(MockStatement.class));
View Full Code Here

        Assert.assertTrue(stmt.isWrapperFor(StatementProxy.class));
        Assert.assertNotNull(stmt.unwrap(StatementProxy.class));

        Assert.assertTrue(stmt.isWrapperFor(StatementProxyImpl.class));
        Assert.assertNotNull(stmt.unwrap(StatementProxyImpl.class));

        Assert.assertTrue(stmt.isWrapperFor(MockStatement.class));
        Assert.assertNotNull(stmt.unwrap(MockStatement.class));

        ResultSet rs = stmt.executeQuery("select 1");
View Full Code Here

        Assert.assertTrue(stmt.isWrapperFor(StatementProxyImpl.class));
        Assert.assertNotNull(stmt.unwrap(StatementProxyImpl.class));

        Assert.assertTrue(stmt.isWrapperFor(MockStatement.class));
        Assert.assertNotNull(stmt.unwrap(MockStatement.class));

        ResultSet rs = stmt.executeQuery("select 1");

        Assert.assertTrue(rs.isWrapperFor(ResultSet.class));
        Assert.assertNotNull(rs.unwrap(ResultSet.class));
View Full Code Here

        Statement statement = connection.createStatement();
        Assert.assertFalse(statement.isWrapperFor(com.mysql.jdbc.Statement.class));
        Assert.assertFalse(statement.isWrapperFor(null));
        Assert.assertTrue(statement.isWrapperFor(org.apache.derby.impl.jdbc.EmbedStatement.class));

        org.apache.derby.impl.jdbc.EmbedStatement rayStatement = statement.unwrap(org.apache.derby.impl.jdbc.EmbedStatement.class);
        Assert.assertNotNull(rayStatement);
        statement.close();
    }

    protected void tearDown() throws Exception {
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.