Examples of SimpleExpression


Examples of org.hibernate.criterion.SimpleExpression

        }
    }
   
    private List<?> getResultSet(Class<? extends Entity> entity, String field,
            String param, boolean ignoreCase) {
        SimpleExpression fieldRestriction = Restrictions.eq(field, param);
        if (ignoreCase) {
            fieldRestriction = fieldRestriction.ignoreCase();
        }
        return sessionFactory
            .getCurrentSession()
            .createCriteria(entity)
            .add(fieldRestriction)
View Full Code Here

Examples of org.hibernate.criterion.SimpleExpression

  @Override
    public List<Analysis> getAnalysisByDateMedicaPatiente(Date date, Patient patient, Medic medic) throws ExceptionDAO {
        try {
            this.logger.logDebug("Getting analysis by patint, medic and date");
            Session currentSession = FacadeDB.getInstance().getCurrentSession();
            SimpleExpression dateR = (date == null) ? null : Restrictions.eq("analysisDay", date);
            SimpleExpression patientR = (patient == null) ? null : Restrictions.eq("patient", patient);
            SimpleExpression medicR = (medic == null) ? null : Restrictions.eq("medic", medic);

            Criteria criteria = currentSession.createCriteria(Analysis.class);
            if (dateR != null) {
                criteria = criteria.add(dateR);
            }
View Full Code Here

Examples of org.renjin.compiler.ir.tac.expressions.SimpleExpression

    return Symbol.get("if");
  }

  @Override
  public Expression translateToExpression(IRBodyBuilder builder, TranslationContext context, FunctionCall call) {
    SimpleExpression condition = builder.translateSimpleExpression(context, call.getArgument(0));
   
    // since "if" is being used in the context of an expression, we need
    // to store its final value somewhere
    Temp ifResult = builder.newTemp();
   
View Full Code Here

Examples of org.renjin.compiler.ir.tac.expressions.SimpleExpression

  }

  @Override
  public void addStatement(IRBodyBuilder builder, TranslationContext context, FunctionCall call) {

    SimpleExpression condition = builder.translateSimpleExpression(context, call.getArgument(0));
    IRLabel trueLabel = builder.newLabel();
    IRLabel falseLabel = builder.newLabel();
    IRLabel endLabel;

    if(hasElse(call)) {
View Full Code Here

Examples of org.renjin.compiler.ir.tac.expressions.SimpleExpression

    IRLabel falseLabel = builder.newLabel();
    IRLabel naLabel = builder.newLabel();
    IRLabel finishLabel = builder.newLabel();
   
    // check the first condition
    SimpleExpression condition1 = builder.translateSimpleExpression(context, call.getArgument(0));
    builder.addStatement(new IfStatement(condition1, firstTrue, falseLabel, firstNA));
   
    // first is true.
    // set the result to true and do the next test
    builder.addLabel(firstTrue);
    builder.addStatement(new Assignment(result, new Constant(new LogicalArrayVector(true))));
    builder.addStatement(new GotoStatement(test2Label));
   
    // first is NA
    // set the result to NA and do the next test
    builder.addLabel(firstNA);
    builder.addStatement(new Assignment(result, new Constant(new LogicalArrayVector(LogicalVector.NA))));
    builder.addStatement(new GotoStatement(test2Label));
   
    // check second condition
    builder.addLabel(test2Label);
    SimpleExpression condition2 = builder.translateSimpleExpression(context, call.getArgument(1));
    builder.addStatement(new IfStatement(condition2,
        finishLabel,  // if condition 2 is true, then the result is equal to condition2
        falseLabel, // if false, final result is false,
        naLabel));
View Full Code Here

Examples of org.renjin.compiler.ir.tac.expressions.SimpleExpression

   
    IRLabel test2Label = builder.newLabel();
    IRLabel finishLabel = builder.newLabel();
   
    // check the first condition
    SimpleExpression condition1 = builder.translateSimpleExpression(context, call.getArgument(0));
    builder.addStatement(new IfStatement(condition1, test2Label, finishLabel, test2Label));
   
    // first condition is ok, check the second
    builder.addLabel(test2Label);
    builder.addStatement(new ExprStatement(builder.translateExpression(context, call.getArgument(1))));
View Full Code Here

Examples of org.renjin.compiler.ir.tac.expressions.SimpleExpression

    IRLabel trueLabel = builder.newLabel();
    IRLabel naLabel = builder.newLabel();
    IRLabel finishLabel = builder.newLabel();
   
    // check the first condition
    SimpleExpression condition1 = builder.translateSimpleExpression(context, call.getArgument(0));
    builder.addStatement(new IfStatement(condition1, trueLabel, firstFalse, firstNA));
   
    // first is true.
    // set the result to true and do the next test
    builder.addLabel(firstFalse);
    builder.addStatement(new Assignment(result, new Constant(new LogicalArrayVector(false))));
    builder.addStatement(new GotoStatement(test2Label));
   
    // first is NA
    // set the result to NA and do the next test
    builder.addLabel(firstNA);
    builder.addStatement(new Assignment(result, new Constant(new LogicalArrayVector(LogicalVector.NA))));
    builder.addStatement(new GotoStatement(test2Label));
   
    // check second condition
    builder.addLabel(test2Label);
    SimpleExpression condition2 = builder.translateSimpleExpression(context, call.getArgument(1));
    builder.addStatement(new IfStatement(condition2,
        trueLabel,
        finishLabel,  // if condition 2 is false, then the result is equal to condition1
        naLabel));
View Full Code Here

Examples of org.renjin.compiler.ir.tac.expressions.SimpleExpression

   
    IRLabel test2Label = builder.newLabel();
    IRLabel finishLabel = builder.newLabel();
   
    // check the first condition
    SimpleExpression condition1 = builder.translateSimpleExpression(context, call.getArgument(0));
    builder.addStatement(new IfStatement(condition1, finishLabel, test2Label, test2Label));
   
    // first condition is ok, check the second
    builder.addLabel(test2Label);
    builder.addStatement(new ExprStatement(builder.translateExpression(context, call.getArgument(1))));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.