javax.sql.rowset.JoinRowSet Java Examples

The following examples show how to use javax.sql.rowset.JoinRowSet. 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: JoinRowSetTests.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
@Test(dataProvider = "createCachedRowSetsToUse")
public void joinRowSetTests0006(CachedRowSet crs, CachedRowSet crs1)
        throws Exception {

    try (JoinRowSet jrs = newInstance()) {
        crs.setMatchColumn(COFFEES_JOIN_COLUMN_INDEX);
        crs1.setMatchColumn(SUPPLIERS_JOIN_COLUMN_INDEX);

        jrs.addRowSet(crs);
        jrs.addRowSet(crs1);
        validateResults(jrs);
        crs.close();
        crs1.close();
    }
}
 
Example #2
Source File: JoinRowSetTests.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
@Test(dataProvider = "createCachedRowSetsToUse")
public void joinRowSetTests0003(CachedRowSet crs, CachedRowSet crs1)
        throws Exception {

    try (JoinRowSet jrs = newInstance()) {
        RowSet[] rowsets = {crs, crs1};
        int[] joinCols = {COFFEES_JOIN_COLUMN_INDEX,
            SUPPLIERS_JOIN_COLUMN_INDEX};
        jrs.addRowSet(rowsets, joinCols);
        validateResults(jrs);
        crs.close();
        crs1.close();
    }
}
 
Example #3
Source File: JoinRowSetTests.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
@Test(dataProvider = "createCachedRowSetsToUse")
public void joinRowSetTests0006(CachedRowSet crs, CachedRowSet crs1)
        throws Exception {

    try (JoinRowSet jrs = newInstance()) {
        crs.setMatchColumn(COFFEES_JOIN_COLUMN_INDEX);
        crs1.setMatchColumn(SUPPLIERS_JOIN_COLUMN_INDEX);

        jrs.addRowSet(crs);
        jrs.addRowSet(crs1);
        validateResults(jrs);
        crs.close();
        crs1.close();
    }
}
 
Example #4
Source File: JoinRowSetTests.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
@Test(dataProvider = "createCachedRowSetsToUse")
public void joinRowSetTests0005(CachedRowSet crs, CachedRowSet crs1)
        throws Exception {

    try (JoinRowSet jrs = newInstance()) {
        crs.setMatchColumn(JOIN_COLNAME);
        crs1.setMatchColumn(JOIN_COLNAME);
        jrs.addRowSet(crs);
        jrs.addRowSet(crs1);
        validateResults(jrs);
        crs.close();
        crs1.close();
    }
}
 
Example #5
Source File: JoinRowSetTests.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
private void validateResults(final JoinRowSet jrs) throws SQLException {
    List<Integer> results = new ArrayList<>();
    jrs.beforeFirst();
    while (jrs.next()) {
        if (jrs.getInt(JOIN_COLNAME) == SUP_ID) {
            results.add(jrs.getInt("COF_ID"));
        }
    }
    assertEquals(results.toArray(), EXPECTED);
}
 
Example #6
Source File: JoinRowSetTests.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
@Test(dataProvider = "createCachedRowSetsToUse")
public void joinRowSetTests0003(CachedRowSet crs, CachedRowSet crs1)
        throws Exception {

    try (JoinRowSet jrs = newInstance()) {
        RowSet[] rowsets = {crs, crs1};
        int[] joinCols = {COFFEES_JOIN_COLUMN_INDEX,
            SUPPLIERS_JOIN_COLUMN_INDEX};
        jrs.addRowSet(rowsets, joinCols);
        validateResults(jrs);
        crs.close();
        crs1.close();
    }
}
 
Example #7
Source File: JoinRowSetTests.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private void validateResults(final JoinRowSet jrs) throws SQLException {
    List<Integer> results = new ArrayList<>();
    jrs.beforeFirst();
    while (jrs.next()) {
        if (jrs.getInt(JOIN_COLNAME) == SUP_ID) {
            results.add(jrs.getInt("COF_ID"));
        }
    }
    assertEquals(results.toArray(), EXPECTED);
}
 
