code: private void processCompositeFilter(final StringBuilder whereBuilder,
                                          final List<Object> paramList, final CompositeFilter compositeFilter) throws RepositoryException {
          final List<Filter> subFilters = compositeFilter.getSubFilters();
          if (2 > subFilters.size()) {
              throw new RepositoryException("At least two sub filters in a composite filter");
          }
  
          whereBuilder.append("(");
  
          final Iterator<Filter> iterator = subFilters.iterator();
          while (iterator.hasNext()) {
              final Filter filter = iterator.next();
  
              if (filter instanceof PropertyFilter) {
                  processPropertyFilter(whereBuilder, paramList, (PropertyFilter) filter);
              } else { // CompositeFilter
                  processCompositeFilter(whereBuilder, paramList, (CompositeFilter) filter);
              }
  
              if (iterator.hasNext()) {
                  switch (compositeFilter.getOperator()) {
                      case AND:
                          whereBuilder.append(" AND ");
                          break;
  
                      case OR:
                          whereBuilder.append(" OR ");
                          break;
  
                      default:
                          throw new RepositoryException("Unsupported composite filter [operator=" + compositeFilter.getOperator() + "]");
                  }
              }
          }
  
          whereBuilder.append(")");
      }
docs: Processes composite filter.
  
  @param whereBuilder    the specified where builder
  @param paramList       the specified parameter list
  @param compositeFilter the specified composite filter
  @throws RepositoryException repository exception