Java Code Examples for javax.sql.rowset.RowSetFactory

The following examples show how to use javax.sql.rowset.RowSetFactory. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
@DataProvider(name = "RowSetValues")
private Object[][] RowSetValues() throws SQLException {
    RowSetFactory rsf = RowSetProvider.newFactory();
    RowSetFactory rsf1 = RowSetProvider.newFactory(STUB_FACTORY_CLASSNAME, null);
    return new Object[][]{
        {rsf, DEFAULT_CACHEDROWSET_CLASSNAME},
        {rsf, DEFAULT_FILTEREDROWSET_CLASSNAME},
        {rsf, DEFAULT_JDBCROWSET_CLASSNAME},
        {rsf, DEFAULT_JOINROWSET_CLASSNAME},
        {rsf, DEFAULT_WEBROWSET_CLASSNAME},
        {rsf1, STUB_CACHEDROWSET_CLASSNAME},
        {rsf1, STUB_FILTEREDROWSET_CLASSNAME},
        {rsf1, STUB_JDBCROWSET_CLASSNAME},
        {rsf1, STUB_JOINROWSET_CLASSNAME},
        {rsf1, STUB_WEBROWSET_CLASSNAME}

    };
}
 
Example 2
@DataProvider(name = "RowSetValues")
private Object[][] RowSetValues() throws SQLException {
    RowSetFactory rsf = RowSetProvider.newFactory();
    RowSetFactory rsf1 = RowSetProvider.newFactory(STUB_FACTORY_CLASSNAME, null);
    return new Object[][]{
        {rsf, DEFAULT_CACHEDROWSET_CLASSNAME},
        {rsf, DEFAULT_FILTEREDROWSET_CLASSNAME},
        {rsf, DEFAULT_JDBCROWSET_CLASSNAME},
        {rsf, DEFAULT_JOINROWSET_CLASSNAME},
        {rsf, DEFAULT_WEBROWSET_CLASSNAME},
        {rsf1, STUB_CACHEDROWSET_CLASSNAME},
        {rsf1, STUB_FILTEREDROWSET_CLASSNAME},
        {rsf1, STUB_JDBCROWSET_CLASSNAME},
        {rsf1, STUB_JOINROWSET_CLASSNAME},
        {rsf1, STUB_WEBROWSET_CLASSNAME}

    };
}
 
Example 3
Source Project: jdk8u60   Source File: RowSetFactoryTests.java    License: GNU General Public License v2.0 6 votes vote down vote up
@DataProvider(name = "RowSetValues")
private Object[][] RowSetValues() throws SQLException {
    RowSetFactory rsf = RowSetProvider.newFactory();
    RowSetFactory rsf1 = RowSetProvider.newFactory(STUB_FACTORY_CLASSNAME, null);
    return new Object[][]{
        {rsf, DEFAULT_CACHEDROWSET_CLASSNAME},
        {rsf, DEFAULT_FILTEREDROWSET_CLASSNAME},
        {rsf, DEFAULT_JDBCROWSET_CLASSNAME},
        {rsf, DEFAULT_JOINROWSET_CLASSNAME},
        {rsf, DEFAULT_WEBROWSET_CLASSNAME},
        {rsf1, STUB_CACHEDROWSET_CLASSNAME},
        {rsf1, STUB_FILTEREDROWSET_CLASSNAME},
        {rsf1, STUB_JDBCROWSET_CLASSNAME},
        {rsf1, STUB_JOINROWSET_CLASSNAME},
        {rsf1, STUB_WEBROWSET_CLASSNAME}

    };
}
 
Example 4
@DataProvider(name = "RowSetValues")
private Object[][] RowSetValues() throws SQLException {
    RowSetFactory rsf = RowSetProvider.newFactory();
    RowSetFactory rsf1 = RowSetProvider.newFactory(STUB_FACTORY_CLASSNAME, null);
    return new Object[][]{
        {rsf, DEFAULT_CACHEDROWSET_CLASSNAME},
        {rsf, DEFAULT_FILTEREDROWSET_CLASSNAME},
        {rsf, DEFAULT_JDBCROWSET_CLASSNAME},
        {rsf, DEFAULT_JOINROWSET_CLASSNAME},
        {rsf, DEFAULT_WEBROWSET_CLASSNAME},
        {rsf1, STUB_CACHEDROWSET_CLASSNAME},
        {rsf1, STUB_FILTEREDROWSET_CLASSNAME},
        {rsf1, STUB_JDBCROWSET_CLASSNAME},
        {rsf1, STUB_JOINROWSET_CLASSNAME},
        {rsf1, STUB_WEBROWSET_CLASSNAME}

    };
}
 
