|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.2) E14255-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IPropertyTypeSorter
Interface which allows custom property type sorting, for specified Java property container types. The property types can be used when sorting both 'standard properties' and 'extended properties' (added by a PropertyProvider).
An overview of custom sorting and filtering is provided in the package documentation at com.bea.content.paging
NOTE: custom property type 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 (or override existing support for sorting) a non-Comparable 'property type', such as com.bea.content.ObjectClass. This support will automatically extend to allow sorting on all the JavaBean properties of the specified property type. For example, ObjectClass getObjectClass(), and any other methods returning ObjectClass.
Basically, this specifies a custom Comparator implementation defining Comparator.compare( T o1, T o2 ) where T is a property value of one of the supported property types, NOT an object value, for one or more Java property container types (such as Node, VirtualNode, etc).
In this context, 'property types' refers to the return value of JavaBean methods on the Java class, not to a CM Node ObjectClass type.
For example, the com.bea.content.Node type has an ObjectClass getObjectClass() method, but the ObjectClass type is not Comparable. One could add support for sorting the ObjectClass type, and select support for any JavaBean properties of property type ObjectClass on the 'property container' types com.bea.content.Node, and com.bea.content.virtual.version.Version. In this case, the Comparator method would be Comparator.compare( ObjectClass o1, ObjectClass o2 )
Field Summary | |
---|---|
static ContextKey |
PROPERTY_TYPE_SORTER_KEY CONTEXT KEYS (optional) specifies an ordered List<IPropertyTypeSorter> used for sorting. |
Method Summary | |
---|---|
Set<Class> |
getPropertyTypes(ContentContext context, Class<?> propertyContainerTypeClass) For the specified property container Java type, which property types does this sorter support? |
void |
setState(ContentContext context, Locale locale) called BEFORE the comparator.compare() method is invoked |
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 PROPERTY_TYPE_SORTER_KEY
For example, one could add sorting capabilities for all properties of type 'ObjectClass', regardless of the property name.
A set of IPropertyTypeSorter(s) is provided by default; this key lets you add additional IPropertyTypeSorter obbjects.
Multiple IPropertyTypeSorter(s) can apply for a given type, such as Node.
Method Detail |
---|
Set<Class> getPropertyTypes(ContentContext context, Class<?> propertyContainerTypeClass) throws RepositoryException
A property type sorter can support multiple property types, such as com.bea.content.ObjectClass and java.util.Calendar.
The property container type class may be any of those returned by ITypeSupport.getSupportedTypes( ContentContext ).
Must return a Set, though the Set can be empty. NULL is not a valid return value.
RepositoryException
void setState(ContentContext context, Locale locale) throws RepositoryException
RepositoryException
|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.2) E14255-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2010, Oracle. All rights reserved.