Merge branch '5.x' into java-8-functions
authorKasper Sørensen <i.am.kasper.sorensen@gmail.com>
Wed, 10 May 2017 03:56:44 +0000 (20:56 -0700)
committerKasper Sørensen <i.am.kasper.sorensen@gmail.com>
Wed, 10 May 2017 03:56:44 +0000 (20:56 -0700)
# Conflicts:
# core/src/main/java/org/apache/metamodel/MetaModelHelper.java

1  2 
core/src/main/java/org/apache/metamodel/MetaModelHelper.java
core/src/main/java/org/apache/metamodel/intercept/InterceptableDataContext.java
csv/src/main/java/org/apache/metamodel/csv/CsvDataContext.java
jdbc/src/main/java/org/apache/metamodel/jdbc/JdbcDataContext.java
salesforce/src/main/java/org/apache/metamodel/salesforce/SalesforceDataContext.java
salesforce/src/main/java/org/apache/metamodel/salesforce/SalesforceUpdateCallback.java

@@@ -505,26 -508,12 +505,9 @@@ public final class MetaModelHelper 
          return new InMemoryDataSet(header, resultRows);
      }
  
-     /**
-      * 
-      * @param selectItems
-      * @return
-      * 
-      * @deprecated use {@link #getAggregateFunctionSelectItems(Iterable)} or
-      *             {@link #getScalarFunctionSelectItems(Iterable)} instead
-      */
-     @Deprecated
-     public static List<SelectItem> getFunctionSelectItems(Iterable<SelectItem> selectItems) {
-         return CollectionUtils.filter(selectItems, selectItem -> {
-             @SuppressWarnings("deprecation")
-             final FunctionType function = selectItem.getFunction();
-             return function != null;
-         });
-     }
      public static List<SelectItem> getAggregateFunctionSelectItems(Iterable<SelectItem> selectItems) {
 -        return CollectionUtils.filter(selectItems, new Predicate<SelectItem>() {
 -            @Override
 -            public Boolean eval(SelectItem arg) {
 -                return arg.getAggregateFunction() != null;
 -            }
 +        return CollectionUtils.filter(selectItems, arg -> {
 +            return arg.getAggregateFunction() != null;
          });
      }
  
@@@ -345,9 -347,8 +347,9 @@@ public class SalesforceDataContext exte
          }
      }
  
 +    @SuppressWarnings("deprecation")
      private static void validateSoqlSupportedSelectItem(SelectItem selectItem) throws UnsupportedOperationException {
-         if (selectItem.getFunction() != null) {
+         if (selectItem.hasFunction()) {
              throw new UnsupportedOperationException("Function select items not supported: " + selectItem);
          }
          if (selectItem.getSubQuerySelectItem() != null) {