Example 5
@DataProvider(name = "RowSetValues")
private Object[][] RowSetValues() throws SQLException {
    RowSetFactory rsf = RowSetProvider.newFactory();
    RowSetFactory rsf1 = RowSetProvider.newFactory(STUB_FACTORY_CLASSNAME, null);
    return new Object[][]{
        {rsf, DEFAULT_CACHEDROWSET_CLASSNAME},
        {rsf, DEFAULT_FILTEREDROWSET_CLASSNAME},
        {rsf, DEFAULT_JDBCROWSET_CLASSNAME},
        {rsf, DEFAULT_JOINROWSET_CLASSNAME},
        {rsf, DEFAULT_WEBROWSET_CLASSNAME},
        {rsf1, STUB_CACHEDROWSET_CLASSNAME},
        {rsf1, STUB_FILTEREDROWSET_CLASSNAME},
        {rsf1, STUB_JDBCROWSET_CLASSNAME},
        {rsf1, STUB_JOINROWSET_CLASSNAME},
        {rsf1, STUB_WEBROWSET_CLASSNAME}

    };
}
 
Example 6
@DataProvider(name = "RowSetValues")
private Object[][] RowSetValues() throws SQLException {
    RowSetFactory rsf = RowSetProvider.newFactory();
    RowSetFactory rsf1 = RowSetProvider.newFactory(STUB_FACTORY_CLASSNAME, null);
    return new Object[][]{
        {rsf, DEFAULT_CACHEDROWSET_CLASSNAME},
        {rsf, DEFAULT_FILTEREDROWSET_CLASSNAME},
        {rsf, DEFAULT_JDBCROWSET_CLASSNAME},
        {rsf, DEFAULT_JOINROWSET_CLASSNAME},
        {rsf, DEFAULT_WEBROWSET_CLASSNAME},
        {rsf1, STUB_CACHEDROWSET_CLASSNAME},
        {rsf1, STUB_FILTEREDROWSET_CLASSNAME},
        {rsf1, STUB_JDBCROWSET_CLASSNAME},
        {rsf1, STUB_JOINROWSET_CLASSNAME},
        {rsf1, STUB_WEBROWSET_CLASSNAME}

    };
}
 
Example 7
Source Project: jdk8u-jdk   Source File: RowSetFactoryTests.java    License: GNU General Public License v2.0 6 votes vote down vote up
@DataProvider(name = "RowSetValues")
private Object[][] RowSetValues() throws SQLException {
    RowSetFactory rsf = RowSetProvider.newFactory();
    RowSetFactory rsf1 = RowSetProvider.newFactory(STUB_FACTORY_CLASSNAME, null);
    return new Object[][]{
        {rsf, DEFAULT_CACHEDROWSET_CLASSNAME},
        {rsf, DEFAULT_FILTEREDROWSET_CLASSNAME},
        {rsf, DEFAULT_JDBCROWSET_CLASSNAME},
        {rsf, DEFAULT_JOINROWSET_CLASSNAME},
        {rsf, DEFAULT_WEBROWSET_CLASSNAME},
        {rsf1, STUB_CACHEDROWSET_CLASSNAME},
        {rsf1, STUB_FILTEREDROWSET_CLASSNAME},
        {rsf1, STUB_JDBCROWSET_CLASSNAME},
        {rsf1, STUB_JOINROWSET_CLASSNAME},
        {rsf1, STUB_WEBROWSET_CLASSNAME}

    };
}
 
