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

io.pelle.mango.db.query.ServerCountQuery Maven / Gradle / Ivy

The newest version!
package io.pelle.mango.db.query;

import io.pelle.mango.client.base.vo.IEntityVOMapper;
import io.pelle.mango.client.base.vo.IVOEntity;
import io.pelle.mango.client.base.vo.query.CountQuery;

public class ServerCountQuery extends BaseServerQuery> {
	
	private ServerCountQuery(CountQuery countQuery)
	{
		super(countQuery);
	}
	
	public static  ServerCountQuery adapt(CountQuery countQuery)
	{
		return new ServerCountQuery<>(countQuery);
	}
	public String getJPQL(IEntityVOMapper entityVOMapper) {

		String result = "SELECT COUNT(" + getSelectClause() + ") FROM " + getFromClause(entityVOMapper) + " " + getJoinClause() + " " + getWhereClause();
		return result.trim().replaceAll("\\b\\s{2,}\\b", " ");

	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy