|
Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IObjectSorter
Interface which allows custom sorting to use the entire object state, for specified Java types. This is in contrast to property sorters, which only have access to individual properties.
An overview of custom sorting and filtering is provided in the package documentation
at com.bea.content.paging
NOTE: custom object sorters are designed for small datasets (narrow queries returning a hundred or less objects). They may not scale well for large datasets.
Use this interface when you want to add support for sorting objects of a given type, such as com.bea.content.Node, in their entirety. If you need access to multiple fields when doing sorting, this might be a good choice. For example, you could use an object sorter to sort on multiple properties on a com.bea.content.Node object at once.
Basically, this specifies a custom Comparator implementation defining Comparator.compare( T o1, T o2 ) where o1 and o2 are the property container object values, NOT property values. This implementation will apply for one or more Java types (such as Node, VirtualNode, etc).
A ObjectSorter could also be written to sort on multiple custom Node ObjectClass (type) properties.
Field Summary | |
---|---|
static ContextKey |
OBJECT_SORTER_KEY
CONTEXT KEYS (optional) specifies an ordered List |
Method Summary | |
---|---|
void |
setState(ContentContext context,
Locale locale)
called BEFORE the Comparator.compare() method is invoked, to configure the filter state |
Methods inherited from interface java.util.Comparator |
---|
compare, equals |
Methods inherited from interface com.bea.content.paging.internal.ITypeSupport |
---|
getSupportedTypes |
Field Detail |
---|
static final ContextKey OBJECT_SORTER_KEY
A single IObjectSorter can apply for a given type, such as Node. The first IObjectSorter in the list which applies for the specified type is the one used.
Method Detail |
---|
void setState(ContentContext context, Locale locale) throws RepositoryException
RepositoryException
|
Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |