org.mmbase.storage.search.implementation
Class BasicDateSortOrder

java.lang.Object
  extended by org.mmbase.storage.search.implementation.BasicSortOrder
      extended by 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

Field Summary
 
Fields inherited from class org.mmbase.storage.search.implementation.BasicSortOrder
modifiable
 
Fields inherited from interface org.mmbase.storage.search.SortOrder
ORDER_ASCENDING, ORDER_DESCENDING, ORDER_DESCRIPTIONS
 
Constructor Summary
BasicDateSortOrder(StepField field)
          Constructor.
 
Method Summary
 boolean equals(Object obj)
          Compares this sortorder to the specified object.
 int getPart()
          Returns the part of the date-field wich is to be compared.
 String getPartDescription()
          Returns a description of the part
 int hashCode()
           
 void setPart(int p)
           
 String toString()
          Returns a string representation of this SortOrder.
 
Methods inherited from class org.mmbase.storage.search.implementation.BasicSortOrder
getDirection, getDirectionDescription, getField, isCaseSensitive, setCaseSensitive, setDirection, setUnmodifiable
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.mmbase.storage.search.SortOrder
getDirection, getField, isCaseSensitive, setUnmodifiable
 

Constructor Detail

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.
Method Detail

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

Specified by:
toString in interface SortOrder
Overrides:
toString in class BasicSortOrder
Returns:
A string representation of this SortOrder.


MMBase 2.0-SNAPSHOT - null