Beispiel #1
0
  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());
  }
 @Override
 public Object invoke(PageContext pc, Object[] args) throws PageException {
   return call(pc, Caster.toQuery(args[0]));
 }
Beispiel #3
0
 /**
  * @param pc Page Context of the Request
  * @param query ZQLQuery
  * @return Railo Query
  * @throws PageException
  */
 private Query getSingleTable(PageContext pc, ZQuery query) throws PageException {
   return Caster.toQuery(pc.getVariable(((ZFromItem) query.getFrom().get(0)).getFullName()));
 }