Package javax.sql

Examples of javax.sql.RowSet


    protected List getResult( ResultSet resultSet, int startAtRow,
            int howManyRows )
    {

        RowSetWrapperList results = null;
        RowSet rowSet;
        try
        {
            rowSet = getRORowSet( resultSet, startAtRow, howManyRows );
            results = new RowSetWrapperList( rowSet, getRowSetMapper() );
        }
View Full Code Here


    protected List getResult( ResultSet resultSet, int startAtRow,
            int howManyRows )
    {

        RowSetWrapperList results = null;
        RowSet rowSet;
        try
        {
            rowSet = getRORowSet( resultSet, startAtRow, howManyRows );
            results = new RowSetWrapperList( rowSet, getRowSetMapper() );
        }
View Full Code Here

    protected List getResult( ResultSet resultSet, int startAtRow,
            int howManyRows )
    {

        RowSetWrapperList results = null;
        RowSet rowSet;
        try
        {
            rowSet = getRORowSet( resultSet, startAtRow, howManyRows );
            results = new RowSetWrapperList( rowSet, getRowSetMapper() );
        }
View Full Code Here

   *
   * @see javax.sql.RowSetReader#readData(javax.sql.RowSetInternal)
   */
  @Override
  public void readData(RowSetInternal caller) throws SQLException {
    RowSet c = (RowSet) caller;
    File f = new File(c.getDataSourceName());
    BufferedReader f1;

    try {
      if (f.canRead()) {
        f1 = new BufferedReader(new FileReader(c.getDataSourceName()));
        try {
          setMetaData(f1.readLine(), c);
          setContent(f1, c);
        } finally {
          f1.close();
View Full Code Here

      this.pstmt = this.conn.prepareStatement(sql);
      this.pstmt.setString(1, "1");
      this.rs = this.pstmt.executeQuery();

      // create a CachedRowSet and populate it
      RowSet cachedRowSet = (RowSet) c.newInstance();
      // cachedRowSet.populate(rs);
      populate.invoke(cachedRowSet, new Object[] { this.rs });

      // scroll through CachedRowSet ...
      assertTrue(cachedRowSet.next());
      assertEquals("1", cachedRowSet.getString("ID"));
      assertEquals("test data stuff !", cachedRowSet
          .getString("datafield"));
      assertFalse(cachedRowSet.next());
    } finally {
      this.stmt.executeUpdate("DROP TABLE IF EXISTS testBug5188");
    }
  }
View Full Code Here

      throw new SQLException("Clone failed; " + ioexception2.getMessage());
    }
  }

  public RowSet createShared() throws SQLException {
    RowSet rowset;
    try {
      rowset = (RowSet) clone();
    } catch (CloneNotSupportedException clonenotsupportedexception) {
      throw new SQLException(clonenotsupportedexception.getMessage());
    }
View Full Code Here

      this.pstmt = this.conn.prepareStatement(sql);
      this.pstmt.setString(1, "1");
      this.rs = this.pstmt.executeQuery();

      // create a CachedRowSet and populate it
      RowSet cachedRowSet = (RowSet) c.newInstance();
      // cachedRowSet.populate(rs);
      populate.invoke(cachedRowSet, new Object[] { this.rs });

      // scroll through CachedRowSet ...
      assertTrue(cachedRowSet.next());
      assertEquals("1", cachedRowSet.getString("ID"));
      assertEquals("test data stuff !", cachedRowSet
          .getString("datafield"));
      assertFalse(cachedRowSet.next());
    } finally {
      this.stmt.executeUpdate("DROP TABLE IF EXISTS testBug5188");
    }
  }
View Full Code Here

TOP

Related Classes of javax.sql.RowSet

Copyright © 2018 www.massapicom. 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.