com.vaadin.addon.jpacontainer
Class SortBy

java.lang.Object
  extended by com.vaadin.addon.jpacontainer.SortBy
All Implemented Interfaces:
Serializable

public final class SortBy
extends Object
implements Serializable

Data structure class representing a field to sort by and the direction of the sort (ascending or descending). Once created, the instances of this class are immutable.

Since:
1.0
Author:
Petter Holmström (Vaadin Ltd)
See Also:
Serialized Form

Constructor Summary
SortBy(Object propertyId, boolean ascending)
          Creates a new SortBy instance.
 
Method Summary
 boolean equals(Object obj)
           
 Object getPropertyId()
          Gets the property ID to sort by.
 int hashCode()
           
 boolean isAscending()
          Returns true to sort ascendingly, false to sort descendingly.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SortBy

public SortBy(Object propertyId,
              boolean ascending)
Creates a new SortBy instance.

Parameters:
propertyId - the property ID to sort by (must not be null).
ascending - true to sort ascendingly, false to sort descendingly.
Method Detail

getPropertyId

public Object getPropertyId()
Gets the property ID to sort by.


isAscending

public boolean isAscending()
Returns true to sort ascendingly, false to sort descendingly.


equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2013 Vaadin Ltd. All rights reserved.