railo.runtime.util
Class VariableUtilImpl

java.lang.Object
  extended by railo.runtime.util.VariableUtilImpl
All Implemented Interfaces:
VariableUtil

public final class VariableUtilImpl
extends Object
implements VariableUtil

Class to handle CF Variables (set,get,call)


Constructor Summary
VariableUtilImpl()
           
 
Method Summary
 Object callFunction(PageContext pc, Object coll, String key, Object[] args)
          call a Function (UDF, Method) with or witout named values
 Object callFunctionWithNamedValues(PageContext pc, Object coll, Collection.Key key, Object[] args)
           
 Object callFunctionWithNamedValues(PageContext pc, Object coll, Collection.Key key, Struct args)
           
 Object callFunctionWithNamedValues(PageContext pc, Object coll, String key, Object[] args)
          call a Function (UDF, Method) with Named Values
 Object callFunctionWithoutNamedValues(PageContext pc, Object coll, Collection.Key key, Object[] args)
           
 Object callFunctionWithoutNamedValues(PageContext pc, Object coll, String key, Object[] args)
          call a Function (UDF, Method) without Named Values
static Object columnlist(PageContext pc, Object obj)
           
static Object currentrow(PageContext pc, Object obj)
           
 Object get(PageContext pc, Object coll, Collection.Key key)
           
 Object get(PageContext pc, Object coll, Collection.Key key, Object defaultValue)
           
 Object get(PageContext pc, Object coll, String key)
          return a property from the given Object, when property doesn't exists throw exception
 Object get(PageContext pc, Object coll, String key, Object defaultValue)
          return a property from the given Object, when property doesn't exists return null
 Object getCollection(PageContext pc, Object coll, Collection.Key key)
           
 Object getCollection(PageContext pc, Object coll, Collection.Key key, Object defaultValue)
           
 Object getCollection(PageContext pc, Object coll, String key)
          return a property from the given Object, when coll is a query return a Column,when property doesn't exists throw exception
 Object getCollection(PageContext pc, Object coll, String key, Object defaultValue)
          return a property from the given Object, when property doesn't exists return null
 Object getLight(PageContext pc, Object coll, Collection.Key key, Object defaultValue)
           
 Object getLight(PageContext pc, Object coll, String key, Object defaultValue)
          return a property from the given Object, when property doesn't exists return null
static Object recordcount(PageContext pc, Object obj)
           
 Object remove(Object coll, Collection.Key key)
           
 Object remove(Object coll, String key)
          clear value from Collection
 Object removeEL(Object coll, Collection.Key key)
           
 Object removeEL(Object coll, String key)
          remove value from Collection
 Object set(PageContext pc, Object coll, Collection.Key key, Object value)
           
 Object set(PageContext pc, Object coll, String key, Object value)
          sets a value to the Object
 Object setEL(PageContext pc, Object coll, Collection.Key key, Object value)
           
 Object setEL(PageContext pc, Object coll, String key, Object value)
          sets a value to the Object
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VariableUtilImpl

public VariableUtilImpl()
Method Detail

getCollection

public Object getCollection(PageContext pc,
                            Object coll,
                            String key,
                            Object defaultValue)
Description copied from interface: VariableUtil
return a property from the given Object, when property doesn't exists return null

Specified by:
getCollection in interface VariableUtil
coll - Collection to check
key - to get from Collection
Returns:
value or null
See Also:
railo.runtime.util.VariableUtil#getCollectionEL(railo.runtime.PageContext, java.lang.Object, java.lang.String)

getCollection

public Object getCollection(PageContext pc,
                            Object coll,
                            Collection.Key key,
                            Object defaultValue)

get

public Object get(PageContext pc,
                  Object coll,
                  String key,
                  Object defaultValue)
Description copied from interface: VariableUtil
return a property from the given Object, when property doesn't exists return null

Specified by:
get in interface VariableUtil
coll - Collection to check
key - to get from Collection
Returns:
value or null
See Also:
VariableUtil.get(railo.runtime.PageContext, java.lang.Object, java.lang.String, java.lang.Object)

get

public Object get(PageContext pc,
                  Object coll,
                  Collection.Key key,
                  Object defaultValue)

getLight

public Object getLight(PageContext pc,
                       Object coll,
                       Collection.Key key,
                       Object defaultValue)

getLight

public Object getLight(PageContext pc,
                       Object coll,
                       String key,
                       Object defaultValue)
Description copied from interface: VariableUtil
return a property from the given Object, when property doesn't exists return null

Specified by:
getLight in interface VariableUtil
coll - Collection to check
key - to get from Collection
Returns:
value or null
See Also:
railo.runtime.util.VariableUtil#getLightEL(railo.runtime.PageContext, java.lang.Object, java.lang.String)

getCollection

public Object getCollection(PageContext pc,
                            Object coll,
                            String key)
                     throws PageException
Description copied from interface: VariableUtil
return a property from the given Object, when coll is a query return a Column,when property doesn't exists throw exception

Specified by:
getCollection in interface VariableUtil
coll - Collection to check
key - to get from Collection
Returns:
value value to get
Throws:
PageException
See Also:
VariableUtil.getCollection(railo.runtime.PageContext, java.lang.Object, java.lang.String)

getCollection

public Object getCollection(PageContext pc,
                            Object coll,
                            Collection.Key key)
                     throws PageException
Throws:
PageException

get

public Object get(PageContext pc,
                  Object coll,
                  Collection.Key key)
           throws PageException
Throws:
PageException

get

public Object get(PageContext pc,
                  Object coll,
                  String key)
           throws PageException
Description copied from interface: VariableUtil
return a property from the given Object, when property doesn't exists throw exception

Specified by:
get in interface VariableUtil
coll - Collection to check
key - to get from Collection
Returns:
value value to get
Throws:
PageException
See Also:
VariableUtil.get(railo.runtime.PageContext, java.lang.Object, java.lang.String)

set

public Object set(PageContext pc,
                  Object coll,
                  Collection.Key key,
                  Object value)
           throws PageException
Throws:
PageException

set

public Object set(PageContext pc,
                  Object coll,
                  String key,
                  Object value)
           throws PageException
Description copied from interface: VariableUtil
sets a value to the Object

Specified by:
set in interface VariableUtil
coll - Collection to check
key - to get from Collection
value - Value to set
Returns:
value setted
Throws:
PageException
See Also:
VariableUtil.set(railo.runtime.PageContext, java.lang.Object, java.lang.String, java.lang.Object)

setEL

public Object setEL(PageContext pc,
                    Object coll,
                    String key,
                    Object value)
Description copied from interface: VariableUtil
sets a value to the Object

Specified by:
setEL in interface VariableUtil
coll - Collection to check
key - to get from Collection
value - Value to set
Returns:
value setted or null if can't set
See Also:
VariableUtil.setEL(railo.runtime.PageContext, java.lang.Object, java.lang.String, java.lang.Object)

setEL

public Object setEL(PageContext pc,
                    Object coll,
                    Collection.Key key,
                    Object value)

removeEL

public Object removeEL(Object coll,
                       String key)
Description copied from interface: VariableUtil
remove value from Collection

Specified by:
removeEL in interface VariableUtil
Returns:
has cleared or not
See Also:
VariableUtil.removeEL(java.lang.Object, java.lang.String)

removeEL

public Object removeEL(Object coll,
                       Collection.Key key)

remove

public Object remove(Object coll,
                     String key)
              throws PageException
Description copied from interface: VariableUtil
clear value from Collection

Specified by:
remove in interface VariableUtil
Returns:
has cleared or not
Throws:
PageException
See Also:
VariableUtil.remove(java.lang.Object, java.lang.String)

remove

public Object remove(Object coll,
                     Collection.Key key)
              throws PageException
Throws:
PageException

callFunction

public Object callFunction(PageContext pc,
                           Object coll,
                           String key,
                           Object[] args)
                    throws PageException
Description copied from interface: VariableUtil
call a Function (UDF, Method) with or witout named values

Specified by:
callFunction in interface VariableUtil
coll - Collection of the UDF Function
key - name of the function
args - arguments to call the function
Returns:
return value of the function
Throws:
PageException
See Also:
VariableUtil.callFunction(railo.runtime.PageContext, java.lang.Object, java.lang.String, java.lang.Object[])

callFunctionWithoutNamedValues

public Object callFunctionWithoutNamedValues(PageContext pc,
                                             Object coll,
                                             String key,
                                             Object[] args)
                                      throws PageException
Description copied from interface: VariableUtil
call a Function (UDF, Method) without Named Values

Specified by:
callFunctionWithoutNamedValues in interface VariableUtil
coll - Collection of the UDF Function
key - name of the function
args - arguments to call the function
Returns:
return value of the function
Throws:
PageException
See Also:
VariableUtil.callFunctionWithoutNamedValues(railo.runtime.PageContext, java.lang.Object, java.lang.String, java.lang.Object[])

callFunctionWithoutNamedValues

public Object callFunctionWithoutNamedValues(PageContext pc,
                                             Object coll,
                                             Collection.Key key,
                                             Object[] args)
                                      throws PageException
Throws:
PageException

callFunctionWithNamedValues

public Object callFunctionWithNamedValues(PageContext pc,
                                          Object coll,
                                          String key,
                                          Object[] args)
                                   throws PageException
Description copied from interface: VariableUtil
call a Function (UDF, Method) with Named Values

Specified by:
callFunctionWithNamedValues in interface VariableUtil
coll - Collection of the UDF Function
key - name of the function
args - arguments to call the function
Returns:
return value of the function
Throws:
PageException
See Also:
VariableUtil.callFunctionWithNamedValues(railo.runtime.PageContext, java.lang.Object, java.lang.String, java.lang.Object[])

callFunctionWithNamedValues

public Object callFunctionWithNamedValues(PageContext pc,
                                          Object coll,
                                          Collection.Key key,
                                          Object[] args)
                                   throws PageException
Throws:
PageException

callFunctionWithNamedValues

public Object callFunctionWithNamedValues(PageContext pc,
                                          Object coll,
                                          Collection.Key key,
                                          Struct args)
                                   throws PageException
Throws:
PageException

recordcount

public static Object recordcount(PageContext pc,
                                 Object obj)
                          throws PageException
Throws:
PageException

currentrow

public static Object currentrow(PageContext pc,
                                Object obj)
                         throws PageException
Throws:
PageException

columnlist

public static Object columnlist(PageContext pc,
                                Object obj)
                         throws PageException
Throws:
PageException


Copyright © 2012 Railo