本文整理汇总了Java中com.espertech.esper.epl.expression.ExprAggregateNode类的典型用法代码示例。如果您正苦于以下问题:Java ExprAggregateNode类的具体用法?Java ExprAggregateNode怎么用?Java ExprAggregateNode使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ExprAggregateNode类属于com.espertech.esper.epl.expression包,在下文中一共展示了ExprAggregateNode类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addEquivalent
import com.espertech.esper.epl.expression.ExprAggregateNode; //导入依赖的package包/类
/**
* Add an equivalent aggregation function node
* @param aggNodeToAdd node to add
*/
public void addEquivalent(ExprAggregateNode aggNodeToAdd)
{
if (equivalentNodes == null) {
equivalentNodes = new ArrayList<ExprAggregateNode>();
}
equivalentNodes.add(aggNodeToAdd);
}
示例2: assignFuture
import com.espertech.esper.epl.expression.ExprAggregateNode; //导入依赖的package包/类
/**
* Assigns a future to the expression
* @param service the future
*/
public void assignFuture(AggregationResultFuture service)
{
aggregationNode.setAggregationResultFuture(service, columnNum);
if (equivalentNodes == null) {
return;
}
for (ExprAggregateNode equivalentAggNode : equivalentNodes)
{
equivalentAggNode.setAggregationResultFuture(service, columnNum);
}
}
示例3: setUp
import com.espertech.esper.epl.expression.ExprAggregateNode; //导入依赖的package包/类
public void setUp()
{
selectAggregateNodes = new LinkedList<ExprAggregateNode>();
havingAggregateNodes = new LinkedList<ExprAggregateNode>();
orderByAggregateNodes = new LinkedList<ExprAggregateNode>();
methodResolutionService = new MethodResolutionServiceImpl(null, null);
}
示例4: make
import com.espertech.esper.epl.expression.ExprAggregateNode; //导入依赖的package包/类
public static AggregationExpression make(ExprAggregateNode aggNode){
AggregationEnum aggType=AggregationEnum.NONE;
if(aggNode instanceof ExprAvedevNode){
aggType=AggregationEnum.AVEDEV;
}
else if(aggNode instanceof ExprAvgNode){
aggType=AggregationEnum.AVG;
}
else if(aggNode instanceof ExprCountNode){
aggType=AggregationEnum.COUNT;
}
else if(aggNode instanceof ExprFirstEverNode){
}
else if(aggNode instanceof ExprLastEverNode){
}
else if(aggNode instanceof ExprLeavingAggNode){
}
else if(aggNode instanceof ExprMedianNode){
aggType=AggregationEnum.MEDIAN;
}
else if(aggNode instanceof ExprMinMaxAggrNode){
ExprMinMaxAggrNode minMaxNode=(ExprMinMaxAggrNode)aggNode;
if(minMaxNode.getMinMaxTypeEnum()==MinMaxTypeEnum.MAX){
aggType=AggregationEnum.MAX;
}
else{
aggType=AggregationEnum.MIN;
}
}
else if(aggNode instanceof ExprNthAggNode){
}
else if(aggNode instanceof ExprRateAggNode){
aggType=AggregationEnum.RATE;
}
else if(aggNode instanceof ExprStddevNode){
aggType=AggregationEnum.STDDEV;
}
else if(aggNode instanceof ExprSumNode){
aggType=AggregationEnum.SUM;
}
if(aggType==AggregationEnum.NONE){
System.err.format("Unsupported AggregationNode: %s\n", aggNode.getClass().toString());
}
else{
ExprNode[] childNodes=aggNode.getChildNodes();
AbstractResultExpression expr=null;
AbstractBooleanExpression filterExpr=null;
if(childNodes!=null && childNodes.length>0){
if(aggType==AggregationEnum.COUNT &&
!(childNodes[0] instanceof ExprIdentNode) &&
!(childNodes[0] instanceof ExprConstantNode)){
expr=WildcardExpression.getInstance();
filterExpr=(AbstractBooleanExpression)(ExpressionFactory.toExpression(childNodes[0]));
}
else{
//System.out.println(childNodes[0].toString());
expr=(AbstractResultExpression)(ExpressionFactory.toExpression(childNodes[0]));
if(childNodes.length>1){
filterExpr=(AbstractBooleanExpression)(ExpressionFactory.toExpression(childNodes[1]));
}
}
}
if(expr==null){
expr=WildcardExpression.getInstance();
}
AggregationExpression a=new AggregationExpression(aggType);
a.setExpr(expr);
a.setFilterExpr(filterExpr);
a.setDistinct(aggNode.isDistinct());
return a;
}
return null;
}
示例5: AggregationServiceAggExpressionDesc
import com.espertech.esper.epl.expression.ExprAggregateNode; //导入依赖的package包/类
/**
* Ctor.
* @param aggregationNode expression
* @param factory method factory
*/
public AggregationServiceAggExpressionDesc(ExprAggregateNode aggregationNode, AggregationMethodFactory factory)
{
this.aggregationNode = aggregationNode;
this.factory = factory;
}
示例6: getEquivalentNodes
import com.espertech.esper.epl.expression.ExprAggregateNode; //导入依赖的package包/类
/**
* Returns the equivalent aggregation functions.
* @return list of agg nodes
*/
public List<ExprAggregateNode> getEquivalentNodes()
{
return equivalentNodes;
}
示例7: getAggregationNode
import com.espertech.esper.epl.expression.ExprAggregateNode; //导入依赖的package包/类
/**
* Returns the expression.
* @return expression
*/
public ExprAggregateNode getAggregationNode()
{
return aggregationNode;
}
示例8: equalsNodeAggregate
import com.espertech.esper.epl.expression.ExprAggregateNode; //导入依赖的package包/类
public boolean equalsNodeAggregate(ExprAggregateNode node)
{
throw new UnsupportedOperationException("not implemented");
}