Java Code Examples for javax.sql.RowSet#updateString()

The following examples show how to use javax.sql.RowSet#updateString() . 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: CommonCachedRowSetTests.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
@Test(dataProvider = "rowsetUsingCoffeeHouses")
public void commonCachedRowSetTest0007(RowSet rs) throws Exception {
    TestRowSetListener rsl = new TestRowSetListener();
    TestRowSetListener rsl2 = new TestRowSetListener();
    rs.addRowSetListener(rsl);
    rs.addRowSetListener(rsl2);
    rs.first();
    rs.updateInt(1, 1961);
    rs.updateString(2, "Pittsburgh");
    rs.updateInt(3, 1987);
    rs.updateInt(4, 2341);
    rs.updateInt(5, 6689);
    rs.updateRow();
    assertTrue(rsl.isNotified(TestRowSetListener.CURSOR_MOVED
            | TestRowSetListener.ROW_CHANGED));
    assertTrue(rsl2.isNotified(TestRowSetListener.CURSOR_MOVED
            | TestRowSetListener.ROW_CHANGED));
    rs.close();
}
 
Example 2
Source File: CommonCachedRowSetTests.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
@Test(dataProvider = "rowsetUsingCoffeeHouses")
public void commonCachedRowSetTest0007(RowSet rs) throws Exception {
    TestRowSetListener rsl = new TestRowSetListener();
    TestRowSetListener rsl2 = new TestRowSetListener();
    rs.addRowSetListener(rsl);
    rs.addRowSetListener(rsl2);
    rs.first();
    rs.updateInt(1, 1961);
    rs.updateString(2, "Pittsburgh");
    rs.updateInt(3, 1987);
    rs.updateInt(4, 2341);
    rs.updateInt(5, 6689);
    rs.updateRow();
    assertTrue(rsl.isNotified(TestRowSetListener.CURSOR_MOVED
            | TestRowSetListener.ROW_CHANGED));
    assertTrue(rsl2.isNotified(TestRowSetListener.CURSOR_MOVED
            | TestRowSetListener.ROW_CHANGED));
    rs.close();
}
 
Example 3
Source File: CommonCachedRowSetTests.java    From jdk8u_jdk with GNU General Public License v2.0 6 votes vote down vote up
@Test(dataProvider = "rowsetUsingCoffeeHouses")
public void commonCachedRowSetTest0007(RowSet rs) throws Exception {
    TestRowSetListener rsl = new TestRowSetListener();
    TestRowSetListener rsl2 = new TestRowSetListener();
    rs.addRowSetListener(rsl);
    rs.addRowSetListener(rsl2);
    rs.first();
    rs.updateInt(1, 1961);
    rs.updateString(2, "Pittsburgh");
    rs.updateInt(3, 1987);
    rs.updateInt(4, 2341);
    rs.updateInt(5, 6689);
    rs.updateRow();
    assertTrue(rsl.isNotified(TestRowSetListener.CURSOR_MOVED
            | TestRowSetListener.ROW_CHANGED));
    assertTrue(rsl2.isNotified(TestRowSetListener.CURSOR_MOVED
            | TestRowSetListener.ROW_CHANGED));
    rs.close();
}
 
Example 4
Source File: CommonCachedRowSetTests.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
@Test(dataProvider = "rowsetUsingCoffeeHouses")
public void commonCachedRowSetTest0007(RowSet rs) throws Exception {
    TestRowSetListener rsl = new TestRowSetListener();
    TestRowSetListener rsl2 = new TestRowSetListener();
    rs.addRowSetListener(rsl);
    rs.addRowSetListener(rsl2);
    rs.first();
    rs.updateInt(1, 1961);
    rs.updateString(2, "Pittsburgh");
    rs.updateInt(3, 1987);
    rs.updateInt(4, 2341);
    rs.updateInt(5, 6689);
    rs.updateRow();
    assertTrue(rsl.isNotified(TestRowSetListener.CURSOR_MOVED
            | TestRowSetListener.ROW_CHANGED));
    assertTrue(rsl2.isNotified(TestRowSetListener.CURSOR_MOVED
            | TestRowSetListener.ROW_CHANGED));
    rs.close();
}
 
