solomax commented on code in PR #144:
URL: https://github.com/apache/openjpa/pull/144#discussion_r3780986813


##########
openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/CriteriaBuilderImpl.java:
##########
@@ -1043,4 +1119,159 @@ public Expression<LocalTime> localTime() {
         return new Expressions.CurrentLocalTime();
     }
 
+       @Override
+       public CompoundSelection<Tuple> tuple(List<Selection<?>> selections) {
+               return tuple(selections.toArray(new Selection<?>[0]));
+       }
+
+       @Override
+       public CompoundSelection<Object[]> array(List<Selection<?>> selections) 
{
+               return array(selections.toArray(new Selection<?>[0]));
+       }
+
+       @Override
+       public Order asc(Expression<?> expression, Nulls nullPrecedence) {
+               return new OrderImpl(expression, true, nullPrecedence);
+       }
+
+       @Override
+       public Order desc(Expression<?> expression, Nulls nullPrecedence) {
+               return new OrderImpl(expression, false, nullPrecedence);
+       }
+
+       @Override
+       public Predicate and(List<Predicate> restrictions) {
+               return and(restrictions.toArray(new Predicate[0]));
+       }
+
+       @Override
+       public Predicate or(List<Predicate> restrictions) {
+               return or(restrictions.toArray(new Predicate[0]));
+       }
+
+       @Override
+       public Expression<String> concat(List<Expression<String>> expressions) {
+               if (expressions == null || expressions.isEmpty())
+                       throw new IllegalArgumentException(
+                               "concat requires at least one expression");
+               Expression<String> result = expressions.get(0);
+               for (int i = 1; i < expressions.size(); i++) {
+                       result = new Expressions.Concat(result, 
expressions.get(i));
+               }
+               return result;
+       }
+
+       @Override
+       public Expression<String> left(Expression<String> x, int len) {
+               return new Expressions.Left(x, len);
+       }
+
+       @Override
+       public Expression<String> left(Expression<String> x, 
Expression<Integer> len) {
+               return new Expressions.Left(x, len);
+       }
+       
+       @Override
+       public Expression<String> right(Expression<String> x, int len) {
+               return new Expressions.Right(x, len);
+       }
+
+       @Override
+       public Expression<String> right(Expression<String> x, 
Expression<Integer> len) {
+               return new Expressions.Right(x, len);
+       }
+
+       @Override
+       public Expression<String> replace(Expression<String> str, 
Expression<String> substring, Expression<String> replacement) {
+       return new Expressions.Replace(str, substring, replacement);
+       }
+
+       @Override
+       public Expression<String> replace(Expression<String> str, String 
substring, Expression<String> replacement) {
+               return new Expressions.Replace(str, new 
Expressions.Constant<String>(substring), replacement);
+       }
+
+       @Override
+       public Expression<String> replace(Expression<String> str, 
Expression<String> substring, String replacement) {
+               return new Expressions.Replace(str, substring, new 
Expressions.Constant<String>(replacement));
+       }
+
+       @Override
+       public Expression<String> replace(Expression<String> str, String 
substring, String replacement) {
+               return new Expressions.Replace(str, new 
Expressions.Constant<String>(substring), new 
Expressions.Constant<String>(replacement));
+       }
+
+       @Override
+       public <N, T extends Temporal> Expression<N> extract(TemporalField<N, 
T> field, Expression<T> temporal) {
+               String fieldName = field.toString().toUpperCase();

Review Comment:
   there are lots of such cases in the code :( (I'll update them all + will 
update `toLowerCase()`)
   The question is: there are lots of places with 
`.toUpperCase(Locale.ENGLISH);` shall it be updated to 
`.toUpperCase(Locale.ROOT);`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to