Example 8
Source Project: hottub   Source File: RowSetFactoryTests.java    License: GNU General Public License v2.0 6 votes vote down vote up
@DataProvider(name = "RowSetValues")
private Object[][] RowSetValues() throws SQLException {
    RowSetFactory rsf = RowSetProvider.newFactory();
    RowSetFactory rsf1 = RowSetProvider.newFactory(STUB_FACTORY_CLASSNAME, null);
    return new Object[][]{
        {rsf, DEFAULT_CACHEDROWSET_CLASSNAME},
        {rsf, DEFAULT_FILTEREDROWSET_CLASSNAME},
        {rsf, DEFAULT_JDBCROWSET_CLASSNAME},
        {rsf, DEFAULT_JOINROWSET_CLASSNAME},
        {rsf, DEFAULT_WEBROWSET_CLASSNAME},
        {rsf1, STUB_CACHEDROWSET_CLASSNAME},
        {rsf1, STUB_FILTEREDROWSET_CLASSNAME},
        {rsf1, STUB_JDBCROWSET_CLASSNAME},
        {rsf1, STUB_JOINROWSET_CLASSNAME},
        {rsf1, STUB_WEBROWSET_CLASSNAME}

    };
}
 
Example 9
Source Project: jdk8u_jdk   Source File: RowSetFactoryTests.java    License: GNU General Public License v2.0 6 votes vote down vote up
@DataProvider(name = "RowSetValues")
private Object[][] RowSetValues() throws SQLException {
    RowSetFactory rsf = RowSetProvider.newFactory();
    RowSetFactory rsf1 = RowSetProvider.newFactory(STUB_FACTORY_CLASSNAME, null);
    return new Object[][]{
        {rsf, DEFAULT_CACHEDROWSET_CLASSNAME},
        {rsf, DEFAULT_FILTEREDROWSET_CLASSNAME},
        {rsf, DEFAULT_JDBCROWSET_CLASSNAME},
        {rsf, DEFAULT_JOINROWSET_CLASSNAME},
        {rsf, DEFAULT_WEBROWSET_CLASSNAME},
        {rsf1, STUB_CACHEDROWSET_CLASSNAME},
        {rsf1, STUB_FILTEREDROWSET_CLASSNAME},
        {rsf1, STUB_JDBCROWSET_CLASSNAME},
        {rsf1, STUB_JOINROWSET_CLASSNAME},
        {rsf1, STUB_WEBROWSET_CLASSNAME}

    };
}
 
Example 10
Source Project: tutorials   Source File: JdbcRowSetLiveTest.java    License: MIT License 6 votes vote down vote up
@Test
public void createFilteredRowSet_filterByRegexExpression_thenCorrect() throws Exception {
    RowSetFactory rsf = RowSetProvider.newFactory();
    FilteredRowSet frs = rsf.createFilteredRowSet();
    frs.setCommand("select * from customers");
    Connection conn = DatabaseConfiguration.geth2Connection();
    frs.execute(conn);
    frs.setFilter(new FilterExample("^[A-C].*"));

    ResultSetMetaData rsmd = frs.getMetaData();
    int columncount = rsmd.getColumnCount();
    while (frs.next()) {
        for (int i = 1; i <= columncount; i++) {
            System.out.println(rsmd.getColumnLabel(i) + " = " + frs.getObject(i) + " ");
        }
    }
}
 
