Jakarta Persistence (JPA) Method

int getFirstResult()


The position of the first result the query object was set to retrieve. Returns 0 if setFirstResult was not applied to the query object.
Returns:
position of the first result.
Since:
Jakarta Persistence (JPA) 2.0


The Running JPA Queries article explains how to use getFirstResult.