Example 5
Source File: CommonCachedRowSetTests.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
protected void createDataTypesRows(RowSet crs) throws SQLException {

        Integer aInteger = 100;
        String aChar = "Oswald Cobblepot";
        Long aLong = Long.MAX_VALUE;
        Short aShort = Short.MAX_VALUE;
        Double aDouble = Double.MAX_VALUE;
        BigDecimal aBigDecimal = BigDecimal.ONE;
        Boolean aBoolean = false;
        Float aFloat = Float.MAX_VALUE;
        Byte aByte = Byte.MAX_VALUE;
        Date aDate = Date.valueOf(LocalDate.now());
        Time aTime = Time.valueOf(LocalTime.now());
        Timestamp aTimeStamp = Timestamp.valueOf(LocalDateTime.now());
        Array aArray = new StubArray("INTEGER", new Object[1]);
        Ref aRef = new SerialRef(new StubRef("INTEGER", query));
        byte[] bytes = new byte[10];
        crs.moveToInsertRow();
        crs.updateInt(1, aInteger);
        crs.updateString(2, aChar);
        crs.updateString(3, aChar);
        crs.updateLong(4, aLong);
        crs.updateBoolean(5, aBoolean);
        crs.updateShort(6, aShort);
        crs.updateDouble(7, aDouble);
        crs.updateBigDecimal(8, aBigDecimal);
        crs.updateFloat(9, aFloat);
        crs.updateByte(10, aByte);
        crs.updateDate(11, aDate);
        crs.updateTime(12, aTime);
        crs.updateTimestamp(13, aTimeStamp);
        crs.updateBytes(14, bytes);
        crs.updateArray(15, aArray);
        crs.updateRef(16, aRef);
        crs.updateDouble(17, aDouble);
        crs.insertRow();
        crs.moveToCurrentRow();

    }
 
Example 6
Source File: CommonCachedRowSetTests.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
@Test(dataProvider = "rowsetUsingCoffeeHouses")
public void commonCachedRowSetTest0006(RowSet rs) throws Exception {
    TestRowSetListener rsl = new TestRowSetListener();
    rs.addRowSetListener(rsl);
    rs.moveToInsertRow();
    rs.updateInt(1, 10024);
    rs.updateString(2, "Sacramento");
    rs.updateInt(3, 1987);
    rs.updateInt(4, 2341);
    rs.updateInt(5, 4328);
    rs.insertRow();
    assertTrue(rsl.isNotified(TestRowSetListener.ROW_CHANGED));
    rs.close();
}
 
Example 7
Source File: CommonCachedRowSetTests.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
@Test(dataProvider = "rowsetUsingCoffeeHouses")
public void commonCachedRowSetTest0006(RowSet rs) throws Exception {
    TestRowSetListener rsl = new TestRowSetListener();
    rs.addRowSetListener(rsl);
    rs.moveToInsertRow();
    rs.updateInt(1, 10024);
    rs.updateString(2, "Sacramento");
    rs.updateInt(3, 1987);
    rs.updateInt(4, 2341);
    rs.updateInt(5, 4328);
    rs.insertRow();
    assertTrue(rsl.isNotified(TestRowSetListener.ROW_CHANGED));
    rs.close();
}
 
Example 8
Source File: CommonCachedRowSetTests.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
protected void createDataTypesRows(RowSet crs) throws SQLException {

        Integer aInteger = 100;
        String aChar = "Oswald Cobblepot";
        Long aLong = Long.MAX_VALUE;
        Short aShort = Short.MAX_VALUE;
        Double aDouble = Double.MAX_VALUE;
        BigDecimal aBigDecimal = BigDecimal.ONE;
        Boolean aBoolean = false;
        Float aFloat = Float.MAX_VALUE;
        Byte aByte = Byte.MAX_VALUE;
        Date aDate = Date.valueOf(LocalDate.now());
        Time aTime = Time.valueOf(LocalTime.now());
        Timestamp aTimeStamp = Timestamp.valueOf(LocalDateTime.now());
        Array aArray = new StubArray("INTEGER", new Object[1]);
        Ref aRef = new SerialRef(new StubRef("INTEGER", query));
        byte[] bytes = new byte[10];
        crs.moveToInsertRow();
        crs.updateInt(1, aInteger);
        crs.updateString(2, aChar);
        crs.updateString(3, aChar);
        crs.updateLong(4, aLong);
        crs.updateBoolean(5, aBoolean);
        crs.updateShort(6, aShort);
        crs.updateDouble(7, aDouble);
        crs.updateBigDecimal(8, aBigDecimal);
        crs.updateFloat(9, aFloat);
        crs.updateByte(10, aByte);
        crs.updateDate(11, aDate);
        crs.updateTime(12, aTime);
        crs.updateTimestamp(13, aTimeStamp);
        crs.updateBytes(14, bytes);
        crs.updateArray(15, aArray);
        crs.updateRef(16, aRef);
        crs.updateDouble(17, aDouble);
        crs.insertRow();
        crs.moveToCurrentRow();

    }
 
Example 9
Source File: CommonCachedRowSetTests.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
protected void createDataTypesRows(RowSet crs) throws SQLException {

        Integer aInteger = 100;
        String aChar = "Oswald Cobblepot";
        Long aLong = Long.MAX_VALUE;
        Short aShort = Short.MAX_VALUE;
        Double aDouble = Double.MAX_VALUE;
        BigDecimal aBigDecimal = BigDecimal.ONE;
        Boolean aBoolean = false;
        Float aFloat = Float.MAX_VALUE;
        Byte aByte = Byte.MAX_VALUE;
        Date aDate = Date.valueOf(LocalDate.now());
        Time aTime = Time.valueOf(LocalTime.now());
        Timestamp aTimeStamp = Timestamp.valueOf(LocalDateTime.now());
        Array aArray = new StubArray("INTEGER", new Object[1]);
        Ref aRef = new SerialRef(new StubRef("INTEGER", query));
        byte[] bytes = new byte[10];
        crs.moveToInsertRow();
        crs.updateInt(1, aInteger);
        crs.updateString(2, aChar);
        crs.updateString(3, aChar);
        crs.updateLong(4, aLong);
        crs.updateBoolean(5, aBoolean);
        crs.updateShort(6, aShort);
        crs.updateDouble(7, aDouble);
        crs.updateBigDecimal(8, aBigDecimal);
        crs.updateFloat(9, aFloat);
        crs.updateByte(10, aByte);
        crs.updateDate(11, aDate);
        crs.updateTime(12, aTime);
        crs.updateTimestamp(13, aTimeStamp);
        crs.updateBytes(14, bytes);
        crs.updateArray(15, aArray);
        crs.updateRef(16, aRef);
        crs.updateDouble(17, aDouble);
        crs.insertRow();
        crs.moveToCurrentRow();

    }
 
Example 10
Source File: CommonCachedRowSetTests.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
@Test(dataProvider = "rowsetUsingCoffeeHouses")
public void commonCachedRowSetTest0006(RowSet rs) throws Exception {
    TestRowSetListener rsl = new TestRowSetListener();
    rs.addRowSetListener(rsl);
    rs.moveToInsertRow();
    rs.updateInt(1, 10024);
    rs.updateString(2, "Sacramento");
    rs.updateInt(3, 1987);
    rs.updateInt(4, 2341);
    rs.updateInt(5, 4328);
    rs.insertRow();
    assertTrue(rsl.isNotified(TestRowSetListener.ROW_CHANGED));
    rs.close();
}
 
Example 11
Source File: CommonCachedRowSetTests.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
@Test(dataProvider = "rowsetUsingCoffeeHouses")
public void commonCachedRowSetTest0006(RowSet rs) throws Exception {
    TestRowSetListener rsl = new TestRowSetListener();
    rs.addRowSetListener(rsl);
    rs.moveToInsertRow();
    rs.updateInt(1, 10024);
    rs.updateString(2, "Sacramento");
    rs.updateInt(3, 1987);
    rs.updateInt(4, 2341);
    rs.updateInt(5, 4328);
    rs.insertRow();
    assertTrue(rsl.isNotified(TestRowSetListener.ROW_CHANGED));
    rs.close();
}
 
