railo.runtime.type.query
Class SimpleQueryColumn

java.lang.Object
  extended by railo.runtime.type.query.SimpleQueryColumn
All Implemented Interfaces:
Serializable, Cloneable, Dumpable, Castable, Collection, Iteratorable, QueryColumn, Reference

public class SimpleQueryColumn
extends Object
implements QueryColumn

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface railo.runtime.type.Collection
Collection.Key
 
Constructor Summary
SimpleQueryColumn(SimpleQuery qry, ResultSet res, Collection.Key key, int type, int index)
           
 
Method Summary
 void add(Object value)
          adds a value to the column
 void addRow(int count)
           
 Boolean castToBoolean(Boolean defaultValue)
          cast the castable value to a boolean value
 boolean castToBooleanValue()
          cast the castable value to a boolean value
 DateTime castToDateTime()
          cast the castable value to a date time object
 DateTime castToDateTime(DateTime defaultValue)
          cast the castable value to a date time object
 double castToDoubleValue()
          cast the castable value to a double value
 double castToDoubleValue(double defaultValue)
          cast the castable value to a double value
 String castToString()
          cast the castable value to a string, other than the Method toString, this Method can throw a Exception
 String castToString(String defaultValue)
          cast the castable value to a string, return the default value, when the method is not castable
 void clear()
          clears the collection
 Object clone()
           
 int compareTo(boolean b)
           
 int compareTo(DateTime dt)
           
 int compareTo(double d)
           
 int compareTo(String str)
           
 boolean containsKey(Collection.Key key)
          contains this key
 boolean containsKey(String key)
          contains this key
 void cutRowsTo(int maxrows)
          cuts row to defined size
 Collection duplicate(boolean deepCopy)
           
 Object get(Collection.Key key)
          return a value from the collection
 Object get(Collection.Key key, Object defaultValue)
          return a value from the collection, if key doesn't exist, dont throw a exception, reeturns null
 Object get(int row)
          get method with a int as key
 Object get(int row, Object defaultValue)
          getExpressionLess method with a int as key
 Object get(PageContext pc)
           
 Object get(PageContext pc, Object defaultValue)
           
 Object get(String key)
          return a value from the collection
 Object get(String key, Object defaultValue)
          return a value from the collection, if key doesn't exist, dont throw a exception, reeturns null
 int getIndex()
           
 Collection.Key getKey()
           
 String getKeyAsString()
           
 Object getParent()
           
 int getType()
           
 String getTypeAsString()
           
 Iterator iterator()
           
 Iterator keyIterator()
           
 Collection.Key[] keys()
           
 String[] keysAsString()
           
 Object remove(Collection.Key key)
          removes value from collection and return it when it exists, otherwise throws a exception
 Object remove(int row)
          removes the value but dont the index
 Object remove(PageContext pc)
          clears the variable from collection
 Object removeEL(Collection.Key key)
          removes value from collection and return it when it exists, otherwise returns null
 Object removeEL(int row)
          removes method with int as key
 Object removeEL(PageContext pc)
          clears the variable from collection
 Object removeRow(int row)
          remove a row from query
 Object set(Collection.Key key, Object value)
          sets a value to the collection
 Object set(int row, Object value)
          set method with a int as key
 Object set(PageContext pc, Object value)
           
 Object set(String key, Object value)
          sets a value to the collection
 Object setEL(Collection.Key key, Object value)
          sets a value to the collection, if key doesn't exist, dont throw a exception, returns null
 Object setEL(int row, Object value)
          setExpressionLess method with a int as key
 Object setEL(PageContext pc, Object value)
           
 Object setEL(String key, Object value)
          sets a value to the collection, if key doesn't exist, dont throw a exception, returns null
 int size()
           
 DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties properties)
          method to print out information to a object as HTML
 Object touch(PageContext pc)
          create it when not exists
 Object touchEL(PageContext pc)
          create it when not exists
 Iterator valueIterator()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleQueryColumn

public SimpleQueryColumn(SimpleQuery qry,
                         ResultSet res,
                         Collection.Key key,
                         int type,
                         int index)
Method Detail

get

public Object get(Collection.Key key,
                  Object defaultValue)
Description copied from interface: Collection
return a value from the collection, if key doesn't exist, dont throw a exception, reeturns null

Specified by:
get in interface Collection
Parameters:
key - key of the value to get
Returns:
value on key position or null

get

public Object get(Collection.Key key)
           throws PageException
Description copied from interface: Collection
return a value from the collection

Specified by:
get in interface Collection
Parameters:
key - key of the value to get must be lower case
Returns:
value on key position
Throws:
PageException

size

public int size()
Specified by:
size in interface Collection
Returns:
the size of the collection

keys

public Collection.Key[] keys()
Specified by:
keys in interface Collection
Returns:
returns a string array of all keys in the collection

keysAsString

public String[] keysAsString()
Specified by:
keysAsString in interface Collection
Returns:
returns a string array of all keys in the collection

remove

public Object remove(Collection.Key key)
              throws PageException
