![JAR search and dependency download from the Maven repository](/logo.png)
org.hibernate.criterion.ProjectionList Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hibernate Show documentation
Show all versions of hibernate Show documentation
Relational Persistence for Java
//$Id: ProjectionList.java 6490 2005-04-23 07:09:03Z oneovthafew $
package org.hibernate.criterion;
import java.util.ArrayList;
import java.util.List;
import org.hibernate.Criteria;
import org.hibernate.HibernateException;
import org.hibernate.type.Type;
import org.hibernate.util.ArrayHelper;
/**
* @author Gavin King
*/
public class ProjectionList implements Projection {
private List elements = new ArrayList();
protected ProjectionList() {}
public ProjectionList create() {
return new ProjectionList();
}
public ProjectionList add(Projection proj) {
elements.add(proj);
return this;
}
public ProjectionList add(Projection projection, String alias) {
return add( Projections.alias(projection, alias) );
}
public Type[] getTypes(Criteria criteria, CriteriaQuery criteriaQuery)
throws HibernateException {
List types = new ArrayList( getLength() );
for ( int i=0; i2 ) buf.setLength( buf.length()-2 ); //pull off the last ", "
return buf.toString();
}
public String[] getColumnAliases(int loc) {
List result = new ArrayList( getLength() );
for ( int i=0; i
© 2015 - 2025 Weber Informatics LLC | Privacy Policy