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