Example 12
Source File: CommonCachedRowSetTests.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
protected void createDataTypesRows(RowSet crs) throws SQLException {

        Integer aInteger = 100;
        String aChar = "Oswald Cobblepot";
        Long aLong = Long.MAX_VALUE;
        Short aShort = Short.MAX_VALUE;
        Double aDouble = Double.MAX_VALUE;
        BigDecimal aBigDecimal = BigDecimal.ONE;
        Boolean aBoolean = false;
        Float aFloat = Float.MAX_VALUE;
        Byte aByte = Byte.MAX_VALUE;
        Date aDate = Date.valueOf(LocalDate.now());
        Time aTime = Time.valueOf(LocalTime.now());
        Timestamp aTimeStamp = Timestamp.valueOf(LocalDateTime.now());
        Array aArray = new StubArray("INTEGER", new Object[1]);
        Ref aRef = new SerialRef(new StubRef("INTEGER", query));
        byte[] bytes = new byte[10];
        crs.moveToInsertRow();
        crs.updateInt(1, aInteger);
        crs.updateString(2, aChar);
        crs.updateString(3, aChar);
        crs.updateLong(4, aLong);
        crs.updateBoolean(5, aBoolean);
        crs.updateShort(6, aShort);
        crs.updateDouble(7, aDouble);
        crs.updateBigDecimal(8, aBigDecimal);
        crs.updateFloat(9, aFloat);
        crs.updateByte(10, aByte);
        crs.updateDate(11, aDate);
        crs.updateTime(12, aTime);
        crs.updateTimestamp(13, aTimeStamp);
        crs.updateBytes(14, bytes);
        crs.updateArray(15, aArray);
        crs.updateRef(16, aRef);
        crs.updateDouble(17, aDouble);
        crs.insertRow();
        crs.moveToCurrentRow();

    }
 
Example 13
Source File: CommonCachedRowSetTests.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
protected void createDataTypesRows(RowSet crs) throws SQLException {

        Integer aInteger = 100;
        String aChar = "Oswald Cobblepot";
        Long aLong = Long.MAX_VALUE;
        Short aShort = Short.MAX_VALUE;
        Double aDouble = Double.MAX_VALUE;
        BigDecimal aBigDecimal = BigDecimal.ONE;
        Boolean aBoolean = false;
        Float aFloat = Float.MAX_VALUE;
        Byte aByte = Byte.MAX_VALUE;
        Date aDate = Date.valueOf(LocalDate.now());
        Time aTime = Time.valueOf(LocalTime.now());
        Timestamp aTimeStamp = Timestamp.valueOf(LocalDateTime.now());
        Array aArray = new StubArray("INTEGER", new Object[1]);
        Ref aRef = new SerialRef(new StubRef("INTEGER", query));
        byte[] bytes = new byte[10];
        crs.moveToInsertRow();
        crs.updateInt(1, aInteger);
        crs.updateString(2, aChar);
        crs.updateString(3, aChar);
        crs.updateLong(4, aLong);
        crs.updateBoolean(5, aBoolean);
        crs.updateShort(6, aShort);
        crs.updateDouble(7, aDouble);
        crs.updateBigDecimal(8, aBigDecimal);
        crs.updateFloat(9, aFloat);
        crs.updateByte(10, aByte);
        crs.updateDate(11, aDate);
        crs.updateTime(12, aTime);
        crs.updateTimestamp(13, aTimeStamp);
        crs.updateBytes(14, bytes);
        crs.updateArray(15, aArray);
        crs.updateRef(16, aRef);
        crs.updateDouble(17, aDouble);
        crs.insertRow();
        crs.moveToCurrentRow();

    }
 
