Interface IRetrievalSchema


public interface IRetrievalSchema
Represents the paging and sorting aspects for object retrieval.
  • 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

      void addSortExpressions(ISortExpression... sortExpressions)
      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

      ISortExpression addSortExpression(String memberName, ISortExpression.SortDirection sortDirection)
      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 on
      sortDirection - the sort order
      Returns:
      the added sort expression
    • removeSortExpression

      void removeSortExpression(ISortExpression sortExpression)
      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.