public abstract class SearchQuery<T> extends Object
Constructor and Description |
---|
SearchQuery(org.hibernate.Session session,
Class<T> type) |
Modifier and Type | Method and Description |
---|---|
protected org.hibernate.Session |
getSession() |
protected Class<T> |
getType() |
abstract List<T> |
list()
Runs the query returning a list with all results.
|
ListPart<T> |
listPart(Integer firstResult,
Integer maxResults) |
abstract ListPart<T> |
listPart(Long firstResult,
Long maxResults)
Runs the query returning a partial results list.
|
abstract long |
resultSize() |
abstract T |
uniqueResult()
Runs the query returning a unique result.
|
protected org.hibernate.Session getSession()
public abstract T uniqueResult() throws org.hibernate.HibernateException
org.hibernate.HibernateException
- if more than one resultpublic abstract List<T> list()
public abstract ListPart<T> listPart(Long firstResult, Long maxResults)
firstResult
- position of the first result to return, optionalmaxResults
- maximum number of results, optionalpublic abstract long resultSize()
Copyright © 2024 OpenMRS Inc.. All rights reserved.