Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2008 BEA Systems, Inc. All Rights Reserved
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.content.paging
Interface IPropertyTypeFilter

All Superinterfaces
  com.bea.content.paging.internal.IFilter, com.bea.content.paging.internal.ITypeSupport

    public interface IPropertyTypeFilter

extends com.bea.content.paging.internal.IFilter, com.bea.content.paging.internal.ITypeSupport

Interface which allows custom property type filtering, for specified Java property container types. The property types can be used when filtering 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 filters 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 filtering (or override existing support for filtering) a 'property type' which does not implement IFilter, such as Calendar or Date. This support will automatically extend to allow filtering on all the JavaBean properties of the specified property type. For example, Calendar getModifiedDate(), and any other methods returning Calendar.

Basically, this specifies a custom IFilter implementation defining IFilter.accept( ContentContext, T ) where T is a property value of one of the supported property types, NOT an object value, for one or more supported 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 several methods which return a Calendar type, and this type is not normally filterable. One could add support for filtering the Calendar type for specific container types, such as com.bea.content.Node, and com.bea.content.virtual.version.Version. The implementation might define support for the EQUALS and NOT_EQUALS filter methods. In this case, the Filter method would be IFilter.accept( ContentContext, Object propVal ) where propVal would be invoked with type Calendar.

Field Summary
`static ContextKey` | `PROPERTY_TYPE_FILTER_KEY` CONTEXT KEYS (optional) specifies an ordered List used for filtering.

Method Summary
`Set<FilterMethod>` | `getFilterMethods(ContentContext context, Class<?> propertyContainerTypeClass, Class<?> propertyTypeClass)` For the specified property container Java type, such as com.bea.content.Node, and the specified property type, such as java.util.Calendar, which com.bea.p13n.pagination.FilterMethod filter methods are supported?
`Set<Class>` | `getPropertyTypes(ContentContext context, Class<?> propertyContainerTypeClass)` For the specified property container Java type, which property types does this filter support?
`void` | `setState(ContentContext context, FilterMethod filterMethod, String filterString, Locale filterLocale)` called BEFORE the filter.accept() method is invoked, to configure the filter state

Methods inherited from interface com.bea.content.paging.internal.IFilter
`accept`

Methods inherited from interface com.bea.content.paging.internal.ITypeSupport
`getSupportedTypes`

Field Detail

### PROPERTY_TYPE_FILTER_KEY

    static final ContextKey PROPERTY_TYPE_FILTER_KEY

  CONTEXT KEYS (optional) specifies an ordered List used for filtering. The IPropertyTypeFilter interface is used to add or override support for custom property filtering of a property type, which overrides the default property filtering approach (if any).

  For example, one could add filtering capabilities for all properties of type 'Calendar', regardless of the property name.

  A set of IPropertyTypeFilter(s) is provided by default; this key lets you add additional IPropertyTypeFilter obbjects.

  Multiple IPropertyTypeFilter(s) can apply for a given type, such as Node.

Method Detail

### getPropertyTypes

    Set<Class> getPropertyTypes(ContentContext context,
                                Class<?> propertyContainerTypeClass)
                                throws RepositoryException

  For the specified property container Java type, which property types does this filter support?

  A property type filter can support multiple property types, such as java.lang.String 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.

  Throws
    `RepositoryException`

### getFilterMethods

    Set<FilterMethod> getFilterMethods(ContentContext context,
                                       Class<?> propertyContainerTypeClass,
                                       Class<?> propertyTypeClass)
                                       throws RepositoryException

  For the specified property container Java type, such as com.bea.content.Node, and the specified property type, such as java.util.Calendar, which com.bea.p13n.pagination.FilterMethod filter methods are supported?

  The property container type class may be any of those returned by ITypeSupport.getSupportedTypes( ContentContext ). The property type class may be any of those returned by getSupportedPropertyTypes( ContentContext, Class ).

  Must return a Set, though the Set can be empty. NULL is not a valid return value.

  Throws
    `RepositoryException`

### setState

    void setState(ContentContext context,
                  FilterMethod filterMethod,
                  String filterString,
                  Locale filterLocale)
                  throws RepositoryException

  called BEFORE the filter.accept() method is invoked, to configure the filter state

  Throws
    `RepositoryException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008 BEA Systems, Inc. All Rights Reserved