javax.sql.rowset.RowSetFactory Java Examples

The following examples show how to use javax.sql.rowset.RowSetFactory. 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
Source File: RowSetFactoryTests.java    From dragonwell8_jdk with 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 #2
Source File: RowSetFactoryTests.java    From TencentKona-8 with 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 #3
Source File: RowSetFactoryTests.java    From jdk8u60 with 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
Source File: RowSetFactoryTests.java    From openjdk-jdk8u with 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 #5
Source File: RowSetFactoryTests.java    From openjdk-jdk8u-backup with 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 #6
Source File: RowSetFactoryTests.java    From openjdk-jdk9 with 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 #7
Source File: RowSetFactoryTests.java    From jdk8u-jdk with 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 File: RowSetFactoryTests.java    From hottub with 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 File: RowSetFactoryTests.java    From jdk8u_jdk with 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 File: JdbcRowSetLiveTest.java    From tutorials with 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
Source File: RowSetFactoryTests.java    From dragonwell8_jdk with 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 #12
Source File: RowSetProviderTests.java    From dragonwell8_jdk with 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 #13
Source File: RowSetProviderTests.java    From dragonwell8_jdk with 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 #14
Source File: RowSetFactoryTests.java    From TencentKona-8 with 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 #15
Source File: RowSetProviderTests.java    From TencentKona-8 with 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 #16
Source File: RowSetProviderTests.java    From TencentKona-8 with 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 #17
Source File: RowSetFactoryTests.java    From jdk8u60 with 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 File: RowSetProviderTests.java    From jdk8u60 with 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 File: RowSetProviderTests.java    From jdk8u60 with 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 File: StatementSelect.java    From cactoos-jdbc with 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
Source File: RowSetFactoryTests.java    From openjdk-jdk8u with 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 #22
Source File: RowSetProviderTests.java    From openjdk-jdk8u with 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 #23
Source File: RowSetProviderTests.java    From openjdk-jdk8u with 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 #24
Source File: RowSetFactoryTests.java    From openjdk-jdk8u-backup with 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 #25
Source File: RowSetProviderTests.java    From openjdk-jdk8u-backup with 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 #26
Source File: RowSetProviderTests.java    From openjdk-jdk8u-backup with 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 #27
Source File: RowSetFactoryTests.java    From openjdk-jdk9 with 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 #28
Source File: RowSetProviderTests.java    From openjdk-jdk9 with 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 #29
Source File: RowSetProviderTests.java    From openjdk-jdk9 with 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 #30
Source File: RowSetFactoryTests.java    From jdk8u-jdk with 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;
    }

}