public TypedValue[] getTypedValues(Criteria criteria, CriteriaQuery criteriaQuery)
throws HibernateException {
ArrayList list = new ArrayList();
Type type = criteriaQuery.getTypeUsingProjection(criteria, propertyName);
if ( type.isComponentType() ) {
CompositeType actype = (CompositeType) type;
Type[] types = actype.getSubtypes();
for ( int j=0; j<values.length; j++ ) {
for ( int i=0; i<types.length; i++ ) {
Object subval = values[j]==null ?
null :
actype.getPropertyValues( values[j], EntityMode.POJO )[i];
list.add( new TypedValue( types[i], subval, EntityMode.POJO ) );
}
}
}
else {