railo.runtime.type.ref
Class VariableReference

java.lang.Object
  extended by railo.runtime.type.ref.VariableReference
All Implemented Interfaces:
Reference

public final class VariableReference
extends Object
implements Reference

represent a reference to a variable


Constructor Summary
VariableReference(Collection coll, Collection.Key key)
          constructor of the class
VariableReference(Collection coll, String key)
          constructor of the class
VariableReference(Object o, Collection.Key key)
          constructor of the class
VariableReference(Object o, String key)
          constructor of the class
 
Method Summary
 Object get(PageContext pc)
           
 Object get(PageContext pc, Object defaultValue)
           
 Collection getCollection()
           
 Collection.Key getKey()
           
 String getKeyAsString()
           
 Object getParent()
           
 Object remove(PageContext pc)
          clears the variable from collection
 Object removeEL(PageContext pc)
          clears the variable from collection
 void set(double value)
           
 Object set(PageContext pc, Object value)
           
 Object setEL(PageContext pc, Object value)
           
 String toString()
           
 Object touch(PageContext pc)
          create it when not exists
 Object touchEL(PageContext pc)
          create it when not exists
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VariableReference

public VariableReference(Collection coll,
                         String key)
constructor of the class

Parameters:
coll - Collection where variable is
key - key to the value inside the collection

VariableReference

public VariableReference(Collection coll,
                         Collection.Key key)
constructor of the class

Parameters:
coll - Collection where variable is
key - key to the value inside the collection

VariableReference

public VariableReference(Object o,
                         String key)
                  throws PageException
constructor of the class

Parameters:
o - Object will be casted to Collection
key - key to the value inside the collection
Throws:
PageException

VariableReference

public VariableReference(Object o,
                         Collection.Key key)
                  throws PageException
constructor of the class

Parameters:
o - Object will be casted to Collection
key - key to the value inside the collection
Throws:
PageException
Method Detail

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)

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)

set

public void set(double value)
         throws PageException
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
See Also:
Reference.setEL(railo.runtime.PageContext, java.lang.Object)

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)

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(PageContext pc)

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

getCollection

public Collection getCollection()
Returns:
return the parent as Collection

getKeyAsString

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

getKey

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

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()


Copyright © 2012 Railo