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) {
    
    
    if( projectionList.isEmpty() ) {
      throw new IllegalStateException("A projection list must have at least one child.");
    }
    
    
    StringBuilder builder = new StringBuilder();
    
    
    Iterator<Projection> iter = projectionList.iterator();
    while( iter.hasNext() ) {
      Projection projection = iter.next();
      
      
      builder.append( projection.toQueryString(criteria, queryBuilder) );
      
      
      if(iter.hasNext()) {
        builder.append(",");
      }
    }
    
    
    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)
/ *