Example #8
Source File: JoinRowSetTests.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
@Test(dataProvider = "createCachedRowSetsToUse")
public void joinRowSetTests0002(CachedRowSet crs, CachedRowSet crs1)
        throws Exception {

    try (JoinRowSet jrs = newInstance()) {
        RowSet[] rowsets = {crs, crs1};
        String[] joinCols = {JOIN_COLNAME, JOIN_COLNAME};
        jrs.addRowSet(rowsets, joinCols);
        validateResults(jrs);
        crs.close();
        crs1.close();
    }
}
 
Example #9
Source File: JoinRowSetTests.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
@Test(dataProvider = "createCachedRowSetsToUse")
public void joinRowSetTests0001(CachedRowSet crs, CachedRowSet crs1)
        throws Exception {

    try (JoinRowSet jrs = newInstance()) {
        jrs.addRowSet(crs, COFFEES_JOIN_COLUMN_INDEX);
        jrs.addRowSet(crs1, SUPPLIERS_JOIN_COLUMN_INDEX);
        validateResults(jrs);
        crs.close();
        crs1.close();
    }
}
 
Example #10
Source File: JoinRowSetTests.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
@Test(dataProvider = "createCachedRowSetsToUse")
public void joinRowSetTests0002(CachedRowSet crs, CachedRowSet crs1)
        throws Exception {

    try (JoinRowSet jrs = newInstance()) {
        RowSet[] rowsets = {crs, crs1};
        String[] joinCols = {JOIN_COLNAME, JOIN_COLNAME};
        jrs.addRowSet(rowsets, joinCols);
        validateResults(jrs);
        crs.close();
        crs1.close();
    }
}
 
Example #11
Source File: JoinRowSetTests.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
@Test(dataProvider = "createCachedRowSetsToUse")
public void joinRowSetTests0003(CachedRowSet crs, CachedRowSet crs1)
        throws Exception {

    try (JoinRowSet jrs = newInstance()) {
        RowSet[] rowsets = {crs, crs1};
        int[] joinCols = {COFFEES_JOIN_COLUMN_INDEX,
            SUPPLIERS_JOIN_COLUMN_INDEX};
        jrs.addRowSet(rowsets, joinCols);
        validateResults(jrs);
        crs.close();
        crs1.close();
    }
}
 
Example #12
Source File: JoinRowSetTests.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
@Test(dataProvider = "createCachedRowSetsToUse")
public void joinRowSetTests0005(CachedRowSet crs, CachedRowSet crs1)
        throws Exception {

    try (JoinRowSet jrs = newInstance()) {
        crs.setMatchColumn(JOIN_COLNAME);
        crs1.setMatchColumn(JOIN_COLNAME);
        jrs.addRowSet(crs);
        jrs.addRowSet(crs1);
        validateResults(jrs);
        crs.close();
        crs1.close();
    }
}
 
Example #13
Source File: JoinRowSetTests.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
@Test(dataProvider = "createCachedRowSetsToUse")
public void joinRowSetTests0005(CachedRowSet crs, CachedRowSet crs1)
        throws Exception {

    try (JoinRowSet jrs = newInstance()) {
        crs.setMatchColumn(JOIN_COLNAME);
        crs1.setMatchColumn(JOIN_COLNAME);
        jrs.addRowSet(crs);
        jrs.addRowSet(crs1);
        validateResults(jrs);
        crs.close();
        crs1.close();
    }
}
 
Example #14
Source File: JoinRowSetTests.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
@Test(dataProvider = "createCachedRowSetsToUse")
public void joinRowSetTests0005(CachedRowSet crs, CachedRowSet crs1)
        throws Exception {

    try (JoinRowSet jrs = newInstance()) {
        crs.setMatchColumn(JOIN_COLNAME);
        crs1.setMatchColumn(JOIN_COLNAME);
        jrs.addRowSet(crs);
        jrs.addRowSet(crs1);
        validateResults(jrs);
        crs.close();
        crs1.close();
    }
}
 
Example #15
Source File: JoinRowSetTests.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
@Test(dataProvider = "createCachedRowSetsToUse")
public void joinRowSetTests0003(CachedRowSet crs, CachedRowSet crs1)
        throws Exception {

    try (JoinRowSet jrs = newInstance()) {
        RowSet[] rowsets = {crs, crs1};
        int[] joinCols = {COFFEES_JOIN_COLUMN_INDEX,
            SUPPLIERS_JOIN_COLUMN_INDEX};
        jrs.addRowSet(rowsets, joinCols);
        validateResults(jrs);
        crs.close();
        crs1.close();
    }
}
 
