com.envision.eos.event.api.expression.GroupBy Maven / Gradle / Ivy
The newest version!
package com.envision.eos.event.api.expression;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import com.envision.eos.event.api.bo.EventVisitor;
public class GroupBy implements Element {
private static final long serialVersionUID = 1L;
private Set columns = new HashSet();
private List expressions=new ArrayList();
public GroupBy() {
}
public void setColumns(Set columns) {
this.columns = columns;
}
public Set getColumns() {
return columns;
}
public List getExpressions() {
return expressions;
}
public void setExpressions(List expressions) {
this.expressions = expressions;
}
public GroupBy addColumn(Column column) {
if (column == null) {
throw new NullPointerException("Please do not pass null");
}
columns.add(column);
return this;
}
public GroupBy addExpr(Expression expre) {
if(expre==null) {
throw new NullPointerException("Please do not pass null");
}
expressions.add(expre);
return this;
}
public void accept(EventVisitor visitor) throws IOException {
visitor.visit(this);
}
}