The Query object has the setFirstResult, setMaxResults and setFetchSize methods. These are used for paging objects: load objects 1-60, then 61-120, etc.
Bulk updates to loaded objects aren't very feasible, as you do have to load each object, modify it, and save it. You can issue direct SQL, or make use of HQL's limited DML support ("update YourClass set property1 = :newVal where property1 = :oldVal"), if the bulk updates are simple enough.
_________________ Code tags are your friend. Know them and use them.
|