public HistoricTaskInstanceQuery taskNameIn(List<String> taskNameList) {
    if (taskNameList == null) {
      throw new ActivitiIllegalArgumentException("Task name list is null");
    }
    if (taskNameList.isEmpty()) {
      throw new ActivitiIllegalArgumentException("Task name list is empty");
    }

    if (taskName != null) {
      throw new ActivitiIllegalArgumentException(
          "Invalid query usage: cannot set both taskNameIn and taskName");
    }
    if (taskNameLike != null) {
      throw new ActivitiIllegalArgumentException(
          "Invalid query usage: cannot set both taskNameIn and taskNameLike");
    }
    if (taskNameLikeIgnoreCase != null) {
      throw new ActivitiIllegalArgumentException(
          "Invalid query usage: cannot set both taskNameIn and taskNameLikeIgnoreCase");
    }

    if (inOrStatement) {
      orQueryObject.taskNameList = taskNameList;
    } else {
      this.taskNameList = taskNameList;
    }
    return this;
  }
 public HistoricTaskInstanceQuery processVariableValueLike(String name, String value) {
   if (inOrStatement) {
     orQueryObject.variableValueLike(name, value, false);
     return this;
   } else {
     return variableValueLike(name, value, false);
   }
 }
 public HistoricTaskInstanceQuery processVariableValueEquals(Object variableValue) {
   if (inOrStatement) {
     orQueryObject.variableValueEquals(variableValue, false);
     return this;
   } else {
     return variableValueEquals(variableValue, false);
   }
 }
 public HistoricTaskInstanceQuery taskVariableValueLessThanOrEqual(String name, Object value) {
   if (inOrStatement) {
     orQueryObject.variableValueLessThanOrEqual(name, value);
     return this;
   } else {
     return variableValueLessThanOrEqual(name, value);
   }
 }
 public HistoricTaskInstanceQuery taskVariableValueNotEqualsIgnoreCase(String name, String value) {
   if (inOrStatement) {
     orQueryObject.variableValueNotEqualsIgnoreCase(name, value);
     return this;
   } else {
     return variableValueNotEqualsIgnoreCase(name, value);
   }
 }
 public HistoricTaskInstanceQuery deploymentIdIn(List<String> deploymentIds) {
   if (inOrStatement) {
     orQueryObject.deploymentIds = deploymentIds;
   } else {
     this.deploymentIds = deploymentIds;
   }
   return this;
 }
 protected void ensureVariablesInitialized() {
   VariableTypes types = Context.getProcessEngineConfiguration().getVariableTypes();
   for (QueryVariableValue var : queryVariableValues) {
     var.initialize(types);
   }
   if (orQueryObject != null) {
     orQueryObject.ensureVariablesInitialized();
   }
 }
 public HistoricTaskInstanceQuery taskVariableValueNotEquals(
     String variableName, Object variableValue) {
   if (inOrStatement) {
     orQueryObject.variableValueNotEquals(variableName, variableValue);
     return this;
   } else {
     return variableValueNotEquals(variableName, variableValue);
   }
 }
  @Override
  public HistoricTaskInstanceQuery processCategoryNotIn(List<String> processCategoryNotInList) {
    if (processCategoryNotInList == null) {
      throw new ActivitiIllegalArgumentException("Process category list is null");
    }
    if (processCategoryNotInList.isEmpty()) {
      throw new ActivitiIllegalArgumentException("Process category list is empty");
    }
    for (String processCategory : processCategoryNotInList) {
      if (processCategory == null) {
        throw new ActivitiIllegalArgumentException(
            "None of the given process categories can be null");
      }
    }

    if (inOrStatement) {
      orQueryObject.processCategoryNotInList = processCategoryNotInList;
    } else {
      this.processCategoryNotInList = processCategoryNotInList;
    }
    return this;
  }