Example 11
private void validateRowSetImpl(RowSetFactory rsf, String implName)
        throws SQLException {
    assertNotNull(rsf, "RowSetFactory should not be null");
    switch (implName) {
        case DEFAULT_CACHEDROWSET_CLASSNAME:
            assertTrue(rsf.createCachedRowSet() instanceof com.sun.rowset.CachedRowSetImpl);
            break;
        case DEFAULT_FILTEREDROWSET_CLASSNAME:
            assertTrue(rsf.createFilteredRowSet() instanceof com.sun.rowset.FilteredRowSetImpl);
            break;
        case DEFAULT_JDBCROWSET_CLASSNAME:
            assertTrue(rsf.createJdbcRowSet() instanceof com.sun.rowset.JdbcRowSetImpl);
            break;
        case DEFAULT_JOINROWSET_CLASSNAME:
            assertTrue(rsf.createJoinRowSet() instanceof com.sun.rowset.JoinRowSetImpl);
            break;
        case DEFAULT_WEBROWSET_CLASSNAME:
            assertTrue(rsf.createWebRowSet() instanceof com.sun.rowset.WebRowSetImpl);
            break;
        case STUB_CACHEDROWSET_CLASSNAME:
            assertTrue(rsf.createCachedRowSet() instanceof util.StubCachedRowSetImpl);
            break;
        case STUB_FILTEREDROWSET_CLASSNAME:
            assertTrue(rsf.createFilteredRowSet() instanceof util.StubFilteredRowSetImpl);
            break;
        case STUB_JDBCROWSET_CLASSNAME:
            assertTrue(rsf.createJdbcRowSet() instanceof util.StubJdbcRowSetImpl);
            break;
        case STUB_WEBROWSET_CLASSNAME:
            assertTrue(rsf.createWebRowSet() instanceof util.StubWebRowSetImpl);
            break;
    }

}
 
Example 12
private void validateProvider(RowSetFactory rsf, String implName) {
    assertNotNull(rsf, "RowSetFactory should not be null");
    switch (implName) {
        case DEFFAULT_FACTORY_CLASSNAME:
            assertTrue(rsf instanceof RowSetFactoryImpl);
            break;
        case STUB_FACTORY_CLASSNAME:
            assertTrue(rsf instanceof StubRowSetFactory);
            break;
        default:
    }
}
 
Example 13
@DataProvider(name = "RowSetFactoryValues")
private Object[][] RowSetFactoryValues() throws SQLException {
    RowSetFactory rsf = RowSetProvider.newFactory();
    RowSetFactory rsf1 = RowSetProvider.newFactory(STUB_FACTORY_CLASSNAME, null);
    RowSetFactory rsf2 = RowSetProvider.newFactory(DEFFAULT_FACTORY_CLASSNAME, null);
    return new Object[][]{
        {rsf, NO_VALADATE_IMPL},
        {rsf, DEFFAULT_FACTORY_CLASSNAME},
        {rsf1, STUB_FACTORY_CLASSNAME},
        {rsf2, DEFFAULT_FACTORY_CLASSNAME}
    };
}
 
Example 14
private void validateRowSetImpl(RowSetFactory rsf, String implName)
        throws SQLException {
    assertNotNull(rsf, "RowSetFactory should not be null");
    switch (implName) {
        case DEFAULT_CACHEDROWSET_CLASSNAME:
            assertTrue(rsf.createCachedRowSet() instanceof com.sun.rowset.CachedRowSetImpl);
            break;
        case DEFAULT_FILTEREDROWSET_CLASSNAME:
            assertTrue(rsf.createFilteredRowSet() instanceof com.sun.rowset.FilteredRowSetImpl);
            break;
        case DEFAULT_JDBCROWSET_CLASSNAME:
            assertTrue(rsf.createJdbcRowSet() instanceof com.sun.rowset.JdbcRowSetImpl);
            break;
        case DEFAULT_JOINROWSET_CLASSNAME:
            assertTrue(rsf.createJoinRowSet() instanceof com.sun.rowset.JoinRowSetImpl);
            break;
        case DEFAULT_WEBROWSET_CLASSNAME:
            assertTrue(rsf.createWebRowSet() instanceof com.sun.rowset.WebRowSetImpl);
            break;
        case STUB_CACHEDROWSET_CLASSNAME:
            assertTrue(rsf.createCachedRowSet() instanceof util.StubCachedRowSetImpl);
            break;
        case STUB_FILTEREDROWSET_CLASSNAME:
            assertTrue(rsf.createFilteredRowSet() instanceof util.StubFilteredRowSetImpl);
            break;
        case STUB_JDBCROWSET_CLASSNAME:
            assertTrue(rsf.createJdbcRowSet() instanceof util.StubJdbcRowSetImpl);
            break;
        case STUB_WEBROWSET_CLASSNAME:
            assertTrue(rsf.createWebRowSet() instanceof util.StubWebRowSetImpl);
            break;
    }

}
 
