List of usage examples for org.hibernate.criterion Projection toSqlString
public String toSqlString(Criteria criteria, int position, CriteriaQuery criteriaQuery) throws HibernateException;
From source file:de.cosmocode.hibernate.CustomProjectionList.java
License:Apache License
@Override public String toSqlString(Criteria criteria, int loc, CriteriaQuery criteriaQuery) throws HibernateException { final StringBuilder buf = new StringBuilder(); for (int i = 0; i < getLength(); i++) { final Projection proj = getProjection(i); buf.append(proj.toSqlString(criteria, loc, criteriaQuery)); proj.getColumnAliases(loc);// www. j a va 2s . co m if (i < getLength() - 1 && !getProjection(i + 1).isGrouped()) buf.append(", "); } return buf.toString(); }