Class DocumentModelComparator

java.lang.Object
org.nuxeo.ecm.core.api.DocumentModelComparator
All Implemented Interfaces:
Serializable, Comparator<DocumentModel>, Sorter

public class DocumentModelComparator extends Object implements Sorter
DocumentModel comparator. Uses ordering independent of case or accent. If two values are integers/longs, numbering comparison is used.
Author:
Florent Guillaume, Anahide Tchertchian
See Also:
  • Field Details

  • Constructor Details

    • DocumentModelComparator

      public DocumentModelComparator(String schemaName, Map<String,String> orderBy)
      Constructor using a schema and a map of field names to compare on.
      Parameters:
      schemaName - the schema name
      orderBy - map using property names as keys, and "asc" or "desc" as values. Should be a LinkedHashMap if order of criteria matters.
    • DocumentModelComparator

      public DocumentModelComparator(Map<String,String> orderBy)
      Constructor using a map of property names to compare on.
      Parameters:
      orderBy - map using property names as keys, and "asc" or "desc" as values. Should be a LinkedHashMap if order of criteria matters.
  • Method Details