com.espertech.esper.client.soda.GroupByClauseExpressionGroupingSet Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of esper Show documentation
Show all versions of esper Show documentation
Complex event processing and event series analysis component
/**************************************************************************************
* Copyright (C) 2006-2015 EsperTech Inc. All rights reserved. *
* http://www.espertech.com/esper *
* http://www.espertech.com *
* ---------------------------------------------------------------------------------- *
* The software in this package is published under the terms of the GPL license *
* a copy of which has been included with this distribution in the license.txt file. *
**************************************************************************************/
package com.espertech.esper.client.soda;
import java.io.StringWriter;
import java.util.List;
/**
* Represents the "grouping sets" keywords.
*/
public class GroupByClauseExpressionGroupingSet implements GroupByClauseExpression
{
private static final long serialVersionUID = 6071844123689652600L;
private List expressions;
/**
* Ctor.
* @param expressions group-by expressions withing grouping set
*/
public GroupByClauseExpressionGroupingSet(List expressions) {
this.expressions = expressions;
}
/**
* Ctor.
*/
public GroupByClauseExpressionGroupingSet() {
}
/**
* Returns list of expressions in grouping set.
* @return group-by expressions
*/
public List getExpressions() {
return expressions;
}
/**
* Sets the list of expressions in grouping set.
* @param expressions group-by expressions
*/
public void setExpressions(List expressions) {
this.expressions = expressions;
}
public void toEPL(StringWriter writer) {
writer.write("grouping sets(");
String delimiter = "";
for (GroupByClauseExpression child : expressions)
{
writer.write(delimiter);
child.toEPL(writer);
delimiter = ", ";
}
writer.write(")");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy