railo.runtime.type
Interface Query

All Superinterfaces:
Castable, Cloneable, Collection, Dumpable, ForEachIteratorable, Iterator, Iteratorable, Query, ResultSet, Serializable, Wrapper
All Known Subinterfaces:
QueryTable

public interface Query
extends Collection, Iterator, Query

inteface for resultset (query) object


Nested Class Summary
 
Nested classes/interfaces inherited from interface railo.runtime.type.Collection
Collection.Key
 
Field Summary
static int ORDER_ASC
          Constant ORDER_ASC, used for method sort
static int ORDER_DESC
          Constant ORDER_DESC, used for method sort
 
Fields inherited from interface java.sql.ResultSet
CLOSE_CURSORS_AT_COMMIT, CONCUR_READ_ONLY, CONCUR_UPDATABLE, FETCH_FORWARD, FETCH_REVERSE, FETCH_UNKNOWN, HOLD_CURSORS_OVER_COMMIT, TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, TYPE_SCROLL_SENSITIVE
 
Method Summary
 boolean addColumn(Collection.Key columnName, Array content)
          adds a new column to the resultset
 boolean addColumn(Collection.Key columnName, Array content, int type)
          adds a new column to the resultset
 boolean addColumn(String columnName, Array content)
          Deprecated. use instead addColumn(railo.runtime.type.Collection.Key, Array)
 boolean addColumn(String columnName, Array content, int type)
          Deprecated. use instead addColumn(railo.runtime.type.Collection.Key, Array, int)
 boolean addRow(int count)
          adds a new row to the resultset
 Object clone()
           
 int executionTime()
          Deprecated. use getExecutionTime() instead
 Object getAt(Collection.Key key, int row)
          return a value of the resultset by specified column and row
 Object getAt(Collection.Key key, int row, Object defaultValue)
          return a value of the resultset by specified column and row, otherwise to getAt this method throw no exception if value dont exist (return null)
 Object getAt(String key, int row)
          Deprecated. use instead getAt(railo.runtime.type.Collection.Key, int)
 Object getAt(String key, int row, Object defaultValue)
          Deprecated. use instead getAt(railo.runtime.type.Collection.Key, int, Object)
 QueryColumn getColumn(Collection.Key key)
          return the query column matching to key
 QueryColumn getColumn(Collection.Key key, QueryColumn column)
          return the query column matching to key, if key not exist return null
 QueryColumn getColumn(String key)
          Deprecated. use instead getColumn(railo.runtime.type.Collection.Key)
 QueryColumn getColumn(String key, QueryColumn column)
          Deprecated. use instead getColumn(railo.runtime.type.Collection.Key, QueryColumn)
 Collection.Key[] getColumnNames()
           
 String[] getColumnNamesAsString()
           
 long getExecutionTime()
           
 Query getGeneratedKeys()
           
 Array getMetaDataSimple()
           
 SQL getSql()
           
 String getTemplate()
           
 int[] getTypes()
           
 Map getTypesAsMap()
           
 int getUpdateCount()
           
 boolean isCached()
          is query from cache or not
 QueryColumn removeColumn(Collection.Key key)
          remove column matching to key
 QueryColumn removeColumn(String key)
          Deprecated. use instead removeColumn(railo.runtime.type.Collection.Key)
 QueryColumn removeColumnEL(Collection.Key key)
          remove column matching to key
 QueryColumn removeColumnEL(String key)
          Deprecated. use instead removeColumnEL(railo.runtime.type.Collection.Key)
 int removeRow(int row)
          remove row from query
 int removeRowEL(int row)
          remove row from query
 void rename(Collection.Key columnName, Collection.Key newColumnName)
           
 Object setAt(Collection.Key key, int row, Object value)
          set a value at the defined position
 Object setAt(String key, int row, Object value)
          Deprecated. use instead setAtEL(railo.runtime.type.Collection.Key, int, Object)
 Object setAtEL(Collection.Key key, int row, Object value)
          set a value at the defined position
 Object setAtEL(String key, int row, Object value)
          Deprecated. use instead setAtEL(railo.runtime.type.Collection.Key, int, Object)
 void setCached(boolean isCached)
          sets if query is form cache or not
 void setExecutionTime(long l)
          sets the execution Time of the query
 void sort(Collection.Key column)
          sorts a query by a column, direction is asc
 void sort(Collection.Key strColumn, int order)
          sorts a query by a column
 void sort(String column)
          Deprecated. use instead sort(railo.runtime.type.Collection.Key)
 void sort(String strColumn, int order)
          Deprecated. use instead sort(railo.runtime.type.Collection.Key, int)
 
