I think you can approach this in 2 steps:
1. on your pojo define the order as a property and for the mapping use a formula, the formula will implement in sql your predicate
http://www.hibernate.org/hib_docs/annotations/api/org/hibernate/annotations/Formula.html
2. in HQL/Criteria use the property name that you defined above
This approach has the added benefit of explicitly exposing the concept of 'hasAnOrder' and this may prove useful in other parts of the design AND/OR ease maintenance moving forward.
Marius