Package org.araneaframework.backend.list.memorybased.expression.procedure

Examples of org.araneaframework.backend.list.memorybased.expression.procedure.ProcedureExpression


    public boolean isActive(Map filterInfo) {
      return true;
    }
   
    public Expression buildExpression(Map filterInfo) {     
      ProcedureExpression expr = new ProcedureExpression(this.name);
      for (Iterator i = this.params.iterator(); i.hasNext();) {
        ListFilter arg = (ListFilter) i.next();
        expr.add(arg.buildExpression(filterInfo));
      }
      return expr;
    }     
View Full Code Here


 
  // procedure
 
  class ProcedureTranslator extends CompositeExprToSqlExprTranslator {
    protected SqlExpression translateParent(Expression expr, SqlExpression[] sqlChildren) {
      ProcedureExpression expr0 = (ProcedureExpression) expr;
      return new SqlProcedureExpression(expr0.getName()).setChildren(sqlChildren);
    }
View Full Code Here

 
  public void testProcedureExpression() {
    log.debug("Testing ProcedureExpression");
    // name
    try {
      new ProcedureExpression(null).getName();
      fail("ProcedureExpression's name can't be null");
    } catch (Exception e) {
      // normal
    }
    assertEquals("ProcedureExpression's name must be 'proc1'", "proc1",
        new ProcedureExpression("proc1").getName());   
   
    // evaluating
    try {
      new ProcedureExpression("proc1").evaluate(this.resolver);
      fail("ProcedureExpression should not be evaluatable");
    } catch (Exception e) {
      // normal
    }
  }
View Full Code Here

TOP

Related Classes of org.araneaframework.backend.list.memorybased.expression.procedure.ProcedureExpression

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.