Example 15
private void validateProvider(RowSetFactory rsf, String implName) {
    assertNotNull(rsf, "RowSetFactory should not be null");
    switch (implName) {
        case DEFFAULT_FACTORY_CLASSNAME:
            assertTrue(rsf instanceof RowSetFactoryImpl);
            break;
        case STUB_FACTORY_CLASSNAME:
            assertTrue(rsf instanceof StubRowSetFactory);
            break;
        default:
    }
}
 
Example 16
@DataProvider(name = "RowSetFactoryValues")
private Object[][] RowSetFactoryValues() throws SQLException {
    RowSetFactory rsf = RowSetProvider.newFactory();
    RowSetFactory rsf1 = RowSetProvider.newFactory(STUB_FACTORY_CLASSNAME, null);
    RowSetFactory rsf2 = RowSetProvider.newFactory(DEFFAULT_FACTORY_CLASSNAME, null);
    return new Object[][]{
        {rsf, NO_VALADATE_IMPL},
        {rsf, DEFFAULT_FACTORY_CLASSNAME},
        {rsf1, STUB_FACTORY_CLASSNAME},
        {rsf2, DEFFAULT_FACTORY_CLASSNAME}
    };
}
 
Example 17
Source Project: jdk8u60   Source File: RowSetFactoryTests.java    License: GNU General Public License v2.0 5 votes vote down vote up
private void validateRowSetImpl(RowSetFactory rsf, String implName)
        throws SQLException {
    assertNotNull(rsf, "RowSetFactory should not be null");
    switch (implName) {
        case DEFAULT_CACHEDROWSET_CLASSNAME:
            assertTrue(rsf.createCachedRowSet() instanceof com.sun.rowset.CachedRowSetImpl);
            break;
        case DEFAULT_FILTEREDROWSET_CLASSNAME:
            assertTrue(rsf.createFilteredRowSet() instanceof com.sun.rowset.FilteredRowSetImpl);
            break;
        case DEFAULT_JDBCROWSET_CLASSNAME:
            assertTrue(rsf.createJdbcRowSet() instanceof com.sun.rowset.JdbcRowSetImpl);
            break;
        case DEFAULT_JOINROWSET_CLASSNAME:
            assertTrue(rsf.createJoinRowSet() instanceof com.sun.rowset.JoinRowSetImpl);
            break;
        case DEFAULT_WEBROWSET_CLASSNAME:
            assertTrue(rsf.createWebRowSet() instanceof com.sun.rowset.WebRowSetImpl);
            break;
        case STUB_CACHEDROWSET_CLASSNAME:
            assertTrue(rsf.createCachedRowSet() instanceof util.StubCachedRowSetImpl);
            break;
        case STUB_FILTEREDROWSET_CLASSNAME:
            assertTrue(rsf.createFilteredRowSet() instanceof util.StubFilteredRowSetImpl);
            break;
        case STUB_JDBCROWSET_CLASSNAME:
            assertTrue(rsf.createJdbcRowSet() instanceof util.StubJdbcRowSetImpl);
            break;
        case STUB_WEBROWSET_CLASSNAME:
            assertTrue(rsf.createWebRowSet() instanceof util.StubWebRowSetImpl);
            break;
    }

}
 
Example 18
Source Project: jdk8u60   Source File: RowSetProviderTests.java    License: GNU General Public License v2.0 5 votes vote down vote up
private void validateProvider(RowSetFactory rsf, String implName) {
    assertNotNull(rsf, "RowSetFactory should not be null");
    switch (implName) {
        case DEFFAULT_FACTORY_CLASSNAME:
            assertTrue(rsf instanceof RowSetFactoryImpl);
            break;
        case STUB_FACTORY_CLASSNAME:
            assertTrue(rsf instanceof StubRowSetFactory);
            break;
        default:
    }
}
 
Example 19
Source Project: jdk8u60   Source File: RowSetProviderTests.java    License: GNU General Public License v2.0 5 votes vote down vote up
@DataProvider(name = "RowSetFactoryValues")
private Object[][] RowSetFactoryValues() throws SQLException {
    RowSetFactory rsf = RowSetProvider.newFactory();
    RowSetFactory rsf1 = RowSetProvider.newFactory(STUB_FACTORY_CLASSNAME, null);
    RowSetFactory rsf2 = RowSetProvider.newFactory(DEFFAULT_FACTORY_CLASSNAME, null);
    return new Object[][]{
        {rsf, NO_VALADATE_IMPL},
        {rsf, DEFFAULT_FACTORY_CLASSNAME},
        {rsf1, STUB_FACTORY_CLASSNAME},
        {rsf2, DEFFAULT_FACTORY_CLASSNAME}
    };
}
 
Example 20
Source Project: cactoos-jdbc   Source File: StatementSelect.java    License: MIT License 5 votes vote down vote up
@Override
public ResultSet result() throws Exception {
    // @checkstyle NestedTryDepthCheck (10 lines)
    try (Connection conn = this.session.connection()) {
        try (PreparedStatement stmt = this.query.prepared(conn)) {
            try (ResultSet rset = stmt.executeQuery()) {
                final RowSetFactory rsf = RowSetProvider.newFactory();
                final CachedRowSet crs = rsf.createCachedRowSet();
                crs.populate(rset);
                return crs;
            }
        }
    }
}
 
Example 21
private void validateRowSetImpl(RowSetFactory rsf, String implName)
        throws SQLException {
    assertNotNull(rsf, "RowSetFactory should not be null");
    switch (implName) {
        case DEFAULT_CACHEDROWSET_CLASSNAME:
            assertTrue(rsf.createCachedRowSet() instanceof com.sun.rowset.CachedRowSetImpl);
            break;
        case DEFAULT_FILTEREDROWSET_CLASSNAME:
            assertTrue(rsf.createFilteredRowSet() instanceof com.sun.rowset.FilteredRowSetImpl);
            break;
        case DEFAULT_JDBCROWSET_CLASSNAME:
            assertTrue(rsf.createJdbcRowSet() instanceof com.sun.rowset.JdbcRowSetImpl);
            break;
        case DEFAULT_JOINROWSET_CLASSNAME:
            assertTrue(rsf.createJoinRowSet() instanceof com.sun.rowset.JoinRowSetImpl);
            break;
        case DEFAULT_WEBROWSET_CLASSNAME:
            assertTrue(rsf.createWebRowSet() instanceof com.sun.rowset.WebRowSetImpl);
            break;
        case STUB_CACHEDROWSET_CLASSNAME:
            assertTrue(rsf.createCachedRowSet() instanceof util.StubCachedRowSetImpl);
            break;
        case STUB_FILTEREDROWSET_CLASSNAME:
            assertTrue(rsf.createFilteredRowSet() instanceof util.StubFilteredRowSetImpl);
            break;
        case STUB_JDBCROWSET_CLASSNAME:
            assertTrue(rsf.createJdbcRowSet() instanceof util.StubJdbcRowSetImpl);
            break;
        case STUB_WEBROWSET_CLASSNAME:
            assertTrue(rsf.createWebRowSet() instanceof util.StubWebRowSetImpl);
            break;
    }

}
 
Example 22
private void validateProvider(RowSetFactory rsf, String implName) {
    assertNotNull(rsf, "RowSetFactory should not be null");
    switch (implName) {
        case DEFFAULT_FACTORY_CLASSNAME:
            assertTrue(rsf instanceof RowSetFactoryImpl);
            break;
        case STUB_FACTORY_CLASSNAME:
            assertTrue(rsf instanceof StubRowSetFactory);
            break;
        default:
    }
}
 
Example 23
@DataProvider(name = "RowSetFactoryValues")
private Object[][] RowSetFactoryValues() throws SQLException {
    RowSetFactory rsf = RowSetProvider.newFactory();
    RowSetFactory rsf1 = RowSetProvider.newFactory(STUB_FACTORY_CLASSNAME, null);
    RowSetFactory rsf2 = RowSetProvider.newFactory(DEFFAULT_FACTORY_CLASSNAME, null);
    return new Object[][]{
        {rsf, NO_VALADATE_IMPL},
        {rsf, DEFFAULT_FACTORY_CLASSNAME},
        {rsf1, STUB_FACTORY_CLASSNAME},
        {rsf2, DEFFAULT_FACTORY_CLASSNAME}
    };
}
 
