| Modifier and Type | Field and Description |
|---|---|
javax.persistence.Query |
query |
String |
sq |
| Constructor and Description |
|---|
JPAQuery(javax.persistence.Query query) |
JPAQuery(String sq,
javax.persistence.Query query) |
| Modifier and Type | Method and Description |
|---|---|
Model.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> Model.JPAQuery |
from(int position)
Set the position to start
|
Model.JPAQuery |
setParameter(String name,
Object param)
Set a named parameter for this query.
|
public javax.persistence.Query query
public String sq
public JPAQuery(String sq, javax.persistence.Query query)
public JPAQuery(javax.persistence.Query query)
public <T> T first()
public Model.JPAQuery bind(String name, Object param)
public Model.JPAQuery setParameter(String name, Object param)
public <T> List<T> fetch()
public <T> List<T> fetch(int max)
max - Max results to fetchpublic <T> Model.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)Copyright © 2018. All Rights Reserved.