Interface IRetrievalSchema
public interface IRetrievalSchema
Represents the paging and sorting aspects for object retrieval.
-
Method Summary
Modifier and TypeMethodDescriptionaddSortExpression
(String memberName, ISortExpression.SortDirection sortDirection) Adds a sort expression for the specified member and direction to the list of current sort expressions.void
addSortExpressions
(ISortExpression... sortExpressions) Adds the specified sort expressions to the list of current sort expressions.void
Clears all sort expressions from the list of sort expressions.long
Returns the page size for object retrieval.long
Returns the paging offset for object retrieval.List<? extends ISortExpression>
Returns all sort expressions which are used to sort the retrieved objects.void
removeSortExpression
(ISortExpression sortExpression) Removes the specified sort expression from the list of sort expressions.void
setAmount
(long amount) Sets the page size for object retrieval.void
setOffset
(long offset) Sets the paging offset from where the result will be retrieved.
-
Method Details
-
getOffset
long getOffset()Returns the paging offset for object retrieval.- Returns:
- the row index of the first object to be retrieved
-
setOffset
void setOffset(long offset) Sets the paging offset from where the result will be retrieved.- Parameters:
offset
- the row index of the first object to be retrieved
-
getAmount
long getAmount()Returns the page size for object retrieval.- Returns:
- the number of objects to retrieve
-
setAmount
void setAmount(long amount) Sets the page size for object retrieval.- Parameters:
amount
- the number of objects to retrieve
-
getSortExpressions
List<? extends ISortExpression> getSortExpressions()Returns all sort expressions which are used to sort the retrieved objects. The sorting is applied from left to right, meaning that the first sort expressions is first used to sort all objects. The second expression is only used if the first expression determines that two objects are equal, etc.- Returns:
- all sort expressions
-
addSortExpressions
Adds the specified sort expressions to the list of current sort expressions. The added sort expression will only be used when all existing sort expressions determine that two objects are equal.- Parameters:
sortExpressions
- the sort expressions to add
-
addSortExpression
Adds a sort expression for the specified member and direction to the list of current sort expressions. The added sort expression will only be used when all existing sort expressions determine that two objects are equal.- Parameters:
memberName
- the name of the attribute to sort onsortDirection
- the sort order- Returns:
- the added sort expression
-
removeSortExpression
Removes the specified sort expression from the list of sort expressions.- Parameters:
sortExpression
- the sort expression to remove
-
clearSortExpressions
void clearSortExpressions()Clears all sort expressions from the list of sort expressions. The retrieved objects will be unsorted.
-