Java Code Examples for javax.sql.rowset.RowSetProvider#newFactory()

The following examples show how to use javax.sql.rowset.RowSetProvider#newFactory() . 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 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 3
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 4
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 5
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 6
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 7
Source File: CommonRowSetTests.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
public CommonRowSetTests() {
    try {
        rsf = RowSetProvider.newFactory();
    } catch (SQLException ex) {
        Assert.fail(ex.getMessage());
    }
}
 
Example 8
Source File: CommonRowSetTests.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public CommonRowSetTests() {
    try {
        rsf = RowSetProvider.newFactory();
    } catch (SQLException ex) {
        Assert.fail(ex.getMessage());
    }
}
 
Example 9
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 10
Source File: SqlRowSetResultSetExtractor.java    From effectivejava with Apache License 2.0 5 votes vote down vote up
public StandardCachedRowSetFactory() {
	try {
		this.rowSetFactory = RowSetProvider.newFactory();
	}
	catch (SQLException ex) {
		throw new IllegalStateException("Cannot create RowSetFactory through RowSetProvider", ex);
	}
}
 
Example 11
Source File: RowSetProviderTests.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
@Test(expectedExceptions = SQLException.class)
public void test05() throws Exception {
    File f = new File(jarPath + "badFactory");
    URLClassLoader loader = new URLClassLoader(new URL[]{
        new URL(f.toURI().toString())}, getClass().getClassLoader());
    Thread.currentThread().setContextClassLoader(loader);
    RowSetProvider.newFactory();
}
 
Example 12
Source File: RowSetProviderTests.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
@Test(expectedExceptions = SQLException.class)
public void test05() throws Exception {
    File f = new File(jarPath + "badFactory");
    URLClassLoader loader = new URLClassLoader(new URL[]{
        new URL(f.toURI().toString())}, getClass().getClassLoader());
    Thread.currentThread().setContextClassLoader(loader);
    RowSetProvider.newFactory();
}
 
Example 13
Source File: RowSetProviderTests.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
@Test(expectedExceptions = SQLException.class)
public void test05() throws Exception {
    File f = new File(jarPath + "badFactory");
    URLClassLoader loader = new URLClassLoader(new URL[]{
        new URL(f.toURI().toString())}, getClass().getClassLoader());
    Thread.currentThread().setContextClassLoader(loader);
    RowSetProvider.newFactory();
}
 
Example 14
Source File: SqlRowSetResultSetExtractor.java    From spring4-understanding with Apache License 2.0 5 votes vote down vote up
public StandardCachedRowSetFactory() {
	try {
		this.rowSetFactory = RowSetProvider.newFactory();
	}
	catch (SQLException ex) {
		throw new IllegalStateException("Cannot create RowSetFactory through RowSetProvider", ex);
	}
}
 
Example 15
Source File: CommonRowSetTests.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public CommonRowSetTests() {
    try {
        rsf = RowSetProvider.newFactory();
    } catch (SQLException ex) {
        Assert.fail(ex.getMessage());
    }
}
 
Example 16
Source File: RowSetProviderTests.java    From jdk8u_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 17
Source File: CommonRowSetTests.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
public CommonRowSetTests() {
    try {
        rsf = RowSetProvider.newFactory();
    } catch (SQLException ex) {
        Assert.fail(ex.getMessage());
    }
}
 
Example 18
Source File: RowSetProviderTests.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions = SQLException.class)
public void test03() throws SQLException {
    System.setProperty("javax.sql.rowset.RowSetFactory",
            "invalid.RowSetFactoryImpl");
    RowSetFactory rsf = RowSetProvider.newFactory();
}
 
Example 19
Source File: RowSetProviderTests.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions = SQLException.class)
public void test03() throws SQLException {
    System.setProperty("javax.sql.rowset.RowSetFactory",
            "invalid.RowSetFactoryImpl");
    RowSetFactory rsf = RowSetProvider.newFactory();
}
 
Example 20
Source File: RowSetProviderTests.java    From dragonwell8_jdk with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions = SQLException.class)
public void test03() throws SQLException {
    System.setProperty("javax.sql.rowset.RowSetFactory",
            "invalid.RowSetFactoryImpl");
    RowSetFactory rsf = RowSetProvider.newFactory();
}