Example #16
Source File: JoinRowSetTests.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
@Test(dataProvider = "createCachedRowSetsToUse")
public void joinRowSetTests0005(CachedRowSet crs, CachedRowSet crs1)
        throws Exception {

    try (JoinRowSet jrs = newInstance()) {
        crs.setMatchColumn(JOIN_COLNAME);
        crs1.setMatchColumn(JOIN_COLNAME);
        jrs.addRowSet(crs);
        jrs.addRowSet(crs1);
        validateResults(jrs);
        crs.close();
        crs1.close();
    }
}
 
Example #17
Source File: JoinRowSetTests.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private void validateResults(final JoinRowSet jrs) throws SQLException {
    List<Integer> results = new ArrayList<>();
    jrs.beforeFirst();
    while (jrs.next()) {
        if (jrs.getInt(JOIN_COLNAME) == SUP_ID) {
            results.add(jrs.getInt("COF_ID"));
        }
    }
    assertEquals(results.toArray(), EXPECTED);
}
 
Example #18
Source File: JoinRowSetTests.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
@Test(dataProvider = "createCachedRowSetsToUse")
public void joinRowSetTests0000(CachedRowSet crs, CachedRowSet crs1)
        throws Exception {

    try (JoinRowSet jrs = newInstance()) {
        jrs.addRowSet(crs, JOIN_COLNAME);
        jrs.addRowSet(crs1, JOIN_COLNAME);
        validateResults(jrs);
        crs.close();
        crs1.close();
    }
}
 
Example #19
Source File: JoinRowSetTests.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
@Test(dataProvider = "createCachedRowSetsToUse")
public void joinRowSetTests0001(CachedRowSet crs, CachedRowSet crs1)
        throws Exception {

    try (JoinRowSet jrs = newInstance()) {
        jrs.addRowSet(crs, COFFEES_JOIN_COLUMN_INDEX);
        jrs.addRowSet(crs1, SUPPLIERS_JOIN_COLUMN_INDEX);
        validateResults(jrs);
        crs.close();
        crs1.close();
    }
}
 
Example #20
Source File: JoinRowSetTests.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
@Test(dataProvider = "createCachedRowSetsToUse")
public void joinRowSetTests0002(CachedRowSet crs, CachedRowSet crs1)
        throws Exception {

    try (JoinRowSet jrs = newInstance()) {
        RowSet[] rowsets = {crs, crs1};
        String[] joinCols = {JOIN_COLNAME, JOIN_COLNAME};
        jrs.addRowSet(rowsets, joinCols);
        validateResults(jrs);
        crs.close();
        crs1.close();
    }
}
 
Example #21
Source File: JoinRowSetTests.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
@Test(dataProvider = "createCachedRowSetsToUse")
public void joinRowSetTests0003(CachedRowSet crs, CachedRowSet crs1)
        throws Exception {

    try (JoinRowSet jrs = newInstance()) {
        RowSet[] rowsets = {crs, crs1};
        int[] joinCols = {COFFEES_JOIN_COLUMN_INDEX,
            SUPPLIERS_JOIN_COLUMN_INDEX};
        jrs.addRowSet(rowsets, joinCols);
        validateResults(jrs);
        crs.close();
        crs1.close();
    }
}
 
Example #22
Source File: JoinRowSetTests.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
@Test(dataProvider = "createCachedRowSetsToUse")
public void joinRowSetTests0005(CachedRowSet crs, CachedRowSet crs1)
        throws Exception {

    try (JoinRowSet jrs = newInstance()) {
        crs.setMatchColumn(JOIN_COLNAME);
        crs1.setMatchColumn(JOIN_COLNAME);
        jrs.addRowSet(crs);
        jrs.addRowSet(crs1);
        validateResults(jrs);
        crs.close();
        crs1.close();
    }
}
 
Example #23
Source File: JoinRowSetTests.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
@Test(dataProvider = "createCachedRowSetsToUse")
public void joinRowSetTests0006(CachedRowSet crs, CachedRowSet crs1)
        throws Exception {

    try (JoinRowSet jrs = newInstance()) {
        crs.setMatchColumn(COFFEES_JOIN_COLUMN_INDEX);
        crs1.setMatchColumn(SUPPLIERS_JOIN_COLUMN_INDEX);

        jrs.addRowSet(crs);
        jrs.addRowSet(crs1);
        validateResults(jrs);
        crs.close();
        crs1.close();
    }
}
 
Example #24
Source File: JoinRowSetTests.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
@Test(dataProvider = "createCachedRowSetsToUse")
public void joinRowSetTests0002(CachedRowSet crs, CachedRowSet crs1)
        throws Exception {

    try (JoinRowSet jrs = newInstance()) {
        RowSet[] rowsets = {crs, crs1};
        String[] joinCols = {JOIN_COLNAME, JOIN_COLNAME};
        jrs.addRowSet(rowsets, joinCols);
        validateResults(jrs);
        crs.close();
        crs1.close();
    }
}
 
Example #25
Source File: JoinRowSetTests.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
@Test(dataProvider = "createCachedRowSetsToUse")
public void joinRowSetTests0001(CachedRowSet crs, CachedRowSet crs1)
        throws Exception {

    try (JoinRowSet jrs = newInstance()) {
        jrs.addRowSet(crs, COFFEES_JOIN_COLUMN_INDEX);
        jrs.addRowSet(crs1, SUPPLIERS_JOIN_COLUMN_INDEX);
        validateResults(jrs);
        crs.close();
        crs1.close();
    }
}
 
Example #26
Source File: JoinRowSetTests.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
@Test(dataProvider = "createCachedRowSetsToUse")
public void joinRowSetTests0000(CachedRowSet crs, CachedRowSet crs1)
        throws Exception {

    try (JoinRowSet jrs = newInstance()) {
        jrs.addRowSet(crs, JOIN_COLNAME);
        jrs.addRowSet(crs1, JOIN_COLNAME);
        validateResults(jrs);
        crs.close();
        crs1.close();
    }
}
 
Example #27
Source File: JoinRowSetTests.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private void validateResults(final JoinRowSet jrs) throws SQLException {
    List<Integer> results = new ArrayList<>();
    jrs.beforeFirst();
    while (jrs.next()) {
        if (jrs.getInt(JOIN_COLNAME) == SUP_ID) {
            results.add(jrs.getInt("COF_ID"));
        }
    }
    assertEquals(results.toArray(), EXPECTED);
}
 
Example #28
Source File: JoinRowSetTests.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
@Test(dataProvider = "createCachedRowSetsToUse")
public void joinRowSetTests0000(CachedRowSet crs, CachedRowSet crs1)
        throws Exception {

    try (JoinRowSet jrs = newInstance()) {
        jrs.addRowSet(crs, JOIN_COLNAME);
        jrs.addRowSet(crs1, JOIN_COLNAME);
        validateResults(jrs);
        crs.close();
        crs1.close();
    }
}
 
Example #29
Source File: JoinRowSetTests.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
@Test(dataProvider = "createCachedRowSetsToUse")
public void joinRowSetTests0001(CachedRowSet crs, CachedRowSet crs1)
        throws Exception {

    try (JoinRowSet jrs = newInstance()) {
        jrs.addRowSet(crs, COFFEES_JOIN_COLUMN_INDEX);
        jrs.addRowSet(crs1, SUPPLIERS_JOIN_COLUMN_INDEX);
        validateResults(jrs);
        crs.close();
        crs1.close();
    }
}
 
Example #30
Source File: JoinRowSetTests.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
@Test(dataProvider = "createCachedRowSetsToUse")
public void joinRowSetTests0002(CachedRowSet crs, CachedRowSet crs1)
        throws Exception {

    try (JoinRowSet jrs = newInstance()) {
        RowSet[] rowsets = {crs, crs1};
        String[] joinCols = {JOIN_COLNAME, JOIN_COLNAME};
        jrs.addRowSet(rowsets, joinCols);
        validateResults(jrs);
        crs.close();
        crs1.close();
    }
}