public final class UndefinedImpl extends StructSupport implements Undefined
Collection.Key
MODE_LOCAL_OR_ARGUMENTS_ALWAYS, MODE_LOCAL_OR_ARGUMENTS_ONLY_WHEN_EXISTS, MODE_NO_LOCAL_AND_ARGUMENTS
SCOPE_APPLICATION, SCOPE_ARGUMENTS, SCOPE_CALLER, SCOPE_CGI, SCOPE_CLIENT, SCOPE_CLUSTER, SCOPE_COOKIE, SCOPE_COUNT, SCOPE_FORM, SCOPE_LOCAL, SCOPE_REQUEST, SCOPE_SERVER, SCOPE_SESSION, SCOPE_UNDEFINED, SCOPE_URL, SCOPE_VAR, SCOPE_VARIABLES
TYPE_LINKED, TYPE_REGULAR, TYPE_SOFT, TYPE_SYNC, TYPE_WEAKED
Constructor and Description |
---|
UndefinedImpl(PageContextImpl pc,
short type)
constructor of the class
|
Modifier and Type | Method and Description |
---|---|
void |
addQuery(Query qry)
add a collection to the undefined scope
|
Argument |
argumentsScope() |
Object |
call(PageContext pc,
Collection.Key methodName,
Object[] args)
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
|
int |
compareTo(boolean b) |
int |
compareTo(DateTime dt) |
int |
compareTo(double d) |
int |
compareTo(String str) |
boolean |
containsKey(Collection.Key key)
contains this key
|
static void |
debugCascadedAccess(PageContext pc,
String name,
Collection.Key key) |
static void |
debugCascadedAccess(PageContext pc,
Variables var,
Object value,
Collection.Key key) |
Collection |
duplicate(boolean deepCopy) |
Iterator<Map.Entry<Collection.Key,Object>> |
entryIterator() |
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 |
getCascading(Collection.Key key)
gets a key from all cascaded scopes, but not from variables scope
|
Object |
getCascading(Collection.Key key,
Object defaultValue) |
Object |
getCascading(String strKey)
gets a key from all cascaded scopes, but not from variables scope
|
boolean |
getCheckArguments() |
Object |
getCollection(Collection.Key key)
return value matching key, if value is from Query return a QueryColumn
|
Object |
getCollection(String key)
return value matching key, if value is from Query return a QueryColumn
|
boolean |
getLocalAlways() |
QueryStack |
getQueryStack() |
Struct |
getScope(Collection.Key key) |
short |
getScopeCascadingType() |
Collection |
getScopeFor(Collection.Key key,
Scope defaultValue)
returns the scope that contains a specific key
|
List<String> |
getScopeNames()
return a list of String with the scope names
|
int |
getType() |
String |
getTypeAsString() |
void |
initialize(PageContext pc)
Initalize Scope
|
boolean |
isAllowImplicidQueryCall() |
boolean |
isInitalized()
return if the scope is Initialiesd
|
Iterator<Collection.Key> |
keyIterator() |
Collection.Key[] |
keys() |
Iterator<String> |
keysAsStringIterator() |
Local |
localScope() |
void |
reinitialize(PageContext pc) |
void |
release()
release scope for reuse
|
void |
release(PageContext pc)
release scope for reuse
|
Object |
remove(Collection.Key key)
removes value from collection and return it when it exists, otherwise throws a exception
|
Object |
removeEL(Collection.Key key)
removes value from collection and return it when it exists, otherwise returns null
|
void |
removeQuery()
remove a collection from the undefined scope
|
Object |
set(Collection.Key key,
Object value)
sets a value to the collection
|
boolean |
setAllowImplicidQueryCall(boolean allowImplicidQueryCall) |
Object |
setEL(Collection.Key key,
Object value)
sets a value to the collection, if key doesn't exist, dont throw a exception, returns null
|
void |
setFunctionScopes(Local local,
Argument argument)
sets the functions scopes
|
int |
setMode(int mode)
sets mode of scope
|
void |
setQueryStack(QueryStack qryStack)
sets a individual query stack to the undefined scope
|
void |
setVariableScope(Variables scope)
change the variable scope
|
int |
size() |
DumpData |
toDumpData(PageContext pageContext,
int maxlevel,
DumpProperties dp)
method to print out information to a object as HTML
|
Iterator<Object> |
valueIterator() |
Variables |
variablesScope() |
clone, containsKey, containsKey, containsValue, entrySet, equals, get, get, get, get, get, getIterator, invalidKey, isEmpty, keySet, put, putAll, remove, set, set, setEL, setEL, sizeOf, toString, values
getClass, hashCode, notify, notifyAll, wait, wait, wait
clone, containsKey, get, get, set, setEL
getIterator
public UndefinedImpl(PageContextImpl pc, short type)
pageContextImpl
- type
- type of the undefined scope (ServletConfigImpl.SCOPE_STRICT;ServletConfigImpl.SCOPE_SMALL;ServletConfigImpl.SCOPE_STANDART)public Local localScope()
localScope
in interface Undefined
public Argument argumentsScope()
argumentsScope
in interface Undefined
public Variables variablesScope()
variablesScope
in interface Undefined
public int setMode(int mode)
Undefined
public boolean getLocalAlways()
getLocalAlways
in interface Undefined
public void setFunctionScopes(Local local, Argument argument)
Undefined
setFunctionScopes
in interface Undefined
local
- local scopeargument
- argument scopepublic QueryStack getQueryStack()
getQueryStack
in interface Undefined
public void setQueryStack(QueryStack qryStack)
Undefined
setQueryStack
in interface Undefined
qryStack
- Query stackpublic void addQuery(Query qry)
Undefined
public void removeQuery()
Undefined
removeQuery
in interface Undefined
public int size()
size
in interface Map
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 Map
clear
in interface Collection
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 static void debugCascadedAccess(PageContext pc, Variables var, Object value, Collection.Key key)
public static void debugCascadedAccess(PageContext pc, String name, Collection.Key key)
public Object getCollection(String key) throws PageException
Undefined
getCollection
in interface Undefined
PageException
public Struct getScope(Collection.Key key)
public Collection getScopeFor(Collection.Key key, Scope defaultValue)
key
- public List<String> getScopeNames()
getScopeNames
in interface Undefined
key
- public Object getCollection(Collection.Key key) throws PageException
Undefined
getCollection
in interface Undefined
PageException
public Object get(Collection.Key key, Object defaultValue)
Collection
get
in interface Collection
key
- key of the value to getpublic Object getCascading(String strKey)
Undefined
getCascading
in interface Undefined
strKey
- key to getpublic Object getCascading(Collection.Key key)
Undefined
getCascading
in interface Undefined
key
- key to getpublic Object getCascading(Collection.Key key, Object defaultValue)
public Object setEL(Collection.Key key, Object value)
Collection
setEL
in interface Collection
key
- key of the value to getvalue
- value to setpublic Object set(Collection.Key key, Object value) throws PageException
Collection
set
in interface Collection
key
- key of the new valuevalue
- value to setPageException
public DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties dp)
Dumpable
toDumpData
in interface Dumpable
toDumpData
in class StructSupport
public Iterator<Collection.Key> keyIterator()
keyIterator
in interface Iteratorable
public Iterator<String> keysAsStringIterator()
keysAsStringIterator
in interface Iteratorable
keysAsStringIterator
in class StructSupport
public Iterator<Map.Entry<Collection.Key,Object>> entryIterator()
entryIterator
in interface Iteratorable
public Iterator<Object> valueIterator()
valueIterator
in interface Iteratorable
public boolean isInitalized()
Scope
isInitalized
in interface Scope
public void initialize(PageContext pc)
Scope
initialize
in interface Scope
pc
- Page Contextpublic void reinitialize(PageContext pc)
reinitialize
in interface Undefined
public final void release()
Scope
public final void release(PageContext pc)
Scope
public Collection duplicate(boolean deepCopy)
duplicate
in interface Collection
public boolean containsKey(Collection.Key key)
Collection
containsKey
in interface Collection
public String castToString() throws ExpressionException
Castable
castToString
in interface Castable
castToString
in class StructSupport
ExpressionException
public String castToString(String defaultValue)
Castable
castToString
in interface Castable
castToString
in class StructSupport
public boolean castToBooleanValue() throws ExpressionException
Castable
castToBooleanValue
in interface Castable
castToBooleanValue
in class StructSupport
ExpressionException
public Boolean castToBoolean(Boolean defaultValue)
Castable
castToBoolean
in interface Castable
castToBoolean
in class StructSupport
public double castToDoubleValue() throws ExpressionException
Castable
castToDoubleValue
in interface Castable
castToDoubleValue
in class StructSupport
ExpressionException
public double castToDoubleValue(double defaultValue)
Castable
castToDoubleValue
in interface Castable
castToDoubleValue
in class StructSupport
public DateTime castToDateTime() throws ExpressionException
Castable
castToDateTime
in interface Castable
castToDateTime
in class StructSupport
ExpressionException
public DateTime castToDateTime(DateTime defaultValue)
Castable
castToDateTime
in interface Castable
castToDateTime
in class StructSupport
defaultValue
- returned when it is not possible to cast to a dateTime objectpublic int compareTo(boolean b) throws ExpressionException
compareTo
in interface Castable
compareTo
in class StructSupport
ExpressionException
public int compareTo(DateTime dt) throws PageException
compareTo
in interface Castable
compareTo
in class StructSupport
PageException
public int compareTo(double d) throws PageException
compareTo
in interface Castable
compareTo
in class StructSupport
PageException
public int compareTo(String str) throws PageException
compareTo
in interface Castable
compareTo
in class StructSupport
PageException
public void setVariableScope(Variables scope)
Undefined
setVariableScope
in interface Undefined
public int getType()
public String getTypeAsString()
getTypeAsString
in interface Scope
public boolean isAllowImplicidQueryCall()
public boolean setAllowImplicidQueryCall(boolean allowImplicidQueryCall)
setAllowImplicidQueryCall
in interface Undefined
allowImplicidQueryCall
- the allowImplicidQueryCall to setpublic boolean getCheckArguments()
getCheckArguments
in interface Undefined
public Object call(PageContext pc, Collection.Key methodName, Object[] args) throws PageException
Objects
call
in interface Objects
call
in class StructSupport
methodName
- name of the method to callargs
- arguments to call method withPageException
public Object callWithNamedValues(PageContext pc, Collection.Key methodName, Struct args) throws PageException
Objects
callWithNamedValues
in interface Objects
callWithNamedValues
in class StructSupport
pc
- PageContextmethodName
- name of the methodargs
- Named Arguments for the methodPageException
public short getScopeCascadingType()
Copyright © 2015 Lucee