Methods inherited from interface railo.runtime.type.Collection
clear, containsKey, containsKey, duplicate, get, get, get, get, keys, remove, removeEL, set, set, setEL, setEL, size
 
Methods inherited from interface railo.runtime.dump.Dumpable
toDumpData
 
Methods inherited from interface railo.runtime.type.Iteratorable
entryIterator, keyIterator, keysAsStringIterator, valueIterator
 
Methods inherited from interface railo.runtime.op.Castable
castToBoolean, castToBooleanValue, castToDateTime, castToDateTime, castToDoubleValue, castToDoubleValue, castToString, castToString, compareTo, compareTo, compareTo, compareTo
 
Methods inherited from interface railo.runtime.type.ForEachIteratorable
getIterator
 
Methods inherited from interface railo.runtime.type.Iterator
getCurrentrow, getRecordcount, go, isEmpty, next, next, previous, reset, reset
 
Methods inherited from interface com.allaire.cfx.Query
addRow, getColumnIndex, getColumns, getData, getName, getRowCount, setData
 
Methods inherited from interface java.sql.ResultSet
absolute, afterLast, beforeFirst, cancelRowUpdates, clearWarnings, close, deleteRow, findColumn, first, getArray, getArray, getAsciiStream, getAsciiStream, getBigDecimal, getBigDecimal, getBigDecimal, getBigDecimal, getBinaryStream, getBinaryStream, getBlob, getBlob, getBoolean, getBoolean, getByte, getByte, getBytes, getBytes, getCharacterStream, getCharacterStream, getClob, getClob, getConcurrency, getCursorName, getDate, getDate, getDate, getDate, getDouble, getDouble, getFetchDirection, getFetchSize, getFloat, getFloat, getHoldability, getInt, getInt, getLong, getLong, getMetaData, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getObject, getObject, getObject, getObject, getRef, getRef, getRow, getRowId, getRowId, getShort, getShort, getSQLXML, getSQLXML, getStatement, getString, getString, getTime, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, getTimestamp, getType, getUnicodeStream, getUnicodeStream, getURL, getURL, getWarnings, insertRow, isAfterLast, isBeforeFirst, isClosed, isFirst, isLast, last, moveToCurrentRow, moveToInsertRow, next, previous, refreshRow, relative, rowDeleted, rowInserted, rowUpdated, setFetchDirection, setFetchSize, updateArray, updateArray, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateAsciiStream, updateBigDecimal, updateBigDecimal, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBinaryStream, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBlob, updateBoolean, updateBoolean, updateByte, updateByte, updateBytes, updateBytes, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateCharacterStream, updateClob, updateClob, updateClob, updateClob, updateClob, updateClob, updateDate, updateDate, updateDouble, updateDouble, updateFloat, updateFloat, updateInt, updateInt, updateLong, updateLong, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNCharacterStream, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNClob, updateNString, updateNString, updateNull, updateNull, updateObject, updateObject, updateObject, updateObject, updateRef, updateRef, updateRow, updateRowId, updateRowId, updateShort, updateShort, updateSQLXML, updateSQLXML, updateString, updateString, updateTime, updateTime, updateTimestamp, updateTimestamp, wasNull
 
Methods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
 

Field Detail

ORDER_ASC

static final int ORDER_ASC
Constant ORDER_ASC, used for method sort

See Also:
Constant Field Values

ORDER_DESC

static final int ORDER_DESC
Constant ORDER_DESC, used for method sort

See Also:
Constant Field Values
Method Detail

getUpdateCount

int getUpdateCount()
Returns:
return how many lines are affected by a update/insert

getAt

