railo.runtime.type
Class QueryColumnRef

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

public final class QueryColumnRef
extends Object
implements QueryColumn, Sizeable

Recordcount Query Column

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface railo.runtime.type.Collection
Collection.Key
 
Constructor Summary
QueryColumnRef(Query query, Collection.Key columnName, int type)
          Constructor of the class
 
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(PageContext pc, String key)
           
 Object get(PageContext pc, String key, 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
 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()
           
 long sizeOf()
          return the size of the object
 DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties dp)
          method to print out information to a object as HTML
 Object touch(int row)
          touch a value, means if key dosent exist, it will created
 Object touch(PageContext pc)
          create it when not exists
 Object touchEL(int row)
           
 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

QueryColumnRef

public QueryColumnRef(Query query,
                      Collection.Key columnName,
                      int type)
Constructor of the class

Parameters:
query -
columnName -
type -
Method Detail

remove

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

Specified by:
remove in interface QueryColumn
Returns:
removed Object
Throws:
DatabaseException
See Also:
QueryColumn.remove(int)

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
See Also:
QueryColumn.removeEL(int)

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
See Also:
QueryColumn.get(int)

touch

public Object touch(int row)
             throws PageException
touch a value, means if key dosent exist, it will created

Parameters:
row -
Returns:
matching value or created value
Throws:
PageException

touchEL

public Object touchEL(int row)

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
See Also:
QueryColumn.get(int, java.lang.Object)

set

public Object set(int row,
                  Object value)
           throws DatabaseException
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:
DatabaseException
See Also:
QueryColumn.set(int, java.lang.Object)

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
See Also:
QueryColumn.setEL(int, java.lang.Object)

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
See Also:
QueryColumn.add(java.lang.Object)

addRow

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

getType

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

getTypeAsString

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

cutRowsTo

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

Specified by:
cutRowsTo in interface QueryColumn
See Also:
QueryColumn.cutRowsTo(int)

get

public Object get(PageContext pc,
                  String key,
                  Object defaultValue)
See Also:
railo.runtime.type.ContextCollection#get(railo.runtime.PageContext, java.lang.String, java.lang.Object)

get

public Object get(PageContext pc,
                  String key)
           throws PageException
Throws:
PageException
See Also:
railo.runtime.type.ContextCollection#get(railo.runtime.PageContext, java.lang.String)

size

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

keysAsString

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

keys

public Collection.Key[] keys()
Specified by:
keys 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
See Also:
Collection.remove(railo.runtime.type.Collection.Key)

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
See Also:
Collection.removeEL(railo.runtime.type.Collection.Key)

clear

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

Specified by:
clear in interface Collection
See Also:
Collection.clear()

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
See Also:
Collection.get(java.lang.String)

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
See Also:
Collection.get(railo.runtime.type.Collection.Key)

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
See Also:
Collection.get(java.lang.String, java.lang.Object)

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
See Also:
Collection.get(railo.runtime.type.Collection.Key, java.lang.Object)

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
See Also:
Collection.set(java.lang.String, java.lang.Object)

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
See Also:
Collection.set(railo.runtime.type.Collection.Key, java.lang.Object)

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
See Also:
Collection.setEL(java.lang.String, java.lang.Object)

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
See Also:
Collection.setEL(railo.runtime.type.Collection.Key, java.lang.Object)

keyIterator

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

valueIterator

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

iterator

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

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
See Also:
Collection.containsKey(java.lang.String)

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
See Also:
Collection.containsKey(railo.runtime.type.Collection.Key)

toDumpData

public DumpData toDumpData(PageContext pageContext,
                           int maxlevel,
                           DumpProperties dp)
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
See Also:
railo.runtime.dump.Dumpable#toDumpData(railo.runtime.PageContext, int)

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
See Also:
Castable.castToString()

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
See Also:
Castable.castToString(java.lang.String)

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
See Also:
Castable.castToBooleanValue()

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
See Also:
Castable.castToBoolean(java.lang.Boolean)

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
See Also:
Castable.castToDoubleValue()

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
See Also:
Castable.castToDoubleValue(double)

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
See Also:
Castable.castToDateTime()

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
See Also:
Castable.castToDateTime(railo.runtime.type.dt.DateTime)

compareTo

public int compareTo(boolean b)
              throws PageException
Specified by:
compareTo in interface Castable
Throws:
PageException
See Also:
railo.runtime.op.Castable#compare(boolean)

compareTo

public int compareTo(DateTime dt)
              throws PageException
Specified by:
compareTo in interface Castable
Throws:
PageException
See Also:
Castable.compareTo(railo.runtime.type.dt.DateTime)

compareTo

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

compareTo

public int compareTo(String str)
              throws PageException
Specified by:
compareTo in interface Castable
Throws:
PageException
See Also:
Castable.compareTo(java.lang.String)

getKeyAsString

public String getKeyAsString()
                      throws PageException
Specified by:
getKeyAsString in interface Reference
Returns:
returns the value of the Variable
Throws:
PageException
See Also:
Reference.getKeyAsString()

getKey

public Collection.Key getKey()
                      throws PageException
Specified by:
getKey in interface Reference
Returns:
returns the value of the Variable
Throws:
PageException
See Also:
Reference.getKey()

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
See Also:
Reference.get(railo.runtime.PageContext)

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
See Also:
Reference.get(railo.runtime.PageContext, java.lang.Object)

removeRow

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

Specified by:
removeRow in interface QueryColumn
Returns:
removed value
Throws:
DatabaseException
See Also:
QueryColumn.removeRow(int)

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
See Also:
Reference.touch(railo.runtime.PageContext)

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
See Also:
Reference.touchEL(railo.runtime.PageContext)

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
See Also:
Reference.set(railo.runtime.PageContext, java.lang.Object)

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
See Also:
Reference.setEL(railo.runtime.PageContext, java.lang.Object)

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
See Also:
Reference.remove(railo.runtime.PageContext)

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
See Also:
Reference.removeEL(railo.runtime.PageContext)

getParent

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

clone

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

duplicate

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

sizeOf

public long sizeOf()
Description copied from interface: Sizeable
return the size of the object

Specified by:
sizeOf in interface Sizeable
Returns:
size of the object
See Also:
Sizeable.sizeOf()


Copyright © 2012 Railo