com.imcode.imcms.api.contrib
Class DateTextFieldTextDocumentComparator

java.lang.Object
  extended bycom.imcode.util.ChainableReversibleNullComparator
      extended bycom.imcode.imcms.api.util.ChainableReversibleNullComparator
          extended bycom.imcode.imcms.api.Document.Comparator
              extended bycom.imcode.imcms.api.contrib.DateTextFieldTextDocumentComparator
All Implemented Interfaces:
java.util.Comparator, java.io.Serializable

public class DateTextFieldTextDocumentComparator
extends Document.Comparator

Compares text-documents by a date in a textfield.

Author:
Anders Flodell, Vetenskapsrådet, Pontus Amberg, Vetenskapsrådet
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.imcode.imcms.api.Document.Comparator
ARCHIVED_DATETIME, CREATED_DATETIME, HEADLINE, ID, MODIFIED_DATETIME, PUBLICATION_END_DATETIME, PUBLICATION_START_DATETIME
 
Constructor Summary
DateTextFieldTextDocumentComparator(int textFieldNumber)
           
DateTextFieldTextDocumentComparator(int textFieldNumber, java.lang.String datePattern)
           
 
Method Summary
protected  int compareDocuments(Document d1, Document d2)
           
 
Methods inherited from class com.imcode.imcms.api.Document.Comparator
compare
 
Methods inherited from class com.imcode.util.ChainableReversibleNullComparator
chain, nullsFirst, nullsLast, reversed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

DateTextFieldTextDocumentComparator

public DateTextFieldTextDocumentComparator(int textFieldNumber)

DateTextFieldTextDocumentComparator

public DateTextFieldTextDocumentComparator(int textFieldNumber,
                                           java.lang.String datePattern)
Method Detail

compareDocuments

protected int compareDocuments(Document d1,
                               Document d2)
                        throws NoPermissionException
Specified by:
compareDocuments in class Document.Comparator
Throws:
NoPermissionException