001 package com.allaire.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 public String[] getColumnNamesAsString(); 031 032 public Collection.Key[] getColumnNames(); 033 034 035 /** 036 * returns one field of a Query as String 037 * @param row 038 * @param col 039 * @return data from query object 040 * @throws IndexOutOfBoundsException 041 */ 042 public String getData(int row, int col) throws IndexOutOfBoundsException; 043 044 /** 045 * @return returns name of the query 046 */ 047 public String getName(); 048 049 /** 050 * @return returns row count 051 */ 052 public int getRowCount(); 053 054 /** 055 * sets value at a defined position in Query 056 * @param row 057 * @param col 058 * @param value 059 * @throws IndexOutOfBoundsException 060 */ 061 public void setData(int row, int col, String value) 062 throws IndexOutOfBoundsException ; 063 064 }