code: private void addCriterionsToCriteria(Criteria criteria, Criterion... criterion) {
          if (criteria != null) {
              for (Criterion c : criterion) {
                  if (c != null) {
                      criteria.add(c);
                  }
              }
          }
      }
docs: Helper method: Adds all criterions to the criteria (if not null).
  
  @param criteria
  @param criterion