Example 24
private void validateRowSetImpl(RowSetFactory rsf, String implName)
        throws SQLException {
    assertNotNull(rsf, "RowSetFactory should not be null");
    switch (implName) {
        case DEFAULT_CACHEDROWSET_CLASSNAME:
            assertTrue(rsf.createCachedRowSet() instanceof com.sun.rowset.CachedRowSetImpl);
            break;
        case DEFAULT_FILTEREDROWSET_CLASSNAME:
            assertTrue(rsf.createFilteredRowSet() instanceof com.sun.rowset.FilteredRowSetImpl);
            break;
        case DEFAULT_JDBCROWSET_CLASSNAME:
            assertTrue(rsf.createJdbcRowSet() instanceof com.sun.rowset.JdbcRowSetImpl);
            break;
        case DEFAULT_JOINROWSET_CLASSNAME:
            assertTrue(rsf.createJoinRowSet() instanceof com.sun.rowset.JoinRowSetImpl);
            break;
        case DEFAULT_WEBROWSET_CLASSNAME:
            assertTrue(rsf.createWebRowSet() instanceof com.sun.rowset.WebRowSetImpl);
            break;
        case STUB_CACHEDROWSET_CLASSNAME:
            assertTrue(rsf.createCachedRowSet() instanceof util.StubCachedRowSetImpl);
            break;
        case STUB_FILTEREDROWSET_CLASSNAME:
            assertTrue(rsf.createFilteredRowSet() instanceof util.StubFilteredRowSetImpl);
            break;
        case STUB_JDBCROWSET_CLASSNAME:
            assertTrue(rsf.createJdbcRowSet() instanceof util.StubJdbcRowSetImpl);
            break;
        case STUB_WEBROWSET_CLASSNAME:
            assertTrue(rsf.createWebRowSet() instanceof util.StubWebRowSetImpl);
            break;
    }

}
 
Example 25
private void validateProvider(RowSetFactory rsf, String implName) {
    assertNotNull(rsf, "RowSetFactory should not be null");
    switch (implName) {
        case DEFFAULT_FACTORY_CLASSNAME:
            assertTrue(rsf instanceof RowSetFactoryImpl);
            break;
        case STUB_FACTORY_CLASSNAME:
            assertTrue(rsf instanceof StubRowSetFactory);
            break;
        default:
    }
}
 
Example 26
@DataProvider(name = "RowSetFactoryValues")
private Object[][] RowSetFactoryValues() throws SQLException {
    RowSetFactory rsf = RowSetProvider.newFactory();
    RowSetFactory rsf1 = RowSetProvider.newFactory(STUB_FACTORY_CLASSNAME, null);
    RowSetFactory rsf2 = RowSetProvider.newFactory(DEFFAULT_FACTORY_CLASSNAME, null);
    return new Object[][]{
        {rsf, NO_VALADATE_IMPL},
        {rsf, DEFFAULT_FACTORY_CLASSNAME},
        {rsf1, STUB_FACTORY_CLASSNAME},
        {rsf2, DEFFAULT_FACTORY_CLASSNAME}
    };
}
 
Example 27
private void validateRowSetImpl(RowSetFactory rsf, String implName)
        throws SQLException {
    assertNotNull(rsf, "RowSetFactory should not be null");
    switch (implName) {
        case DEFAULT_CACHEDROWSET_CLASSNAME:
            assertTrue(rsf.createCachedRowSet() instanceof com.sun.rowset.CachedRowSetImpl);
            break;
        case DEFAULT_FILTEREDROWSET_CLASSNAME:
            assertTrue(rsf.createFilteredRowSet() instanceof com.sun.rowset.FilteredRowSetImpl);
            break;
        case DEFAULT_JDBCROWSET_CLASSNAME:
            assertTrue(rsf.createJdbcRowSet() instanceof com.sun.rowset.JdbcRowSetImpl);
            break;
        case DEFAULT_JOINROWSET_CLASSNAME:
            assertTrue(rsf.createJoinRowSet() instanceof com.sun.rowset.JoinRowSetImpl);
            break;
        case DEFAULT_WEBROWSET_CLASSNAME:
            assertTrue(rsf.createWebRowSet() instanceof com.sun.rowset.WebRowSetImpl);
            break;
        case STUB_CACHEDROWSET_CLASSNAME:
            assertTrue(rsf.createCachedRowSet() instanceof util.StubCachedRowSetImpl);
            break;
        case STUB_FILTEREDROWSET_CLASSNAME:
            assertTrue(rsf.createFilteredRowSet() instanceof util.StubFilteredRowSetImpl);
            break;
        case STUB_JDBCROWSET_CLASSNAME:
            assertTrue(rsf.createJdbcRowSet() instanceof util.StubJdbcRowSetImpl);
            break;
        case STUB_WEBROWSET_CLASSNAME:
            assertTrue(rsf.createWebRowSet() instanceof util.StubWebRowSetImpl);
            break;
    }

}
 
