src/main/java/org/criteria4jpa/criterion/JPQLExpression.java
public String toQueryString(Criteria criteria, CriteriaQueryBuilder queryBuilder) {
    
    // replace alias variable by real name
    String queryFragment = 
      jpql.replace( "{alias}", queryBuilder.getRequiredAlias(criteria) );

    // process parameters
    for(int i = 1; i <= values.length; i++) {
      
      // create positional parameter for this value
      String paramater = queryBuilder.createPositionalParameter();
      
      /*
       * Replace variable with generated positional parameter.
       * Note: This kind of string processing is not very efficient, 
       * because it generates a new string object in each iteration.
       * But we assume that the number of iterations will be
       * relative small, so it won't be a real problem.
       */
      queryFragment = queryFragment.replace( "{"+i+"}", paramater);
      
    }
    
    return queryFragment;
  }
public String toQueryString(Criteria criteria, CriteriaQueryBuilder queryBuilder) {
    
    // replace alias variable by real name
    String queryFragment = 
      jpql.replace( "{alias}", queryBuilder.getRequiredAlias(criteria) );

    // process parameters
    for(int i = 1; i <= values.length; i++) {
      
      // create positional parameter for this value
      String paramater = queryBuilder.createPositionalParameter();
      
      /*
       * Replace variable with generated positional parameter.
       * Note: This kind of string processing is not very efficient, 
       * because it generates a new string object in each iteration.
       * But we assume that the number of iterations will be
       * relative small, so it won't be a real problem.
       */
      queryFragment = queryFragment.replace( "{"+i+"}", paramater);
      
    }
    
    return queryFragment;
  }
/*
@see org.criteria4jpa.criterion.Criterion#toQueryString(org.criteria4jpa.Criteria, org.criteria4jpa.impl.CriteriaQueryBuilder)