org.mmbase.storage.search.implementation
Class BasicDateSortOrder
java.lang.Object
org.mmbase.storage.search.implementation.BasicSortOrder
org.mmbase.storage.search.implementation.BasicDateSortOrder
- All Implemented Interfaces:
- Serializable, DateSortOrder, SortOrder
public class BasicDateSortOrder
- extends BasicSortOrder
- implements DateSortOrder, Serializable
Basic implementation.
- Since:
- MMBase-1.7
- Version:
- $Id: BasicDateSortOrder.java 41982 2010-04-20 14:05:14Z michiel $
- Author:
- Rob van Maris
- See Also:
- Serialized Form
BasicDateSortOrder
public BasicDateSortOrder(StepField field)
- Constructor.
Creates new BasicDateSortOrder instance, with
direction
SortOrder.ORDER_ASCENDING.
- Parameters:
field - The associated stepfield.
- Throws:
IllegalArgumentException - when an invalid argument is supplied.
getPart
public int getPart()
- Description copied from interface:
DateSortOrder
- Returns the part of the date-field wich is to be compared.
- Specified by:
getPart in interface DateSortOrder
getPartDescription
public String getPartDescription()
- Returns a description of the part
setPart
public void setPart(int p)
equals
public boolean equals(Object obj)
- Description copied from interface:
SortOrder
- Compares this sortorder to the specified object. The result is
true if and only if the argument is a non-null
SortOrder object associated with the same field, using the same
sort direction.
- Specified by:
equals in interface SortOrder- Overrides:
equals in class BasicSortOrder
- Parameters:
obj - The object to compare with.
- Returns:
true if the objects are equal,
false otherwise.
hashCode
public int hashCode()
- Specified by:
hashCode in interface SortOrder- Overrides:
hashCode in class BasicSortOrder
toString
public String toString()
- Description copied from interface:
SortOrder
- Returns a string representation of this SortOrder.
The string representation has the form
"SortOrder(field:<field>, dir:<dir>)"
where
- <field> is the field alias returned by
getField().getAlias()
- <dir> is the direction returned by
getDirection()
- Specified by:
toString in interface SortOrder- Overrides:
toString in class BasicSortOrder
- Returns:
- A string representation of this SortOrder.
MMBase 2.0-SNAPSHOT - null