001 package org.opencfml.cfx; 002 003 import java.sql.ResultSet; 004 005 /** 006 * Alternative Implementation of Jeremy Allaire's Query Interface 007 */ 008 public interface Query extends ResultSet { 009 010 /** 011 * @return adds a row to resultset 012 */ 013 public int addRow(); 014 015 /** 016 * returns index of a columnName 017 * @param coulmnName column name to get index for 018 * @return index of a columnName 019 */ 020 public int getColumnIndex(String coulmnName); 021 022 /** 023 * @return All column Names of resultset as string 024 * FUTURE change to getColumnNamesAsString(); 025 */ 026 public String[] getColumns(); 027 028 // FUTURE public String[] getColumnNamesAsString(); 029 // FUTURE public Collection.Key[] getColumnNames(); 030 031 032 /** 033 * returns one field of a Query as String 034 * @param row 035 * @param col 036 * @return data from query object 037 * @throws IndexOutOfBoundsException 038 */ 039 public String getData(int row, int col) throws IndexOutOfBoundsException; 040 041 /** 042 * @return returns name of the query 043 */ 044 public String getName(); 045 046 /** 047 * @return returns row count 048 */ 049 public int getRowCount(); 050 051 /** 052 * sets value at a defined position in Query 053 * @param row 054 * @param col 055 * @param value 056 * @throws IndexOutOfBoundsException 057 */ 058 public void setData(int row, int col, String value) 059 throws IndexOutOfBoundsException ; 060 061 }