Package railo.runtime.type.ref

Examples of railo.runtime.type.ref.VariableReference


  }
 
  protected static QueryColumn toColumn(PageContext pc,String strQueryColumn) throws PageException {
      //if(strQueryColumn.indexOf('.')<1)
      //    throw new ExpressionException("invalid query column definition ["+strQueryColumn+"]");
    VariableReference ref = ((PageContextImpl)pc).getVariableReference(strQueryColumn);
    if(ref.getParent() instanceof Scope)
        throw new ExpressionException("invalid query column definition ["+strQueryColumn+"]");
   
   
    Query query=Caster.toQuery(ref.getParent());
    return query.getColumn(ref.getKey());
  }
View Full Code Here


    return variableUtil.get(this,coll,key);
  }
 
    @Override
    public Reference getReference(Object coll, String key) throws PageException {
    return new VariableReference(coll,key);
  }
View Full Code Here

    public Reference getReference(Object coll, String key) throws PageException {
    return new VariableReference(coll,key);
  }

  public Reference getReference(Object coll, Collection.Key key) throws PageException {
    return new VariableReference(coll,key);
  }
View Full Code Here

  public static VariableReference getVariableReference(PageContext pc,String var) throws PageException {
      StringList list = parse(pc,new ParserString(var),false);
        if(list==null) throw new InterpreterException("invalid variable declaration ["+var+"]");
       
    if(list.size()==1) {
      return new VariableReference(pc.undefinedScope(),list.next());
    }
    int scope=scopeString2Int(list.next());
   
    Object coll;
    if(scope==Scope.SCOPE_UNDEFINED){
      coll=pc.touch(pc.undefinedScope(),list.current());
    }
    else{
      coll=VariableInterpreter.scope(pc, scope, list.hasNext());
      //coll=pc.scope(scope);
    }
   
   
    while(list.hasNextNext()) {
      coll=pc.touch(coll,list.next());
    }

    if(!(coll instanceof Collection))
      throw new InterpreterException("invalid variable ["+var+"]");
    return new VariableReference((Collection)coll,list.next());
  }
View Full Code Here

TOP

Related Classes of railo.runtime.type.ref.VariableReference

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.