getPage methods use a QueryBuilder which is using AbstractQuery to enable reuse for the count query. However for list/find/etc methods using CriteriaQuery is more useful as it allows e.g. ordering of the results out of the box and prevents casting on the calling side.
getPage
methods use aQueryBuilder
which is usingAbstractQuery
to enable reuse for the count query. However for list/find/etc methods usingCriteriaQuery
is more useful as it allows e.g. ordering of the results out of the box and prevents casting on the calling side.