Example 14
Source File: CommonCachedRowSetTests.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
protected void createDataTypesRows(RowSet crs) throws SQLException {

        Integer aInteger = 100;
        String aChar = "Oswald Cobblepot";
        Long aLong = Long.MAX_VALUE;
        Short aShort = Short.MAX_VALUE;
        Double aDouble = Double.MAX_VALUE;
        BigDecimal aBigDecimal = BigDecimal.ONE;
        Boolean aBoolean = false;
        Float aFloat = Float.MAX_VALUE;
        Byte aByte = Byte.MAX_VALUE;
        Date aDate = Date.valueOf(LocalDate.now());
        Time aTime = Time.valueOf(LocalTime.now());
        Timestamp aTimeStamp = Timestamp.valueOf(LocalDateTime.now());
        Array aArray = new StubArray("INTEGER", new Object[1]);
        Ref aRef = new SerialRef(new StubRef("INTEGER", query));
        byte[] bytes = new byte[10];
        crs.moveToInsertRow();
        crs.updateInt(1, aInteger);
        crs.updateString(2, aChar);
        crs.updateString(3, aChar);
        crs.updateLong(4, aLong);
        crs.updateBoolean(5, aBoolean);
        crs.updateShort(6, aShort);
        crs.updateDouble(7, aDouble);
        crs.updateBigDecimal(8, aBigDecimal);
        crs.updateFloat(9, aFloat);
        crs.updateByte(10, aByte);
        crs.updateDate(11, aDate);
        crs.updateTime(12, aTime);
        crs.updateTimestamp(13, aTimeStamp);
        crs.updateBytes(14, bytes);
        crs.updateArray(15, aArray);
        crs.updateRef(16, aRef);
        crs.updateDouble(17, aDouble);
        crs.insertRow();
        crs.moveToCurrentRow();

    }
 
Example 15
Source File: JoinRowSetTests.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
protected void createSuppiersRows(RowSet rs) throws SQLException {

        // insert into SUPPLIERS values(49, 'Superior Coffee', '1 Party Place',
        // 'Mendocino', 'CA', '95460')
        rs.moveToInsertRow();
        rs.updateInt(1, 49);
        rs.updateString(2, "Superior Coffee");
        rs.updateString(3, "1 Party Place");
        rs.updateString(4, "Mendocino");
        rs.updateString(5, "CA");
        rs.updateString(6, "95460");
        rs.insertRow();

        // insert into SUPPLIERS values(101, 'Acme, Inc.', '99 Market Street',
        // 'Groundsville', 'CA', '95199')
        rs.moveToInsertRow();
        rs.updateInt(1, 101);
        rs.updateString(2, "Acme, Inc.");
        rs.updateString(3, "99 Market Street");
        rs.updateString(4, "Groundsville");
        rs.updateString(5, "CA");
        rs.updateString(6, "95199");
        rs.insertRow();
        // insert into SUPPLIERS values(150, 'The High Ground',
        // '100 Coffee Lane', 'Meadows', 'CA', '93966')
        rs.moveToInsertRow();
        rs.updateInt(1, 150);
        rs.updateString(2, "The High Ground");
        rs.updateString(3, "100 Coffee Lane");
        rs.updateString(4, "Meadows");
        rs.updateString(5, "CA");
        rs.updateString(6, "93966");
        rs.insertRow();
        // insert into SUPPLIERS values(456," 'Restaurant Supplies, Inc.',
        // '200 Magnolia Street', 'Meadows', 'CA', '93966')
        rs.moveToInsertRow();
        rs.updateInt(1, 456);
        rs.updateString(2, "Restaurant Supplies, Inc.");
        rs.updateString(3, "200 Magnolia Stree");
        rs.updateString(4, "Meadows");
        rs.updateString(5, "CA");
        rs.updateString(6, "93966");
        rs.insertRow();
        // insert into SUPPLIERS values(927, 'Professional Kitchen',
        // '300 Daisy Avenue', 'Groundsville'," 'CA', '95199')
        rs.moveToInsertRow();
        rs.updateInt(1, 927);
        rs.updateString(2, "Professional Kitchen");
        rs.updateString(3, "300 Daisy Avenue");
        rs.updateString(4, "Groundsville");
        rs.updateString(5, "CA");
        rs.updateString(6, "95199");
        rs.insertRow();
    }
 
