当前位置: 首页>>代码示例>>Java>>正文


Java ExprAggregateNode类代码示例

本文整理汇总了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);
}
 
开发者ID:mobile-event-processing,项目名称:Asper,代码行数:12,代码来源:AggregationServiceAggExpressionDesc.java

示例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);
    }
}
 
开发者ID:mobile-event-processing,项目名称:Asper,代码行数:16,代码来源:AggregationServiceAggExpressionDesc.java

示例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);
}
 
开发者ID:mobile-event-processing,项目名称:Asper,代码行数:8,代码来源:TestAggregationServiceFactory.java

示例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;
}
 
开发者ID:HoratiusTang,项目名称:EsperDist,代码行数:82,代码来源:AggregationExpression.java

示例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;
}
 
开发者ID:mobile-event-processing,项目名称:Asper,代码行数:11,代码来源:AggregationServiceAggExpressionDesc.java

示例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;
}
 
开发者ID:mobile-event-processing,项目名称:Asper,代码行数:9,代码来源:AggregationServiceAggExpressionDesc.java

示例7: getAggregationNode

import com.espertech.esper.epl.expression.ExprAggregateNode; //导入依赖的package包/类
/**
 * Returns the expression.
 * @return expression
 */
public ExprAggregateNode getAggregationNode()
{
    return aggregationNode;
}
 
开发者ID:mobile-event-processing,项目名称:Asper,代码行数:9,代码来源:AggregationServiceAggExpressionDesc.java

示例8: equalsNodeAggregate

import com.espertech.esper.epl.expression.ExprAggregateNode; //导入依赖的package包/类
public boolean equalsNodeAggregate(ExprAggregateNode node)
{
    throw new UnsupportedOperationException("not implemented");
}
 
开发者ID:mobile-event-processing,项目名称:Asper,代码行数:5,代码来源:SupportAggregateExprNode.java


注:本文中的com.espertech.esper.epl.expression.ExprAggregateNode类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。