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

io.pelle.mango.db.query.ServerSelectQuery 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.SelectQuery;

public class ServerSelectQuery extends BaseServerQuery> {

	private ServerSelectQuery(SelectQuery selectQuery) {
		super(selectQuery);
	}

	public static  ServerSelectQuery adapt(SelectQuery selectQuery) {
		return new ServerSelectQuery<>(selectQuery);
	}

	public String getJPQL(IEntityVOMapper entityVOMapper) {

		String result = "SELECT " + getSelectClause() + " FROM " + getFromClause(entityVOMapper) + " " + getJoinClause() + " " + getWhereClause() + " " + getOrderClause();

		return result.trim().replaceAll("\\b\\s{2,}\\b", " ");
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy