Class OrderBy


  • public final class OrderBy
    extends Object
    Describes a column to sort.
    • Constructor Detail

      • OrderBy

        public OrderBy()
    • Method Detail

      • field

        public String field()
        Get the field property: Describes the actual column name to sort by.
        Returns:
        the field value.
      • withField

        public OrderBy withField​(String field)
        Set the field property: Describes the actual column name to sort by.
        Parameters:
        field - the field value to set.
        Returns:
        the OrderBy object itself.
      • order

        public OrderByOrder order()
        Get the order property: Describes if results should be in ascending/descending order.
        Returns:
        the order value.
      • withOrder

        public OrderBy withOrder​(OrderByOrder order)
        Set the order property: Describes if results should be in ascending/descending order.
        Parameters:
        order - the order value to set.
        Returns:
        the OrderBy object itself.
      • validate

        public void validate()
        Validates the instance.
        Throws:
        IllegalArgumentException - thrown if the instance is not valid.