public static class GenericModel.JPAQuery extends Object
Constructor and Description |
---|
JPAQuery(Query query) |
JPAQuery(String sq,
Query query) |
Modifier and Type | Method and Description |
---|---|
GenericModel.JPAQuery |
bind(String name,
Object param)
Bind a JPQL named parameter to the current query.
|
<T> List<T> |
fetch()
Retrieve all results of the query
|
<T> List<T> |
fetch(int max)
Retrieve results of the query
|
<T> List<T> |
fetch(int page,
int length)
Retrieve a page of result
|
<T> T |
first() |
<T> GenericModel.JPAQuery |
from(int position)
Set the position to start
|
GenericModel.JPAQuery |
setParameter(String name,
Object param)
Set a named parameter for this query.
|
public JPAQuery(Query query)
public <T> T first()
public GenericModel.JPAQuery bind(String name, Object param)
public GenericModel.JPAQuery setParameter(String name, Object param)
public <T> List<T> fetch()
public <T> List<T> fetch(int max)
max
- Max results to fetchpublic <T> GenericModel.JPAQuery from(int position)
position
- Position of the first elementpublic <T> List<T> fetch(int page, int length)
page
- Page number (start at 1)length
- (page length)Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly