Search in sources :

Example 1 with JoinRowSet

use of javax.sql.rowset.JoinRowSet in project jdk8u_jdk by JetBrains.

the class JoinRowSetTests method joinRowSetTests0005.

/*
     * Join two CachedRowSets specifying a column name to join against
     */
@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();
    }
}
Also used : JoinRowSet(javax.sql.rowset.JoinRowSet) Test(org.testng.annotations.Test)

Example 2 with JoinRowSet

use of javax.sql.rowset.JoinRowSet in project jdk8u_jdk by JetBrains.

the class JoinRowSetTests method joinRowSetTests0006.

/*
     * Join two CachedRowSets specifying a column index to join against
     */
@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();
    }
}
Also used : JoinRowSet(javax.sql.rowset.JoinRowSet) Test(org.testng.annotations.Test)

Example 3 with JoinRowSet

use of javax.sql.rowset.JoinRowSet in project jdk8u_jdk by JetBrains.

the class JoinRowSetTests method joinRowSetTests0000.

/*
     * Join two CachedRowSets specifying a column name to join against
     */
@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();
    }
}
Also used : JoinRowSet(javax.sql.rowset.JoinRowSet) Test(org.testng.annotations.Test)

Example 4 with JoinRowSet

use of javax.sql.rowset.JoinRowSet in project jdk8u_jdk by JetBrains.

the class JoinRowSetTests method joinRowSetTests0003.

/*
     * Join two CachedRowSets specifying a column index to join against
     */
@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();
    }
}
Also used : JoinRowSet(javax.sql.rowset.JoinRowSet) JoinRowSet(javax.sql.rowset.JoinRowSet) WebRowSet(javax.sql.rowset.WebRowSet) CachedRowSet(javax.sql.rowset.CachedRowSet) RowSet(javax.sql.RowSet) Test(org.testng.annotations.Test)

Example 5 with JoinRowSet

use of javax.sql.rowset.JoinRowSet in project jdk8u_jdk by JetBrains.

the class JoinRowSetTests method joinRowSetTests0002.

/*
     * Join two CachedRowSets specifying a column name to join against
     */
@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();
    }
}
Also used : JoinRowSet(javax.sql.rowset.JoinRowSet) JoinRowSet(javax.sql.rowset.JoinRowSet) WebRowSet(javax.sql.rowset.WebRowSet) CachedRowSet(javax.sql.rowset.CachedRowSet) RowSet(javax.sql.RowSet) Test(org.testng.annotations.Test)

Aggregations

JoinRowSet (javax.sql.rowset.JoinRowSet)6 Test (org.testng.annotations.Test)6 RowSet (javax.sql.RowSet)2 CachedRowSet (javax.sql.rowset.CachedRowSet)2 WebRowSet (javax.sql.rowset.WebRowSet)2