I haven't looked into the delegate/criteria stuff but my lazy-man's way of doing
this is:
| List<Customer> customers = entityManager.createQuery("select c from
Customer as c "+
| " where c.customerId >= :minCustomerId"+
| " and c.customerId <= :maxCustomerId")
| .setParameter("minCustomerId",
selectedCustomer==null?Long.MIN_VALUE:selectedCustomer.customerId)
| .setParameter("maxCustomerId",
selectedCustomer==null?Long.MAX_VALUE:selectedCustomer.customerId)
| .getResultList();
|
Cheers,
Damian.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4102142#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...