All Downloads are FREE. Search and download functionalities are using the official Maven repository.

nyla.solutions.dao.DataResultSet Maven / Gradle / Ivy

package nyla.solutions.dao;

import java.io.Serializable;

import java.util.*;

import nyla.solutions.global.data.DataRow;

/**
 * 
 * 
 *  Represents a data set
 * 
* @author Gregory Green * @version 1.0 */ public class DataResultSet implements Serializable { DataResultSet() { super(); }// -------------------------------------------- public Collection getColumnNames() { return columns; }// -------------------------------------------- void addColumn(String aColumnName, int aPosition) { columns.ensureCapacity(aPosition); columns.add(aPosition, aColumnName); }// -------------------------------------------- /** * * @param aRow the data row to add */ void addRow(DataRow aRow) { dataRows.add(aRow); }// -------------------------------------------- /** * * @return this.columns.size() */ public int getColumnCount() { return this.columns.size(); }// -------------------------------------------- /** * * @return collection of DataRows */ public Collection getRows() { return this.dataRows; }// -------------------------------------------- /** * Return the number of rows in the result set * @return dataRows.size() */ public int size() { if(this.dataRows == null) return 0; else return this.dataRows.size(); }// -------------------------------------------- /** * * @see java.util.ArrayList#isEmpty() */ public boolean isEmpty() { return dataRows.isEmpty(); }// -------------------------------------------- public String toString() { return dataRows.toString(); }//---------------------------------------- static final long serialVersionUID = 1; private ArrayList dataRows = new ArrayList(); private ArrayList columns = new ArrayList(); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy