package de.uka.ipd.consensus.foundation.query;

import java.util.Collection;

/**
 * An object of this type is returned by <code>QueryEngine.executeQuery()</code> and represents the result of the query.
 * @author Thomas Much
 * @version 2006-06-14
 * @see QueryEngine#executeQuery(User, String)
 */
public interface QueryEngineResultSet {

	/**
	 * Returns how many result rows the query yielded.
	 * @return the number of result rows (0..n)
	 * @see #getRows()
	 */
	public int getRowCount();

	
	/**
	 * Returns of how many data columns each row consists.
	 * @return the number of data columns (0..m) per row
	 * @see #getColumnNames()
	 */
	public int getColumnCount();

	
	/**
	 * Returns a collection of row collections, i.e. each entry in the returned collection is itself a collection containing the colums of the row.
	 * @return a collection of row collections
	 * @see #getRowCount()
	 */
	public Collection getRows();
	
	
	/**
	 * Returns a collection of the column names. The names are not included in the data rows.
	 * @return a collection of the column names
	 * @see #getColumnCount()
	 */
	public Collection getColumnNames();

}
