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

io.pelle.mango.client.base.vo.query.AggregateQuery Maven / Gradle / Ivy

The newest version!
package io.pelle.mango.client.base.vo.query;

import io.pelle.mango.client.base.vo.IAttributeDescriptor;
import io.pelle.mango.client.base.vo.IVOEntity;

import java.util.ArrayList;
import java.util.List;

@SuppressWarnings("serial")
public class AggregateQuery extends BaseQuery> {

	private List> sums = new ArrayList>();

	public AggregateQuery() {
		super();
	}

	public AggregateQuery(Class from) {
		getFroms().add(new Entity(aliasProvider, from.getName()));
	}

	public static final  AggregateQuery aggregateFrom(Class entity) {
		return new AggregateQuery(entity);
	}

	public AggregateQuery from(Class from) {
		getFroms().add(new Entity(aliasProvider, from.getName()));
		return this;
	}

	@Override
	public AggregateQuery getQuery() {
		return this;
	}

	public AggregateQuery sum(IAttributeDescriptor attributeDescriptor) {
		sums.add(attributeDescriptor);
		return this;
	}

	public List> getSums() {
		return sums;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy