Root entity = cq.from(beanClass);
cq.select(entity);
for (Iterator it = query.getOrderings(); it.hasNext();)
{
PersistenceOrdering ordering = (PersistenceOrdering) it.next();
if (ordering.isAscending())
cq.orderBy(cb.asc(entity.get(ordering.getPropertyName())));
else
cq.orderBy(cb.desc(entity.get(ordering.getPropertyName())));
}
// cq.where(cb.equal(entity.get(Order_.orderNumber), orderNumber));
for (Iterator it = query.getCriterions(); it.hasNext();)
{