Methods Summary |
---|
public org.hibernate.criterion.ProjectionList | add(Projection proj)
elements.add(proj);
return this;
|
public org.hibernate.criterion.ProjectionList | add(Projection projection, java.lang.String alias)
return add( Projections.alias(projection, alias) );
|
public org.hibernate.criterion.ProjectionList | create()
return new ProjectionList();
|
public java.lang.String[] | getAliases()
List result = new ArrayList( getLength() );
for ( int i=0; i<getLength(); i++ ) {
String[] aliases = getProjection(i).getAliases();
ArrayHelper.addAll(result, aliases);
}
return ArrayHelper.toStringArray(result);
|
public java.lang.String[] | getColumnAliases(int loc)
List result = new ArrayList( getLength() );
for ( int i=0; i<getLength(); i++ ) {
String[] colAliases = getProjection(i).getColumnAliases(loc);
ArrayHelper.addAll(result, colAliases);
loc+=colAliases.length;
}
return ArrayHelper.toStringArray(result);
|
public java.lang.String[] | getColumnAliases(java.lang.String alias, int loc)
for ( int i=0; i<getLength(); i++ ) {
String[] result = getProjection(i).getColumnAliases(alias, loc);
if (result!=null) return result;
loc += getProjection(i).getColumnAliases(loc).length;
}
return null;
|
public int | getLength()
return elements.size();
|
public Projection | getProjection(int i)
return (Projection) elements.get(i);
|
public org.hibernate.type.Type[] | getTypes(java.lang.String alias, org.hibernate.Criteria criteria, CriteriaQuery criteriaQuery)
for ( int i=0; i<getLength(); i++ ) {
Type[] result = getProjection(i).getTypes(alias, criteria, criteriaQuery);
if (result!=null) return result;
}
return null;
|
public org.hibernate.type.Type[] | getTypes(org.hibernate.Criteria criteria, CriteriaQuery criteriaQuery)
List types = new ArrayList( getLength() );
for ( int i=0; i<getLength(); i++ ) {
Type[] elemTypes = getProjection(i).getTypes(criteria, criteriaQuery);
ArrayHelper.addAll(types, elemTypes);
}
return ArrayHelper.toTypeArray(types);
|
public boolean | isGrouped()
for ( int i=0; i<getLength(); i++ ) {
if ( getProjection(i).isGrouped() ) return true;
}
return false;
|
public java.lang.String | toGroupSqlString(org.hibernate.Criteria criteria, CriteriaQuery criteriaQuery)
StringBuffer buf = new StringBuffer();
for ( int i=0; i<getLength(); i++ ) {
Projection proj = getProjection(i);
if ( proj.isGrouped() ) {
buf.append( proj.toGroupSqlString(criteria, criteriaQuery) )
.append(", ");
}
}
if ( buf.length()>2 ) buf.setLength( buf.length()-2 ); //pull off the last ", "
return buf.toString();
|
public java.lang.String | toSqlString(org.hibernate.Criteria criteria, int loc, CriteriaQuery criteriaQuery)
StringBuffer buf = new StringBuffer();
for ( int i=0; i<getLength(); i++ ) {
Projection proj = getProjection(i);
buf.append( proj.toSqlString(criteria, loc, criteriaQuery) );
loc += proj.getColumnAliases(loc).length;
if ( i<elements.size()-1 ) buf.append(", ");
}
return buf.toString();
|
public java.lang.String | toString()
return elements.toString();
|