public final class QueryColumnRef extends Object implements QueryColumn, Sizeable
Collection.Key
Constructor and Description |
---|
QueryColumnRef(Query query,
Collection.Key columnName,
int type)
Constructor of the class
|
Modifier and Type | Method and Description |
---|---|
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) |
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,
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() |
Iterator<Collection.Key> |
keyIterator() |
Collection.Key[] |
keys() |
Iterator<String> |
keysAsStringIterator() |
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 exist
|
Object |
touchEL(int row) |
Object |
touchEL(PageContext pc)
create it when not exist
|
Iterator<Object> |
valueIterator() |
public QueryColumnRef(Query query, Collection.Key columnName, int type)
query
- columnName
- type
- public Object remove(int row) throws DatabaseException
QueryColumn
remove
in interface QueryColumn
DatabaseException
public Object removeEL(int row)
QueryColumn
removeEL
in interface QueryColumn
public Object get(int row) throws PageException
QueryColumn
get
in interface QueryColumn
row
- row to get valuePageException
public Object touch(int row) throws PageException
row
- PageException
public Object get(int row, Object defaultValue)
QueryColumn
get
in interface QueryColumn
row
- row to get valuedefaultValue
- value returned when row does not exists or the rows value is nullpublic Object set(int row, Object value) throws DatabaseException
QueryColumn
set
in interface QueryColumn
row
- row to setvalue
- value to setDatabaseException
public Object setEL(int row, Object value)
QueryColumn
setEL
in interface QueryColumn
row
- row to setvalue
- value to setpublic void add(Object value)
QueryColumn
add
in interface QueryColumn
value
- value to addpublic void addRow(int count)
addRow
in interface QueryColumn
count
- adds count row to the columnpublic int getType()
getType
in interface QueryColumn
public String getTypeAsString()
getTypeAsString
in interface QueryColumn
public void cutRowsTo(int maxrows)
QueryColumn
cutRowsTo
in interface QueryColumn
public int size()
size
in interface Collection
public Collection.Key[] keys()
keys
in interface Collection
public Object remove(Collection.Key key) throws PageException
Collection
remove
in interface Collection
key
- key of the collectionPageException
public Object removeEL(Collection.Key key)
Collection
removeEL
in interface Collection
key
- key of the collectionpublic void clear()
Collection
clear
in interface Collection
public Object get(String key) throws PageException
Collection
get
in interface Collection
key
- key of the value to getPageException
public Object get(Collection.Key key) throws PageException
Collection
get
in interface Collection
key
- key of the value to get must be lower casePageException
public Object get(String key, Object defaultValue)
Collection
get
in interface Collection
key
- key of the value to getpublic Object get(Collection.Key key, Object defaultValue)
Collection
get
in interface Collection
key
- key of the value to getpublic Object set(String key, Object value) throws PageException
Collection
set
in interface Collection
key
- key of the new valuevalue
- value to setPageException
public Object set(Collection.Key key, Object value) throws PageException
Collection
set
in interface Collection
key
- key of the new valuevalue
- value to setPageException
public Object setEL(String key, Object value)
Collection
setEL
in interface Collection
key
- key of the value to getvalue
- value to setpublic Object setEL(Collection.Key key, Object value)
Collection
setEL
in interface Collection
key
- key of the value to getvalue
- value to setpublic Iterator<Collection.Key> keyIterator()
keyIterator
in interface Iteratorable
public Iterator<String> keysAsStringIterator()
keysAsStringIterator
in interface Iteratorable
public Iterator<Map.Entry<Collection.Key,Object>> entryIterator()
entryIterator
in interface Iteratorable
public Iterator<Object> valueIterator()
valueIterator
in interface Iteratorable
public boolean containsKey(String key)
Collection
containsKey
in interface Collection
public boolean containsKey(Collection.Key key)
Collection
containsKey
in interface Collection
public DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties dp)
Dumpable
toDumpData
in interface Dumpable
public String castToString() throws PageException
Castable
castToString
in interface Castable
PageException
public String castToString(String defaultValue)
Castable
castToString
in interface Castable
public boolean castToBooleanValue() throws PageException
Castable
castToBooleanValue
in interface Castable
PageException
public Boolean castToBoolean(Boolean defaultValue)
Castable
castToBoolean
in interface Castable
public double castToDoubleValue() throws PageException
Castable
castToDoubleValue
in interface Castable
PageException
public double castToDoubleValue(double defaultValue)
Castable
castToDoubleValue
in interface Castable
public DateTime castToDateTime() throws PageException
Castable
castToDateTime
in interface Castable
PageException
public DateTime castToDateTime(DateTime defaultValue)
Castable
castToDateTime
in interface Castable
defaultValue
- returned when it is not possible to cast to a dateTime objectpublic int compareTo(boolean b) throws PageException
compareTo
in interface Castable
PageException
public int compareTo(DateTime dt) throws PageException
compareTo
in interface Castable
PageException
public int compareTo(double d) throws PageException
compareTo
in interface Castable
PageException
public int compareTo(String str) throws PageException
compareTo
in interface Castable
PageException
public String getKeyAsString() throws PageException
getKeyAsString
in interface Reference
PageException
public Collection.Key getKey() throws PageException
getKey
in interface Reference
PageException
public Object get(PageContext pc) throws PageException
get
in interface Reference
pc
- PageContext of the actuell RequestPageException
public Object get(PageContext pc, Object defaultValue)
public Object removeRow(int row) throws DatabaseException
QueryColumn
removeRow
in interface QueryColumn
DatabaseException
public Object touch(PageContext pc) throws PageException
Reference
touch
in interface Reference
PageException
public Object touchEL(PageContext pc)
Reference
public Object set(PageContext pc, Object value) throws PageException
set
in interface Reference
pc
- PageContext of the actuell Requestvalue
- resets the value of the variablePageException
public Object setEL(PageContext pc, Object value)
public Object remove(PageContext pc) throws PageException
Reference
remove
in interface Reference
PageException
public Object removeEL(PageContext pc)
Reference
public Object clone()
clone
in interface Collection
clone
in class Object
public Collection duplicate(boolean deepCopy)
duplicate
in interface Collection
public long sizeOf()
Sizeable
public Iterator<String> getIterator()
getIterator
in interface ForEachIteratorable
Copyright © 2015 Lucee