JPA Method
in javax.persistence.Query

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.
Return:
position of the first result
Since:
JPA 2.0
The Running JPA Queries article explains how to use getFirstResult.