Package org.olat.course.condition.operators

Examples of org.olat.course.condition.operators.Operator


      int i = 0;
      for(Iterator<ExtendedCondition> iterator = conditions.iterator(); iterator.hasNext();) {
        ExtendedCondition extendedCondition = iterator.next();
        String attribute = extendedCondition.getAttribute();
        int position = LogModule.getUserPropertyPosition(attribute);
        Operator operator = extendedCondition.getOperator();
        String value = extendedCondition.getValue();
        // Is position equal to 0 then the list userProperties doesn't contain the value of attribute.
        if (position > 0 && operator.buildSQLStatement(attribute, value).length() > 0) {
          values[i] = value;
          String connection = "";
          if(!firstIteration) {
            connection = " " + (hasANDConnection?"AND":"OR") + " ";
          }
          query = query.concat(connection + operator.buildSQLStatement("v.userProperty"+position, ":value"+i));
          i++;
        }
        if (firstIteration) firstIteration = false;
      }
      query = query.concat(")");
View Full Code Here


      int i = 0;
      for(Iterator<ExtendedCondition> iterator = conditions.iterator(); iterator.hasNext();) {
        ExtendedCondition extendedCondition = iterator.next();
        String attribute = extendedCondition.getAttribute();
        int position = LogModule.getUserPropertyPosition(attribute);
        Operator operator = extendedCondition.getOperator();
        String value = extendedCondition.getValue();
        // Is position equal to 0 then the list userProperties doesn't contain the value of attribute.
        if (position > 0 && operator.buildSQLStatement(attribute, value).length() > 0) {
          values[i] = value;
          String connection = "";
          if(!firstIteration) {
            connection = " " + (hasANDConnection?"AND":"OR") + " ";
          }
          query = query.concat(connection + operator.buildSQLStatement("v.userProperty"+position, ":value"+i));
          i++;
        }
        if (firstIteration) firstIteration = false;
      }
      query = query.concat(")");
View Full Code Here

TOP

Related Classes of org.olat.course.condition.operators.Operator

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.