Description copied from interface: Collection
removes value from collection and return it when it exists, otherwise throws a exception

Specified by:
remove in interface Collection
Parameters:
key - key of the collection
Returns:
removed Object
Throws:
PageException

removeEL

public Object removeEL(Collection.Key key)
Description copied from interface: Collection
removes value from collection and return it when it exists, otherwise returns null

Specified by:
removeEL in interface Collection
Parameters:
key - key of the collection
Returns:
removed Object

clear

public void clear()
Description copied from interface: Collection
clears the collection

Specified by:
clear in interface Collection

get

public Object get(String key)
           throws PageException
Description copied from interface: Collection
return a value from the collection

Specified by:
get in interface Collection
Parameters:
key - key of the value to get
Returns:
value on key position
Throws:
PageException

get

public Object get(String key,
                  Object defaultValue)
Description copied from interface: Collection
return a value from the collection, if key doesn't exist, dont throw a exception, reeturns null

Specified by:
get in interface Collection
Parameters:
key - key of the value to get
Returns:
value on key position or null

set

public Object set(String key,
                  Object value)
           throws PageException
Description copied from interface: Collection
sets a value to the collection

Specified by:
set in interface Collection
Parameters:
key - key of the new value
value - value to set
Returns:
value setted
Throws:
PageException

set

public Object set(Collection.Key key,
                  Object value)
           throws PageException
Description copied from interface: Collection
sets a value to the collection

Specified by:
set in interface Collection
Parameters:
key - key of the new value
value - value to set
Returns:
value setted
Throws:
PageException

setEL

public Object setEL(String key,
                    Object value)
Description copied from interface: Collection
sets a value to the collection, if key doesn't exist, dont throw a exception, returns null

Specified by:
setEL in interface Collection
Parameters:
key - key of the value to get
value - value to set
Returns:
value on key position or null

setEL

public Object setEL(Collection.Key key,
                    Object value)
Description copied from interface: Collection
sets a value to the collection, if key doesn't exist, dont throw a exception, returns null

Specified by:
setEL in interface Collection
Parameters:
key - key of the value to get
value - value to set
Returns:
value on key position or null

duplicate

public Collection duplicate(boolean deepCopy)
Specified by:
duplicate in interface Collection

containsKey

public boolean containsKey(String key)
Description copied from interface: Collection
contains this key

Specified by:
containsKey in interface Collection
Returns:
returns if collection has a key with given name

containsKey

public boolean containsKey(Collection.Key key)
Description copied from interface: Collection
contains this key

Specified by:
containsKey in interface Collection
Returns:
returns if collection has a key with given name

toDumpData

public DumpData toDumpData(PageContext pageContext,
                           int maxlevel,
                           DumpProperties properties)
Description copied from interface: Dumpable
method to print out information to a object as HTML

Specified by:
toDumpData in interface Dumpable
Returns:
HTML print out

keyIterator

public Iterator keyIterator()
Specified by:
keyIterator in interface Iteratorable
Returns:
return a Iterator for Keys as String

valueIterator

public Iterator valueIterator()
Specified by:
valueIterator in interface Iteratorable
Returns:
return a Iterator for Values

iterator

public Iterator iterator()
Specified by:
iterator in interface Iteratorable
Returns:
return a Iterator for keys

castToString

public String castToString()
                    throws PageException
Description copied from interface: Castable
cast the castable value to a string, other than the Method toString, this Method can throw a Exception

Specified by:
castToString in interface Castable
Returns:
String representation of the Object
Throws:
PageException

castToString

public String castToString(String defaultValue)
Description copied from interface: Castable
cast the castable value to a string, return the default value, when the method is not castable

Specified by:
castToString in interface Castable
Returns:
String representation of the Object

castToBooleanValue

public boolean castToBooleanValue()
                           throws PageException
Description copied from interface: Castable
cast the castable value to a boolean value

Specified by:
castToBooleanValue in interface Castable
Returns:
boolean Value representation of the Object
Throws:
PageException

castToBoolean

public Boolean castToBoolean(Boolean defaultValue)
Description copied from interface: Castable
cast the castable value to a boolean value

Specified by:
castToBoolean in interface Castable
Returns:
boolean Value representation of the Object

castToDoubleValue

public double castToDoubleValue()
                         throws PageException
Description copied from interface: Castable
cast the castable value to a double value

Specified by:
castToDoubleValue in interface Castable
Returns:
double Value representation of the Object
Throws:
PageException

castToDoubleValue

public double castToDoubleValue(double defaultValue)
Description copied from interface: Castable
cast the castable value to a double value

Specified by:
castToDoubleValue in interface Castable
Returns:
double Value representation of the Object

castToDateTime

public DateTime castToDateTime()
                        throws PageException
Description copied from interface: Castable
cast the castable value to a date time object

Specified by:
castToDateTime in interface Castable
Returns:
date time representation of the Object
Throws:
PageException

castToDateTime

public DateTime castToDateTime(DateTime defaultValue)
Description copied from interface: Castable
cast the castable value to a date time object