Object getAt(String key,
             int row)
             throws PageException
Deprecated. use instead getAt(railo.runtime.type.Collection.Key, int)

return a value of the resultset by specified column and row

Parameters:
key - column to get
row - row to get from (1-recordcount)
Returns:
value at the called poition
Throws:
PageException - if invalid position definition

getAt

Object getAt(Collection.Key key,
             int row)
             throws PageException
return a value of the resultset by specified column and row

Parameters:
key - column to get
row - row to get from (1-recordcount)
Returns:
value at the called poition
Throws:
PageException - if invalid position definition

getAt

Object getAt(String key,
             int row,
             Object defaultValue)
Deprecated. use instead getAt(railo.runtime.type.Collection.Key, int, Object)

return a value of the resultset by specified column and row, otherwise to getAt this method throw no exception if value dont exist (return null)

Parameters:
key - column to get
row - row to get from (1-recordcount)
Returns:
value at the called poition

getAt

Object getAt(Collection.Key key,
             int row,
             Object defaultValue)
return a value of the resultset by specified column and row, otherwise to getAt this method throw no exception if value dont exist (return null)

Parameters:
key - column to get
row - row to get from (1-recordcount)
Returns:
value at the called poition

setAt

Object setAt(String key,
             int row,
             Object value)
             throws PageException
Deprecated. use instead setAtEL(railo.runtime.type.Collection.Key, int, Object)

set a value at the defined position

Parameters:
key - column to set
row - row to set
value - value to fill
Returns:
filled value
Throws:
PageException

setAt

Object setAt(Collection.Key key,
             int row,
             Object value)
             throws PageException
set a value at the defined position

Parameters:
key - column to set
row - row to set
value - value to fill
Returns:
filled value
Throws:
PageException

setAtEL

Object setAtEL(String key,
               int row,
               Object value)
Deprecated. use instead setAtEL(railo.runtime.type.Collection.Key, int, Object)

set a value at the defined position

Parameters:
key - column to set
row - row to set
value - value to fill
Returns:
filled value

setAtEL

Object setAtEL(Collection.Key key,
               int row,
               Object value)
set a value at the defined position

Parameters:
key - column to set
row - row to set
value - value to fill
Returns:
filled value

addRow

boolean addRow(int count)
adds a new row to the resultset

Parameters:
count - count of rows to add
Returns:
return if row is addded or nod (always true)

removeRow

int removeRow(int row)
              throws PageException
remove row from query

Parameters:
row -
Returns:
return new rowcount
Throws:
PageException

removeRowEL

int removeRowEL(int row)
remove row from query

Parameters:
row -
Returns:
return new rowcount

addColumn

boolean addColumn(String columnName,
                  Array content)
                  throws PageException
Deprecated. use instead addColumn(railo.runtime.type.Collection.Key, Array)

adds a new column to the resultset

Parameters:
columnName - name of the new column
content - content of the new column inside a array (must have same size like query has records)
Returns:
if column is added return true otherwise false (always true, throw error when false)
Throws:
PageException

addColumn

boolean addColumn(Collection.Key columnName,
                  Array content)
                  throws PageException
adds a new column to the resultset

Parameters:
columnName - name of the new column
content - content of the new column inside a array (must have same size like query has records)
Returns:
if column is added return true otherwise false (always true, throw error when false)
Throws:
PageException

addColumn

boolean addColumn(String columnName,
                  Array content,
                  int type)
                  throws PageException
Deprecated. use instead addColumn(railo.runtime.type.Collection.Key, Array, int)

adds a new column to the resultset

Parameters:
columnName - name of the new column
content - content of the new column inside a array (must have same size like query has records)
type - data type from (java.sql.Types)
Returns:
if column is added return true otherwise false (always true, throw error when false)
Throws:
PageException

addColumn

boolean addColumn(Collection.Key columnName,
                  Array content,
                  int type)
                  throws PageException
adds a new column to the resultset

Parameters:
columnName - name of the new column
content - content of the new column inside a array (must have same size like query has records)
type - data type from (java.sql.Types)
Returns:
if column is added return true otherwise false (always true, throw error when false)
Throws:
PageException

