Class ConstrainedResultSet<T>
java.lang.Object
com.peterphi.std.guice.hibernate.webquery.ConstrainedResultSet<T>
-
Field Summary
-
Constructor Summary
ConstructorDescriptionConstrainedResultSet
(ResultSetConstraint constraint, List<T> list) ConstrainedResultSet
(WebQuery query, List<T> list) -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.use WebQueryDefinition insteadgetInfo()
int
getLimit()
getList()
int
getQuery()
getSql()
getTotal()
one()
When exactly one result is expected, returns that result or throwsIllegalArgumentException
if too many or too few results were returnedvoid
void
void
When a single result is expected, returns that result (or null if no results were returned).
-
Field Details
-
constraint
-
query
-
sql
-
info
-
list
-
total
-
-
Constructor Details
-
ConstrainedResultSet
-
ConstrainedResultSet
-
-
Method Details
-
getOffset
public int getOffset() -
getLimit
public int getLimit() -
getList
-
getConstraint
Deprecated.use WebQueryDefinition instead- Returns:
-
getQuery
-
getTotal
-
setTotal
-
getSql
-
setSql
-
getInfo
-
setInfo
-
one
When exactly one result is expected, returns that result or throwsIllegalArgumentException
if too many or too few results were returned- Returns:
-
uniqueResult
When a single result is expected, returns that result (or null if no results were returned). Throws anIllegalArgumentException
if more than one results were returned- Returns:
-