Example 16
Source File: JoinRowSetTests.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
protected void createSuppiersRows(RowSet rs) throws SQLException {

        // insert into SUPPLIERS values(49, 'Superior Coffee', '1 Party Place',
        // 'Mendocino', 'CA', '95460')
        rs.moveToInsertRow();
        rs.updateInt(1, 49);
        rs.updateString(2, "Superior Coffee");
        rs.updateString(3, "1 Party Place");
        rs.updateString(4, "Mendocino");
        rs.updateString(5, "CA");
        rs.updateString(6, "95460");
        rs.insertRow();

        // insert into SUPPLIERS values(101, 'Acme, Inc.', '99 Market Street',
        // 'Groundsville', 'CA', '95199')
        rs.moveToInsertRow();
        rs.updateInt(1, 101);
        rs.updateString(2, "Acme, Inc.");
        rs.updateString(3, "99 Market Street");
        rs.updateString(4, "Groundsville");
        rs.updateString(5, "CA");
        rs.updateString(6, "95199");
        rs.insertRow();
        // insert into SUPPLIERS values(150, 'The High Ground',
        // '100 Coffee Lane', 'Meadows', 'CA', '93966')
        rs.moveToInsertRow();
        rs.updateInt(1, 150);
        rs.updateString(2, "The High Ground");
        rs.updateString(3, "100 Coffee Lane");
        rs.updateString(4, "Meadows");
        rs.updateString(5, "CA");
        rs.updateString(6, "93966");
        rs.insertRow();
        // insert into SUPPLIERS values(456," 'Restaurant Supplies, Inc.',
        // '200 Magnolia Street', 'Meadows', 'CA', '93966')
        rs.moveToInsertRow();
        rs.updateInt(1, 456);
        rs.updateString(2, "Restaurant Supplies, Inc.");
        rs.updateString(3, "200 Magnolia Stree");
        rs.updateString(4, "Meadows");
        rs.updateString(5, "CA");
        rs.updateString(6, "93966");
        rs.insertRow();
        // insert into SUPPLIERS values(927, 'Professional Kitchen',
        // '300 Daisy Avenue', 'Groundsville'," 'CA', '95199')
        rs.moveToInsertRow();
        rs.updateInt(1, 927);
        rs.updateString(2, "Professional Kitchen");
        rs.updateString(3, "300 Daisy Avenue");
        rs.updateString(4, "Groundsville");
        rs.updateString(5, "CA");
        rs.updateString(6, "95199");
        rs.insertRow();
    }
 
Example 17
Source File: CommonRowSetTests.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
protected void createCoffeesRows(RowSet rs) throws SQLException {

        // insert into COFFEES values(1, 'Colombian', 101, 7.99, 0, 0)
        rs.moveToInsertRow();
        rs.updateInt(1, 1);
        rs.updateString(2, "Colombian");
        rs.updateInt(3, 101);
        rs.updateBigDecimal(4, BigDecimal.valueOf(7.99));
        rs.updateInt(5, 0);
        rs.updateInt(6, 0);
        rs.insertRow();
        // insert into COFFEES values(2, 'French_Roast', 49, 8.99, 0, 0)
        rs.moveToInsertRow();
        rs.updateInt(1, 2);
        rs.updateString(2, "French_Roast");
        rs.updateInt(3, 49);
        rs.updateBigDecimal(4, BigDecimal.valueOf(8.99));
        rs.updateInt(5, 0);
        rs.updateInt(6, 0);
        rs.insertRow();
        // insert into COFFEES values(3, 'Espresso', 150, 9.99, 0, 0)
        rs.moveToInsertRow();
        rs.updateInt(1, 3);
        rs.updateString(2, "Espresso");
        rs.updateInt(3, 150);
        rs.updateBigDecimal(4, BigDecimal.valueOf(9.99));
        rs.updateInt(5, 0);
        rs.updateInt(6, 0);
        rs.insertRow();
        // insert into COFFEES values(4, 'Colombian_Decaf', 101, 8.99, 0, 0)
        rs.moveToInsertRow();
        rs.updateInt(1, 4);
        rs.updateString(2, "Colombian_Decaf");
        rs.updateInt(3, 101);
        rs.updateBigDecimal(4, BigDecimal.valueOf(8.99));
        rs.updateInt(5, 0);
        rs.updateInt(6, 0);
        rs.insertRow();
        // insert into COFFEES values(5, 'French_Roast_Decaf', 049, 9.99, 0, 0)
        rs.moveToInsertRow();
        rs.updateInt(1, 5);
        rs.updateString(2, "French_Roast_Decaf");
        rs.updateInt(3, 49);
        rs.updateBigDecimal(4, BigDecimal.valueOf(9.99));
        rs.updateInt(5, 0);
        rs.updateInt(6, 0);
        rs.insertRow();

    }
 
