src/main/java/org/criteria4jpa/projection/ProjectionList.java
public String toQueryString(Criteria criteria, CriteriaQueryBuilder queryBuilder) {
    
    // check whether list is empty
    if( projectionList.isEmpty() ) {
      throw new IllegalStateException("A projection list must have at least one child.");
    }
    
    // query builder
    StringBuilder builder = new StringBuilder();
    
    // iterate over all projections from the list
    Iterator<Projection> iter = projectionList.iterator();
    while( iter.hasNext() ) {
      Projection projection = iter.next();
      
      // call toQueryString() on child
      builder.append( projection.toQueryString(criteria, queryBuilder) );
      
      // append comma if more projections follow
      if(iter.hasNext()) {
        builder.append(",");
      }
    }
    
    // return result
    return builder.toString();
  }
public String toQueryString(Criteria criteria, CriteriaQueryBuilder queryBuilder) {
    
    // check whether list is empty
    if( projectionList.isEmpty() ) {
      throw new IllegalStateException("A projection list must have at least one child.");
    }
    
    // query builder
    StringBuilder builder = new StringBuilder();
    
    // iterate over all projections from the list
    Iterator<Projection> iter = projectionList.iterator();
    while( iter.hasNext() ) {
      Projection projection = iter.next();
      
      // call toQueryString() on child
      builder.append( projection.toQueryString(criteria, queryBuilder) );
      
      // append comma if more projections follow
      if(iter.hasNext()) {
        builder.append(",");
      }
    }
    
    // return result
    return builder.toString();
  }
/*
@see org.criteria4jpa.projection.Projection#toQueryString(org.criteria4jpa.Criteria, org.criteria4jpa.impl.CriteriaQueryBuilder)