for (Iterator it = query.getOrderings(); it.hasNext();)
{
PersistenceOrdering ordering = (PersistenceOrdering) it.next();
Order ho = ordering.isAscending() ? Order.asc(ordering.getPropertyName()) : Order.desc(ordering.getPropertyName());
hc.addOrder(ho);
}
for (Iterator it = query.getCriterions(); it.hasNext();)
{