Package org.alfresco.repo.query
Class AbstractQNameAwareCannedQueryFactory.PropertyBasedComparator<R>
java.lang.Object
org.alfresco.repo.query.AbstractQNameAwareCannedQueryFactory.PropertyBasedComparator<R>
- All Implemented Interfaces:
Comparator<R>
- Direct Known Subclasses:
AbstractBlogPostsCannedQueryFactory.BlogEntityComparator,AbstractQNameAwareCannedQueryFactory.NodeBackedEntityComparator,GetCalendarEntriesCannedQuery.CalendarEntityComparator
- Enclosing class:
- AbstractQNameAwareCannedQueryFactory<R>
public abstract static class AbstractQNameAwareCannedQueryFactory.PropertyBasedComparator<R>
extends Object
implements Comparator<R>
Utility class to sort Entities on the basis of a Comparable property.
Comparisons of two null properties are considered 'equal' by this comparator.
Comparisons involving one null and one non-null property will return the null property as
being 'before' the non-null property.
Note that it is the responsibility of the calling code to ensure that the specified
property values actually implement Comparable themselves.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Field Details
-
comparableProperty
-
-
Constructor Details
-
PropertyBasedComparator
-
-
Method Details
-
getProperty
-
compare
- Specified by:
comparein interfaceComparator<R>
-