railo.runtime.type
Class QueryColumnImpl

java.lang.Object
  extended by railo.runtime.type.QueryColumnImpl
All Implemented Interfaces:
Serializable, Cloneable, Dumpable, Castable, Collection, ForEachIteratorable, Iteratorable, Objects, QueryColumn, QueryColumnPro, Reference, Sizeable
Direct Known Subclasses:
DebugQueryColumn

public class QueryColumnImpl
extends Object
implements QueryColumnPro, Sizeable, Objects

implementation of the query column

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface railo.runtime.type.Collection
Collection.Key
 
Constructor Summary
QueryColumnImpl()
          Constructor of the class for internal usage only
QueryColumnImpl(QueryImpl query, Collection.Key key, Array array, int type)
          constructor with array
QueryColumnImpl(QueryImpl query, Collection.Key key, int type)
          constructor with type
QueryColumnImpl(QueryImpl query, Collection.Key key, int type, int size)
           
 
Method Summary
 DebugQueryColumn _toDebugColumn()
           
 void add(int index, Object element)
           
 void add(Object value)
          adds a value to the column
 boolean addAll(Collection<? extends Object> c)
           
 boolean addAll(int index, Collection<? extends Object> c)
           
 void addRow(int count)
           
 Object call(PageContext pc, Collection.Key methodName, Object[] arguments)
          calls a method of the object
 Object callWithNamedValues(PageContext pc, Collection.Key methodName, Struct args)
          call a method of the Object with named arguments
 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()
           
 QueryColumnPro cloneColumn(Query query, boolean deepCopy)
           
 QueryColumnImpl cloneColumnImpl(boolean deepCopy)
           
 int compareTo(boolean b)
           
 int compareTo(DateTime dt)
           
 int compareTo(double d)
           
 int compareTo(String str)
           
 boolean contains(Object o)
           
 boolean containsAll(Collection<?> c)
           
 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)
           
 Iterator<Map.Entry<Collection.Key,Object>> entryIterator()
           
 boolean equals(Object obj)
           
 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, return empty default value for invalid row
 Object get(int row, Object defaultValue)
          return the value in this row (can be null), when row number is invalid the default value is returned
 Object get(PageContext pc)
           
 Object get(PageContext pc, Collection.Key key)
          return property or getter of the ContextCollection
 Object get(PageContext pc, Collection.Key key, Object defaultValue)
          return property
 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
 Iterator<String> getIterator()
           
 Collection.Key getKey()
           
 String getKeyAsString()
           
 Object getParent()
           
 int getType()
           
 String getTypeAsString()
           
 int hashCode()
           
 int indexOf(Object o)
           
 boolean isEmpty()
           
 Iterator iterator()
           
 Iterator<Collection.Key> keyIterator()
           
 Collection.Key[] keys()
           
 Iterator<String> keysAsStringIterator()
           
 int lastIndexOf(Object o)
           
 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
 boolean removeAll(Collection<?> c)
           
 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
 boolean retainAll(Collection<?> c)
           
 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, Collection.Key propertyName, Object value)
          sets a property (Data Member) value of the object
 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, Collection.Key propertyName, Object value)
          sets a property (Data Member) value of the object
 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
 void setKey(Collection.Key key)
           
 int size()
           
 long sizeOf()
          return the size of the object
 List<Object> subList(int fromIndex, int toIndex)
           
 Object[] toArray()
           
 Object[] toArray(Object[] trg)
           
 QueryColumnPro toDebugColumn()
           
 DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties dp)
          method to print out information to a object as HTML
 String toString()
           
 Object touch(int row)
          touch the given line on the column at given row
 Object touch(PageContext pc)
          create it when not exist
 Object touchEL(int row)
          touch the given line on the column at given row
 Object touchEL(PageContext pc)
          create it when not exist
 Iterator<Object> valueIterator()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QueryColumnImpl

public QueryColumnImpl(QueryImpl query,
                       Collection.Key key,
                       int type)
constructor with type

Parameters:
query -
key -
type -

QueryColumnImpl

public QueryColumnImpl(QueryImpl query,
                       Collection.Key key,
                       Array array,
                       int type)
constructor with array

Parameters:
query -
array -
type -

QueryColumnImpl

public QueryColumnImpl(QueryImpl query,
                       Collection.Key key,
                       int type,
                       int size)
Parameters:
query -
type - type as (java.sql.Types.XYZ) int
size -

QueryColumnImpl

public QueryColumnImpl()
Constructor of the class for internal usage only

Method Detail

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

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

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

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

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

clear

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

Specified by:
clear in interface Collection

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

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(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

get

public Object get(PageContext pc,
                  Collection.Key key)
           throws PageException
Description copied from interface: Objects
return property or getter of the ContextCollection

Specified by:
get in interface Objects
Parameters:
pc - PageContext
key - Name of the Property
Returns:
return value of the Property
Throws:
PageException

touch

public Object touch(int row)
touch the given line on the column at given row

Parameters:
row -
Returns:
new row or existing
Throws:
DatabaseException

touchEL

public Object touchEL(int row)
touch the given line on the column at given row

Parameters:
row -
Returns:
new row or existing
Throws:
DatabaseException

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(PageContext pc,
                  Collection.Key key,
                  Object defaultValue)
Description copied from interface: Objects
return property

Specified by:
get in interface Objects
Parameters:
pc - PageContext
key - Name of the Property
Returns:
return value of the Property

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

get

public Object get(int row)
           throws DeprecatedException
Description copied from interface: QueryColumn
get method with a int as key, return empty default value for invalid row

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

get

public Object get(int row,
                  Object defaultValue)
Description copied from interface: QueryColumn
return the value in this row (can be null), when row number is invalid the default value is returned

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

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

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

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

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

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

cutRowsTo

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

Specified by:
cutRowsTo in interface QueryColumn

addRow

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

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

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

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

getKey

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

setKey

public void setKey(Collection.Key key)
Specified by:
setKey in interface QueryColumnPro

getKeyAsString

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

get

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

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

touch

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

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 exist

Specified by:
touchEL in interface Reference
Returns:
removed Object

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

getParent

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

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(boolean b)
              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

compareTo

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

compareTo

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

clone

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

duplicate

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

cloneColumn

public QueryColumnPro cloneColumn(Query query,
                                  boolean deepCopy)
Specified by:
cloneColumn in interface QueryColumnPro

cloneColumnImpl

public QueryColumnImpl cloneColumnImpl(boolean deepCopy)

toString

public String toString()
Overrides:
toString in class Object

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

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

iterator

public Iterator iterator()

keyIterator

public Iterator<Collection.Key> keyIterator()
Specified by:
keyIterator in interface Iteratorable
Returns:
return a Iterator for Keys as Collection.Keys

keysAsStringIterator

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

entryIterator

public Iterator<Map.Entry<Collection.Key,Object>> entryIterator()
Specified by:
entryIterator in interface Iteratorable

valueIterator

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

callWithNamedValues

public Object callWithNamedValues(PageContext pc,
                                  Collection.Key methodName,
                                  Struct args)
                           throws PageException
Description copied from interface: Objects
call a method of the Object with named arguments

Specified by:
callWithNamedValues in interface Objects
Parameters:
pc - PageContext
methodName - name of the method
args - Named Arguments for the method
Returns:
return result of the method
Throws:
PageException

call

public Object call(PageContext pc,
                   Collection.Key methodName,
                   Object[] arguments)
            throws PageException
Description copied from interface: Objects
calls a method of the object

Specified by:
call in interface Objects
methodName - name of the method to call
arguments - arguments to call method with
Returns:
return value of the method
Throws:
PageException

set

public Object set(PageContext pc,
                  Collection.Key propertyName,
                  Object value)
           throws PageException
Description copied from interface: Objects
sets a property (Data Member) value of the object

Specified by:
set in interface Objects
propertyName - property name to set
value - value to insert
Returns:
value set to property
Throws:
PageException

setEL

public Object setEL(PageContext pc,
                    Collection.Key propertyName,
                    Object value)
Description copied from interface: Objects
sets a property (Data Member) value of the object

Specified by:
setEL in interface Objects
propertyName - property name to set
value - value to insert
Returns:
value set to property

add

public void add(int index,
                Object element)

addAll

public boolean addAll(Collection<? extends Object> c)

addAll

public boolean addAll(int index,
                      Collection<? extends Object> c)

contains

public boolean contains(Object o)

containsAll

public boolean containsAll(Collection<?> c)

indexOf

public int indexOf(Object o)

lastIndexOf

public int lastIndexOf(Object o)

isEmpty

public boolean isEmpty()

removeAll

public boolean removeAll(Collection<?> c)

retainAll

public boolean retainAll(Collection<?> c)

subList

public List<Object> subList(int fromIndex,
                            int toIndex)

toArray

public Object[] toArray()

toArray

public Object[] toArray(Object[] trg)

toDebugColumn

public QueryColumnPro toDebugColumn()
Specified by:
toDebugColumn in interface QueryColumnPro

_toDebugColumn

public DebugQueryColumn _toDebugColumn()

getIterator

public Iterator<String> getIterator()
Specified by:
getIterator in interface ForEachIteratorable

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2012 Railo