class: VersionHistoryEntryVOComparator

public class: VersionHistoryEntryVOComparator
Author: Johannes Mueller (initial creation)
Project: Phase: 1.0; Status: Proposed; Version: $Revision: 1951 $ $LastChangedDate: 2007-07-09 16:; Complexity: 1
Dates: Created: 16.07.2009 15:13:19; Modified: 16.07.2009 15:13:19;
Flags: Active: false; IsRoot: false; IsLeaf: false;
Extension Points:
UUID: {2A5CCD28-8B20-48e1-B44E-C3D17CBBBA0B}
The class implements the comparison of two EventVOs for the criteria which has to be given in the constructor. Note: this comparator imposes orderings that are inconsistent with equals.
@revised by MuJ: 27.08.2007
 

Goto: Custom Properties, Fields, Methods

See also: Criteria

Appears in: comparator

Connections
 
Custom Properties
 
VersionHistoryEntryVOComparator Attributes
Attribute Details
private Criteria
  criteria
private static const int
  EQUAL
Initial: 0
private static const int
  GREATER
Initial: 1
private static const int
  LESS
Initial: -1
 
VersionHistoryEntryVOComparator Methods
Operation Details
public
compare(
   VersionHistoryEntryVO event1,
   VersionHistoryEntryVO event2):int
Sequential
Notes: (non-Javadoc)
@see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
private
compareDate(
   VersionHistoryEntryVO event1,
   VersionHistoryEntryVO event2):int
Sequential
Notes: This method compares the dates of two EventVOs using the modificationDate attribute. Both itemVersions must not be null. If no date is given (is null) it is greater than a given date.
@return 0 if the item versions are equal, -1 if the first argument is less than the second, 1 otherwise.
public
VersionHistoryEntryVOComparator(
   Criteria criteria):
Sequential
Notes: Creates a new instance with the given criteria.