Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2006 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 IPropertyFilter

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

    public interface IPropertyFilter

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

Interface which allows custom property filtering, for specified Java property container types and specified JavaBean properties. JavaBean properties can be any combination of '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 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 specific property, such as String getName(), on a specific Java type, such as com.bea.content.Node.

Basically, this specifies a custom IFilter implementation defining IFilter.accept( ContentContext, T ) where T is the property value, NOT the object value, for some combination the following: - one or more Java types (such as Node, VirtualNode, etc) - one or more JavaBean properties on these Java types. (such as Node.getName, etc)

This can be used to override an existing filtering approach for specific properties, and do something special.

At most one property on one type will be filtered on at a time.

For example, one might write an IPropertyFilter to override the default filtering of the String 'name' property on com.bea.content.Node, to ignore nodes with Node names starting with 'test'. In this case, the Filter method would be IFilter.accept( ContentContext, String propVal )

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

Method Summary
`Set<FilterMethod>` | `getFilterMethods(ContentContext context, Class<?> propertyContainerTypeClass, String propertyName)` For the specified Java type, and the specified property name, which filter methods are valid?
`Set<String>` | `getFilterProperties(ContentContext context, Class<?> propertyContainerTypeClass)` For the specified Java type, which JavaBean properties does this property filter support? a property filter can support multiple JavaBean properties on a specified Java type.
`void` | `setState(ContentContext context, String propertyName, 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_FILTER_KEY

    static final ContextKey PROPERTY_FILTER_KEY

  CONTEXT KEYS (optional) specifies an ordered List used for filtering. The IPropertyFilter interface is used to add support for custom property filtering, which overrides the default property filtering approach, if any, for the specified properties.

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

  Multiple IPropertyFilter(s) can apply for a given type, such as Node. A single IPropertyFilter can apply for a given property on a type.

Method Detail

### getFilterProperties

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

  For the specified Java type, which JavaBean properties does this property filter support? a property filter can support multiple JavaBean properties on a specified Java type.

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

  For example, a single IPropertyFilter implementation class might support custom filtering on the 'name' and 'modifiedDate' properties of com.bea.content.Node, and the 'path' property of com.bea.content.ObjectClass.

  At most one of these properties will be filtered upon at any given time.

  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,
                                       String propertyName)
                                       throws RepositoryException

  For the specified Java type, and the specified property name, which filter methods are valid?

  The property container type class may be any of those returned by ITypeSupport.getSupportedTypes( ContentContext ). The property name may be any of those returned by getFilterProperties( 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,
                  String propertyName,
                  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 © 2006 BEA Systems, Inc. All Rights Reserved