Class EntityConditionHelper

java.lang.Object
org.ofbiz.core.entity.EntityConditionHelper

public class EntityConditionHelper extends Object
  • Constructor Details

    • EntityConditionHelper

      public EntityConditionHelper()
  • Method Details

    • predicateTrueForEachLeafExpression

      public static boolean predicateTrueForEachLeafExpression(EntityCondition input, com.google.common.base.Predicate<EntityExpr> predicate)
      Traverses input EntityCondition and checks of predicate is true for each leaf EntityExpr (that does not contain sub-conditions)
      Parameters:
      input - EntityCondition to be checked
      predicate - to be applied to each leaf EntityExpr
      Returns:
      false if at least for one EntityExpr predicate was not true
    • transformCondition

      public static EntityCondition transformCondition(EntityCondition input, com.google.common.base.Function<EntityExpr,EntityCondition> function)
      Traverses input EntityCondition and each leaf EntityExpr (that does not contain sub-conditions) is transformed with function
      Parameters:
      input - EntityCondition to be transformed
      function - to be applied to each leaf EntityExpr
      Returns:
      rewritten EntityCondition of the same structure except for leaf expressions transformed by function