All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.infinispan.query.dsl.Expression Maven / Gradle / Ivy

There is a newer version: 9.1.7.Final
Show newest version
package org.infinispan.query.dsl;

import org.infinispan.query.dsl.impl.ParameterExpression;
import org.infinispan.query.dsl.impl.PathExpression;

/**
 * @author [email protected]
 * @since 8.0
 */
public interface Expression {

   static Expression param(String paramName) {
      return new ParameterExpression(paramName);
   }

   static Expression property(String attributePath) {
      return new PathExpression(null, attributePath);
   }

   static Expression count(String attributePath) {
      return new PathExpression(PathExpression.AggregationType.COUNT, attributePath);
   }

   static Expression sum(String attributePath) {
      return new PathExpression(PathExpression.AggregationType.SUM, attributePath);
   }

   static Expression avg(String attributePath) {
      return new PathExpression(PathExpression.AggregationType.AVG, attributePath);
   }

   static Expression min(String attributePath) {
      return new PathExpression(PathExpression.AggregationType.MIN, attributePath);
   }

   static Expression max(String attributePath) {
      return new PathExpression(PathExpression.AggregationType.MAX, attributePath);
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy