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 positiongetStartIndex()
of the overall set. The result query holdsgetResultCount()
objects of the overall set. The overall set containsgetAllCount()
objects.- Since:
- 19.05.2006
- API:
- This is a public API.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
get(int index)
Gets the object at position index in the query result.int
getAllCount()
Returns the count of overall set of objects that matches the query filterOptional<T>
getFirst()
Gets the first resultT
getOverallBased(int index)
Gets the object at position index in the overall result set.int
getResultCount()
Returns the count of objects hold by this query resultList<T>
getResultList()
Returns the result records.int
getStartIndex()
Returns the index of the first object holding in this query result
-
-
-
Method Detail
-
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
T get(int index)
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
T getOverallBased(int index)
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
List<T> getResultList()
Returns the result records.- Returns:
- result
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-
-