In SQL we have "select top 10" so that only the first 10 rows will be selected. Is there any way in JPA query language to achieve the same effect?
When you create your JPA query object, you can call the following methods on it:
query.setFirstResult(0)
query.setMaxResults(10)