Package javax.sql.rowset

Examples of javax.sql.rowset.CachedRowSet.first()


        /*
         * Test empty JoinRowSet
         */
        CachedRowSet emptyToCrset = jrs.toCachedRowSet();
        assertNull(emptyToCrset.getMetaData());
        assertFalse(emptyToCrset.first());

        /*
         * The first CachedRowSet
         */
        jrs = newJoinRowSet();
View Full Code Here


        toCrset = jrs.toCachedRowSet();
        // call toCrset.acceptChanges()
        if ("true".equals(System.getProperty("Testing Harmony"))) {
            assertTrue(toCrset.last());
        } else {
            assertTrue(toCrset.first());
        }
        assertEquals(4, toCrset.getInt(1));
        toCrset.updateString(2, "modify4");
        toCrset.updateRow();
        try {
View Full Code Here

                assertEquals("Updated", jrs.getString(2));
            }
        }
        assertEquals(1, count);

        crset2.first();
        crset2.updateString(2, "Updated2");

    }

    public void testJoin_Delete() throws Exception {
View Full Code Here

    this.rs = this.stmt
        .executeQuery("select firstName as 'first person' from bug49516");

    crs = (CachedRowSet)Class.forName("com.sun.rowset.CachedRowSetImpl").newInstance();
    crs.populate(this.rs);
    crs.first();

    assertEquals("John", crs.getString(1));
  }

  public void testBug48820() throws Exception {
View Full Code Here

    this.rs = noBlobsConn.createStatement().executeQuery(
        "SELECT PASSWORD ('SOMETHING')");

    crs = (CachedRowSet)Class.forName("com.sun.rowset.CachedRowSetImpl").newInstance();
    crs.populate(this.rs);
    crs.first();

    assertEquals(fromPlainResultSet, crs.getString(1));
  }

  /**
 
View Full Code Here

                assertEquals("Updated", jrs.getString(2));
            }
        }
        assertEquals(1, count);

        crset2.first();
        crset2.updateString(2, "Updated2");

    }

    public void testJoin_Delete() throws Exception {
View Full Code Here

    this.rs = this.stmt
        .executeQuery("select firstName as 'first person' from bug49516");

    crs = (CachedRowSet)Class.forName("com.sun.rowset.CachedRowSetImpl").newInstance();
    crs.populate(this.rs);
    crs.first();

    assertEquals("John", crs.getString(1));
  }

  public void testBug48820() throws Exception {
View Full Code Here

    this.rs = this.stmt
        .executeQuery("select firstName as 'first person' from bug49516");

    crs = (CachedRowSet)Class.forName("com.sun.rowset.CachedRowSetImpl").newInstance();
    crs.populate(this.rs);
    crs.first();

    assertEquals("John", crs.getString(1));
  }

  public void testBug48820() throws Exception {
View Full Code Here

    this.rs = noBlobsConn.createStatement().executeQuery(
        "SELECT PASSWORD ('SOMETHING')");

    crs = (CachedRowSet)Class.forName("com.sun.rowset.CachedRowSetImpl").newInstance();
    crs.populate(this.rs);
    crs.first();

    assertEquals(fromPlainResultSet, crs.getString(1));
  }

  /**
 
View Full Code Here

    this.rs = noBlobsConn.createStatement().executeQuery(
        "SELECT PASSWORD ('SOMETHING')");

    crs = (CachedRowSet)Class.forName("com.sun.rowset.CachedRowSetImpl").newInstance();
    crs.populate(this.rs);
    crs.first();

    assertEquals(fromPlainResultSet, crs.getString(1));
  }

  /**
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.