Specified by:
castToDateTime in interface Castable
Parameters:
defaultValue - returned when it is not possible to cast to a dateTime object
Returns:
date time representation of the Object

compareTo

public int compareTo(String str)
              throws PageException
Specified by:
compareTo in interface Castable
Throws:
PageException

compareTo

public int compareTo(boolean b)
              throws PageException
Specified by:
compareTo in interface Castable
Throws:
PageException

compareTo

public int compareTo(double d)
              throws PageException
Specified by:
compareTo in interface Castable
Throws:
PageException

compareTo

public int compareTo(DateTime dt)
              throws PageException
Specified by:
compareTo in interface Castable
Throws:
PageException

getKeyAsString

public String getKeyAsString()
Specified by:
getKeyAsString in interface Reference
Returns:
returns the value of the Variable

getKey

public Collection.Key getKey()
Specified by:
getKey in interface Reference
Returns:
returns the value of the Variable

get

public Object get(PageContext pc)
           throws PageException
Specified by:
get in interface Reference
Parameters:
pc - PageContext of the actuell Request
Returns:
returns the value of the Variable
Throws:
PageException

get

public Object get(PageContext pc,
                  Object defaultValue)
Specified by:
get in interface Reference
Parameters:
pc - PageContext of the actuell Request
Returns:
returns the value of the Variable

set

public Object set(PageContext pc,
                  Object value)
           throws PageException
Specified by:
set in interface Reference
Parameters:
pc - PageContext of the actuell Request
value - resets the value of the variable
Returns:
new Value setted
Throws:
PageException

setEL

public Object setEL(PageContext pc,
                    Object value)
Specified by:
setEL in interface Reference
Parameters:
pc - PageContext of the actuell Request
value - resets the value of the variable
Returns:
new Value setted

remove

public Object remove(PageContext pc)
              throws PageException
Description copied from interface: Reference
clears the variable from collection

Specified by:
remove in interface Reference
Returns:
removed Object
Throws:
PageException

removeEL

public Object removeEL(PageContext pc)
Description copied from interface: Reference
clears the variable from collection

Specified by:
removeEL in interface Reference
Returns:
removed Object

touch

public Object touch(PageContext pc)
             throws PageException
Description copied from interface: Reference
create it when not exists

Specified by:
touch in interface Reference
Returns:
removed Object
Throws:
PageException

touchEL

public Object touchEL(PageContext pc)
Description copied from interface: Reference
create it when not exists

Specified by:
touchEL in interface Reference
Returns:
removed Object

getParent

public Object getParent()
Specified by:
getParent in interface Reference
Returns:
returns the collection

remove

public Object remove(int row)
              throws PageException
Description copied from interface: QueryColumn
removes the value but dont the index

Specified by:
remove in interface QueryColumn
Returns:
removed Object
Throws:
PageException

removeRow

public Object removeRow(int row)
                 throws PageException
Description copied from interface: QueryColumn
remove a row from query

Specified by:
removeRow in interface QueryColumn
Returns:
removed value
Throws:
PageException

removeEL

public Object removeEL(int row)
Description copied from interface: QueryColumn
removes method with int as key

Specified by:
removeEL in interface QueryColumn
Returns:
removed Object

get

public Object get(int row)
           throws PageException
Description copied from interface: QueryColumn
get method with a int as key

Specified by:
get in interface QueryColumn
Parameters:
row - row to get value
Returns:
row value
Throws:
PageException

get

public Object get(int row,
                  Object defaultValue)
Description copied from interface: QueryColumn
getExpressionLess method with a int as key

Specified by:
get in interface QueryColumn
Parameters:
row - row to get value
Returns:
row value

set

public Object set(int row,
                  Object value)
           throws PageException
Description copied from interface: QueryColumn
set method with a int as key

Specified by:
set in interface QueryColumn
Parameters:
row - row to set
value - value to set
Returns:
setted value
Throws:
PageException

add

public void add(Object value)
Description copied from interface: QueryColumn
adds a value to the column

Specified by:
add in interface QueryColumn
Parameters:
value - value to add

setEL

public Object setEL(int row,
                    Object value)
Description copied from interface: QueryColumn
setExpressionLess method with a int as key

Specified by:
setEL in interface QueryColumn
Parameters:
row - row to set
value - value to set
Returns:
setted value

addRow

public void addRow(int count)
Specified by:
addRow in interface QueryColumn
Parameters:
count - adds count row to the column

getType

public int getType()
Specified by:
getType in interface QueryColumn
Returns:
returns the type of the Column (java.sql.Types.XYZ)

getTypeAsString

public String getTypeAsString()
Specified by:
getTypeAsString in interface QueryColumn
Returns:
returns the type of the Column as String

cutRowsTo

public void cutRowsTo(int maxrows)
Description copied from interface: QueryColumn
cuts row to defined size

Specified by:
cutRowsTo in interface QueryColumn

clone

public Object clone()
Specified by:
clone in interface Collection
Overrides:
clone in class Object
Returns:
this object cloned

getIndex

public int getIndex()


Copyright © 2012 Railo