Example 28
private void validateProvider(RowSetFactory rsf, String implName) {
    assertNotNull(rsf, "RowSetFactory should not be null");
    switch (implName) {
        case DEFFAULT_FACTORY_CLASSNAME:
            assertTrue(rsf instanceof RowSetFactoryImpl);
            break;
        case STUB_FACTORY_CLASSNAME:
            assertTrue(rsf instanceof StubRowSetFactory);
            break;
        default:
    }
}
 
Example 29
@DataProvider(name = "RowSetFactoryValues")
private Object[][] RowSetFactoryValues() throws SQLException {
    RowSetFactory rsf = RowSetProvider.newFactory();
    RowSetFactory rsf1 = RowSetProvider.newFactory(STUB_FACTORY_CLASSNAME, null);
    RowSetFactory rsf2 = RowSetProvider.newFactory(DEFFAULT_FACTORY_CLASSNAME, null);
    return new Object[][]{
        {rsf, NO_VALADATE_IMPL},
        {rsf, DEFFAULT_FACTORY_CLASSNAME},
        {rsf1, STUB_FACTORY_CLASSNAME},
        {rsf2, DEFFAULT_FACTORY_CLASSNAME}
    };
}
 
Example 30
Source Project: jdk8u-jdk   Source File: RowSetFactoryTests.java    License: GNU General Public License v2.0 5 votes vote down vote up
private void validateRowSetImpl(RowSetFactory rsf, String implName)
        throws SQLException {
    assertNotNull(rsf, "RowSetFactory should not be null");
    switch (implName) {
        case DEFAULT_CACHEDROWSET_CLASSNAME:
            assertTrue(rsf.createCachedRowSet() instanceof com.sun.rowset.CachedRowSetImpl);
            break;
        case DEFAULT_FILTEREDROWSET_CLASSNAME:
            assertTrue(rsf.createFilteredRowSet() instanceof com.sun.rowset.FilteredRowSetImpl);
            break;
        case DEFAULT_JDBCROWSET_CLASSNAME:
            assertTrue(rsf.createJdbcRowSet() instanceof com.sun.rowset.JdbcRowSetImpl);
            break;
        case DEFAULT_JOINROWSET_CLASSNAME:
            assertTrue(rsf.createJoinRowSet() instanceof com.sun.rowset.JoinRowSetImpl);
            break;
        case DEFAULT_WEBROWSET_CLASSNAME:
            assertTrue(rsf.createWebRowSet() instanceof com.sun.rowset.WebRowSetImpl);
            break;
        case STUB_CACHEDROWSET_CLASSNAME:
            assertTrue(rsf.createCachedRowSet() instanceof util.StubCachedRowSetImpl);
            break;
        case STUB_FILTEREDROWSET_CLASSNAME:
            assertTrue(rsf.createFilteredRowSet() instanceof util.StubFilteredRowSetImpl);
            break;
        case STUB_JDBCROWSET_CLASSNAME:
            assertTrue(rsf.createJdbcRowSet() instanceof util.StubJdbcRowSetImpl);
            break;
        case STUB_WEBROWSET_CLASSNAME:
            assertTrue(rsf.createWebRowSet() instanceof util.StubWebRowSetImpl);
            break;
    }

}