Class Order


  • public class Order
    extends Object
    A simple bean which defines the order to return the results of a search
    Example usage:
    Order ota = new Order("title"); // order by title ascending
    Order otd = new Order("title", false); // order by title descending
    Author:
    Aaron Zeckoski (azeckoski@gmail.com)
    • Field Detail

      • property

        public String property
        the name of the field (property) in the persisted object
      • ascending

        public boolean ascending
        if true then the return order is ascending, if false then return order is descending
    • Constructor Detail

      • Order

        public Order​(String property)
        a simple order for a property which is ascending
        Parameters:
        property - the name of the field (property) in the persisted object
      • Order

        public Order​(String property,
                     boolean ascending)
        define an order for a property
        Parameters:
        property - the name of the field (property) in the persisted object
        ascending - if true then the return order is ascending, if false then return order is descending
    • Method Detail

      • getProperty

        public String getProperty()
        the name of the field (property) in the persisted object
      • setProperty

        public void setProperty​(String property)
      • isAscending

        public boolean isAscending()
        if true then the return order is ascending, if false then return order is descending
      • setAscending

        public void setAscending​(boolean ascending)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object