Java 8 RowSet - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 RowSet class.

This code example shows how to use the following methods: next, execute, setCommand, setPassword, setUrl
        try { 
            // Load the JDBC driver 
            Class.forName("com.mysql.jdbc.Driver"); 
            System.out.println("Driver loaded"); 
            rowSet = new JdbcRowSetImpl(); 
            rowSet.setUrl("jdbc:mysql://localhost/javabook"); 
            rowSet.setUsername("scott"); 
            rowSet.setPassword("tiger"); 
            String sql; 
            sql = "SELECT * FROM Poll"; 
            rowSet.setCommand(sql); 
            rowSet.execute(); 
            rowSet.next(); 
        } catch(Exception ex) { 
            ex.printStackTrace(); 
        } 
    } 
     
    private Boolean setIsYes(String ans) { 
        // Notes from the board on Monday 12/3/2012 
Full Snippet Info
6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: findColumn, getString
        departureTime = new DateTime(scanner.nextLine());
        arrivalTime = new DateTime(scanner.nextLine());
    } 
 
    public BadFlightClass(RowSet rowSet) throws SQLException {
        origin = rowSet.getString(rowSet.findColumn("origin"));
        destination = rowSet.getString(rowSet.findColumn("destination"));
        departureTime = new DateTime(rowSet.getString(rowSet.findColumn("departureTime")));
        arrivalTime = new DateTime(rowSet.getString(rowSet.findColumn("arrivalTime")));
    } 
 
    public String getOrigin() {
        return origin;
    } 
 
    public void setOrigin(String origin) {
        this.origin = origin;
    } 
 
    public String getDestination() {
Full Snippet Info
6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: setMaxRows, populate, setPageSize
                    t);
        } 
 
        if (resultSet != null) {
            if (limit > -1) {
                result.setPageSize(limit);
                result.setMaxRows(limit);
            } 
 
            result.populate(resultSet, start < 0 ? 1 : start + 1);
        } 
 
        return result;
    } 
 
    /** JdbcResult instance that gives access to the resultSet. */ 
    private volatile JdbcResult jdbcResult;
 
    /** Inner WebRowSet Instance. */ 
    private volatile WebRowSet webRowSet;
Full Snippet Info
6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: absolute, getObject, getMaxRows
	} 
    
	public int getRowCount() { 
		int count = 0;
		try { 
			count = rowSet.getMaxRows();
		} catch (Exception e) {
			e.printStackTrace();
		} 
		return count;
	} 
    
	protected Vector getKeyForItem(int rowIndex) {
		return getKeyForItem(rowIndex,true);
	} 
    
	protected Vector getKeyForItem(int rowIndex,boolean includeNotKeyColumn) {
		Vector<Object> key = new Vector<Object>();
		for(int i=0;i<getColumnCount();i++) {
			if(!includeNotKeyColumn) {

5
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: absolute, getObject, getMaxRows
		return count;
	} 
    
	public int getRowCount() { 
		try { 
			return rowSet.getMaxRows();
		} catch (Exception ex) {
			logger.severe(ex.getMessage());
			return 0; 
		} 
	} 
    
	protected Vector getKeyForItem(int rowIndex) {
		return getKeyForItem(rowIndex,true);
	} 
    
	protected Vector getKeyForItem(int rowIndex,boolean includeNotKeyColumn) {
		Vector<Object> key = new Vector<Object>();
		for(int i=0;i<getColumnCount();i++) {
			if(!includeNotKeyColumn) {

5
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
See Code Examples for Java 8 RowSet Methods: