Package ch.ivyteam.ivy.persistence
Interface IQueryResult<T>
- Type Parameters:
T
- the type of the object in the result
public interface IQueryResult<T>
Result of a query. Holds the section (part) of the set of objects that fullfit the filter of the query.
The first object in the query result is at position
getStartIndex()
of the overall set. The result query holds
getResultCount()
objects of the overall set. The overall set contains getAllCount()
objects.- Since:
- 19.05.2006
- API:
- This is a public API.
-
Method Summary
Modifier and TypeMethodDescriptionget
(int index) Gets the object at position index in the query result.int
Returns the count of overall set of objects that matches the query filtergetFirst()
Gets the first resultgetOverallBased
(int index) Gets the object at position index in the overall result set.int
Returns the count of objects hold by this query resultReturns the result records.int
Returns the index of the first object holding in this query result
-
Method Details
-
getAllCount
int getAllCount()Returns the count of overall set of objects that matches the query filter
This number is NOT necessarily the returned number of results (
getResultCount()
), but the number of results that could have been found if no result limitation (parametercount
) were specified for the returned results. The return value is -1 if thereturnAllCount
parameter was set to false beforehand on the method call.- Returns:
- all count.
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-
getResultCount
int getResultCount()Returns the count of objects hold by this query result
To get the whole number of potential results use
getAllCount()
- Returns:
- result count.
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-
get
Gets the object at position index in the query result. Note the index must be between [0,getResultCount()
)- Parameters:
index
- the index- Returns:
- the resulting object at position index
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-
getOverallBased
Gets the object at position index in the overall result set. Note the index must be between [getStartIndex()
, {link #getStartIndex()}+getResultCount()
)- Parameters:
index
- the index- Returns:
- the resulting object at position index
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-
getStartIndex
int getStartIndex()Returns the index of the first object holding in this query result- Returns:
- start index.
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-
getResultList
Returns the result records.- Returns:
- result
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-
getFirst
Gets the first result- Returns:
- result
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-