Example 18
Source File: CommonRowSetTests.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
protected void createCoffeesRows(RowSet rs) throws SQLException {

        // insert into COFFEES values(1, 'Colombian', 101, 7.99, 0, 0)
        rs.moveToInsertRow();
        rs.updateInt(1, 1);
        rs.updateString(2, "Colombian");
        rs.updateInt(3, 101);
        rs.updateBigDecimal(4, BigDecimal.valueOf(7.99));
        rs.updateInt(5, 0);
        rs.updateInt(6, 0);
        rs.insertRow();
        // insert into COFFEES values(2, 'French_Roast', 49, 8.99, 0, 0)
        rs.moveToInsertRow();
        rs.updateInt(1, 2);
        rs.updateString(2, "French_Roast");
        rs.updateInt(3, 49);
        rs.updateBigDecimal(4, BigDecimal.valueOf(8.99));
        rs.updateInt(5, 0);
        rs.updateInt(6, 0);
        rs.insertRow();
        // insert into COFFEES values(3, 'Espresso', 150, 9.99, 0, 0)
        rs.moveToInsertRow();
        rs.updateInt(1, 3);
        rs.updateString(2, "Espresso");
        rs.updateInt(3, 150);
        rs.updateBigDecimal(4, BigDecimal.valueOf(9.99));
        rs.updateInt(5, 0);
        rs.updateInt(6, 0);
        rs.insertRow();
        // insert into COFFEES values(4, 'Colombian_Decaf', 101, 8.99, 0, 0)
        rs.moveToInsertRow();
        rs.updateInt(1, 4);
        rs.updateString(2, "Colombian_Decaf");
        rs.updateInt(3, 101);
        rs.updateBigDecimal(4, BigDecimal.valueOf(8.99));
        rs.updateInt(5, 0);
        rs.updateInt(6, 0);
        rs.insertRow();
        // insert into COFFEES values(5, 'French_Roast_Decaf', 049, 9.99, 0, 0)
        rs.moveToInsertRow();
        rs.updateInt(1, 5);
        rs.updateString(2, "French_Roast_Decaf");
        rs.updateInt(3, 49);
        rs.updateBigDecimal(4, BigDecimal.valueOf(9.99));
        rs.updateInt(5, 0);
        rs.updateInt(6, 0);
        rs.insertRow();

    }
 
Example 19
Source File: JoinRowSetTests.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
protected void createSuppiersRows(RowSet rs) throws SQLException {

        // insert into SUPPLIERS values(49, 'Superior Coffee', '1 Party Place',
        // 'Mendocino', 'CA', '95460')
        rs.moveToInsertRow();
        rs.updateInt(1, 49);
        rs.updateString(2, "Superior Coffee");
        rs.updateString(3, "1 Party Place");
        rs.updateString(4, "Mendocino");
        rs.updateString(5, "CA");
        rs.updateString(6, "95460");
        rs.insertRow();

        // insert into SUPPLIERS values(101, 'Acme, Inc.', '99 Market Street',
        // 'Groundsville', 'CA', '95199')
        rs.moveToInsertRow();
        rs.updateInt(1, 101);
        rs.updateString(2, "Acme, Inc.");
        rs.updateString(3, "99 Market Street");
        rs.updateString(4, "Groundsville");
        rs.updateString(5, "CA");
        rs.updateString(6, "95199");
        rs.insertRow();
        // insert into SUPPLIERS values(150, 'The High Ground',
        // '100 Coffee Lane', 'Meadows', 'CA', '93966')
        rs.moveToInsertRow();
        rs.updateInt(1, 150);
        rs.updateString(2, "The High Ground");
        rs.updateString(3, "100 Coffee Lane");
        rs.updateString(4, "Meadows");
        rs.updateString(5, "CA");
        rs.updateString(6, "93966");
        rs.insertRow();
        // insert into SUPPLIERS values(456," 'Restaurant Supplies, Inc.',
        // '200 Magnolia Street', 'Meadows', 'CA', '93966')
        rs.moveToInsertRow();
        rs.updateInt(1, 456);
        rs.updateString(2, "Restaurant Supplies, Inc.");
        rs.updateString(3, "200 Magnolia Stree");
        rs.updateString(4, "Meadows");
        rs.updateString(5, "CA");
        rs.updateString(6, "93966");
        rs.insertRow();
        // insert into SUPPLIERS values(927, 'Professional Kitchen',
        // '300 Daisy Avenue', 'Groundsville'," 'CA', '95199')
        rs.moveToInsertRow();
        rs.updateInt(1, 927);
        rs.updateString(2, "Professional Kitchen");
        rs.updateString(3, "300 Daisy Avenue");
        rs.updateString(4, "Groundsville");
        rs.updateString(5, "CA");
        rs.updateString(6, "95199");
        rs.insertRow();
    }
 
Example 20
Source File: JoinRowSetTests.java    From jdk8u_jdk with GNU General Public License v2.0 4 votes vote down vote up
protected void createSuppiersRows(RowSet rs) throws SQLException {

        // insert into SUPPLIERS values(49, 'Superior Coffee', '1 Party Place',
        // 'Mendocino', 'CA', '95460')
        rs.moveToInsertRow();
        rs.updateInt(1, 49);
        rs.updateString(2, "Superior Coffee");
        rs.updateString(3, "1 Party Place");
        rs.updateString(4, "Mendocino");
        rs.updateString(5, "CA");
        rs.updateString(6, "95460");
        rs.insertRow();

        // insert into SUPPLIERS values(101, 'Acme, Inc.', '99 Market Street',
        // 'Groundsville', 'CA', '95199')
        rs.moveToInsertRow();
        rs.updateInt(1, 101);
        rs.updateString(2, "Acme, Inc.");
        rs.updateString(3, "99 Market Street");
        rs.updateString(4, "Groundsville");
        rs.updateString(5, "CA");
        rs.updateString(6, "95199");
        rs.insertRow();
        // insert into SUPPLIERS values(150, 'The High Ground',
        // '100 Coffee Lane', 'Meadows', 'CA', '93966')
        rs.moveToInsertRow();
        rs.updateInt(1, 150);
        rs.updateString(2, "The High Ground");
        rs.updateString(3, "100 Coffee Lane");
        rs.updateString(4, "Meadows");
        rs.updateString(5, "CA");
        rs.updateString(6, "93966");
        rs.insertRow();
        // insert into SUPPLIERS values(456," 'Restaurant Supplies, Inc.',
        // '200 Magnolia Street', 'Meadows', 'CA', '93966')
        rs.moveToInsertRow();
        rs.updateInt(1, 456);
        rs.updateString(2, "Restaurant Supplies, Inc.");
        rs.updateString(3, "200 Magnolia Stree");
        rs.updateString(4, "Meadows");
        rs.updateString(5, "CA");
        rs.updateString(6, "93966");
        rs.insertRow();
        // insert into SUPPLIERS values(927, 'Professional Kitchen',
        // '300 Daisy Avenue', 'Groundsville'," 'CA', '95199')
        rs.moveToInsertRow();
        rs.updateInt(1, 927);
        rs.updateString(2, "Professional Kitchen");
        rs.updateString(3, "300 Daisy Avenue");
        rs.updateString(4, "Groundsville");
        rs.updateString(5, "CA");
        rs.updateString(6, "95199");
        rs.insertRow();
    }