public class DocumentModelComparator extends Object implements Sorter
Constructor and Description |
---|
DocumentModelComparator(Map<String,String> orderBy)
Constructor using a map of property names to compare on.
|
DocumentModelComparator(String schemaName,
Map<String,String> orderBy)
Constructor using a schema and a map of field names to compare on.
|
Modifier and Type | Method and Description |
---|---|
int |
compare(DocumentModel doc1,
DocumentModel doc2) |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
equals
public static final String ORDER_ASC
public DocumentModelComparator(String schemaName, Map<String,String> orderBy)
schemaName
- the schema nameorderBy
- map using property names as keys, and "asc" or "desc" as
values. Should be a LinkedHashMap
if order of criteria
matters.public DocumentModelComparator(Map<String,String> orderBy)
orderBy
- map using property names as keys, and "asc" or "desc" as
values. Should be a LinkedHashMap
if order of criteria
matters.public int compare(DocumentModel doc1, DocumentModel doc2)
compare
in interface Comparator<DocumentModel>
Copyright © 2011 Nuxeo SA. All Rights Reserved.