clone

Object clone()
Specified by:
clone in interface Collection
Returns:
Coloned Object

getTypes

int[] getTypes()
Returns:
return all types

getTypesAsMap

Map getTypesAsMap()
Returns:
returns all types as Map (key==column)

getColumn

QueryColumn getColumn(String key)
                      throws PageException
Deprecated. use instead getColumn(railo.runtime.type.Collection.Key)

return the query column matching to key

Parameters:
key - key to get
Returns:
QieryColumn object
Throws:
PageException

getColumn

QueryColumn getColumn(Collection.Key key)
                      throws PageException
return the query column matching to key

Parameters:
key - key to get
Returns:
QieryColumn object
Throws:
PageException

getColumn

QueryColumn getColumn(String key,
                      QueryColumn column)
Deprecated. use instead getColumn(railo.runtime.type.Collection.Key, QueryColumn)

return the query column matching to key, if key not exist return null

Parameters:
key - key to get
Returns:
QieryColumn object

getColumn

QueryColumn getColumn(Collection.Key key,
                      QueryColumn column)
return the query column matching to key, if key not exist return null

Parameters:
key - key to get
Returns:
QieryColumn object

removeColumn

QueryColumn removeColumn(String key)
                         throws PageException
Deprecated. use instead removeColumn(railo.runtime.type.Collection.Key)

remove column matching to key

Parameters:
key - key to remove
Returns:
QueryColumn object removed
Throws:
PageException

removeColumn

QueryColumn removeColumn(Collection.Key key)
                         throws PageException
remove column matching to key

Parameters:
key - key to remove
Returns:
QueryColumn object removed
Throws:
PageException

removeColumnEL

QueryColumn removeColumnEL(String key)
Deprecated. use instead removeColumnEL(railo.runtime.type.Collection.Key)

remove column matching to key

Parameters:
key - key to remove
Returns:
QueryColumn object removed or null if column not exist

removeColumnEL

QueryColumn removeColumnEL(Collection.Key key)
remove column matching to key

Parameters:
key - key to remove
Returns:
QueryColumn object removed or null if column not exist

setExecutionTime

void setExecutionTime(long l)
sets the execution Time of the query

Parameters:
l -

sort

void sort(String column)
          throws PageException
Deprecated. use instead sort(railo.runtime.type.Collection.Key)

sorts a query by a column, direction is asc

Parameters:
column - colun to sort
Throws:
PageException

sort

void sort(Collection.Key column)
          throws PageException
sorts a query by a column, direction is asc

Parameters:
column - colun to sort
Throws:
PageException

sort

void sort(String strColumn,
          int order)
          throws PageException
Deprecated. use instead sort(railo.runtime.type.Collection.Key, int)

sorts a query by a column

Parameters:
strColumn - column to sort
order - sort type (Query.ORDER_ASC or Query.ORDER_DESC)
Throws:
PageException

sort

void sort(Collection.Key strColumn,
          int order)
          throws PageException
sorts a query by a column

Parameters:
strColumn - column to sort
order - sort type (Query.ORDER_ASC or Query.ORDER_DESC)
Throws:
PageException

setCached

void setCached(boolean isCached)
sets if query is form cache or not

Parameters:
isCached - is cached or not

isCached

boolean isCached()
is query from cache or not

Returns:
is cached or not

getMetaDataSimple

Array getMetaDataSimple()
Returns:
returns array with meta data to the query (only column names and type)

rename

void rename(Collection.Key columnName,
            Collection.Key newColumnName)
            throws PageException
Throws:
PageException

getColumnNames

Collection.Key[] getColumnNames()
Specified by:
getColumnNames in interface Query

getColumnNamesAsString

String[] getColumnNamesAsString()
Specified by:
getColumnNamesAsString in interface Query

getGeneratedKeys

Query getGeneratedKeys()

getSql

SQL getSql()

getTemplate

String getTemplate()

getExecutionTime

long getExecutionTime()
Returns:
return the query execution time in nanoseconds

executionTime

int executionTime()
Deprecated. use getExecutionTime() instead

Returns:
returns the execution time


Copyright © 2012 Railo