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

## com.plumtree.remote.prc.collaboration.query
Interface IFilter

All Known Subinterfaces:
  IDiscussionFilter, IDiscussionMessageFilter, IDocumentFilter, IDocumentFolderFilter, IProjectFilter, ITaskFilter, ITaskListFilter

public interface IFilter

Base interface for all object filters; represents data about a query being constructed. This interface is used to conveniently pass several pieces of data about a query into a method that performs a query. The following data may be specified:

1. The maximum number of rows to return.
2. The order-by fields for returned rows.
3. The sort order of each order-by field.

Order-by fields and sort order are implemented via the `setQueryOrders` method in each derived type from `IFilter`, taking an array of the object-specific `QueryOrder` type, each `QueryOrder` instance in the array encapsulating a sort field and ascending/descending order. For example, `IDiscussionMessageFilter` takes an array of `DiscussionMessageQueryOrder`, each `QueryOrder` instance taking a `DiscussionMessageAttribute` sort field.

Method Summary
`int` | `getMaximumResults()` Returns the value set by `setMaximumResults`.
`boolean` | `isRestoreSecurity()` Returns `true` if security on returned objects should be applied to with respect to the user who performs a query.
`void` | `setMaximumResults(int maximumResults)` Sets the maximum results to return.
`void` | `setRestoreSecurity(boolean restoreSecurity)` Enables or disables the security filter on the result set of the query.

Method Detail

### getMaximumResults

    public int getMaximumResults()

  Returns the value set by `setMaximumResults`.

  Returns:
    the maximum number of rows to return as an int. The default value is to return all results.

### isRestoreSecurity

    public boolean isRestoreSecurity()

  Returns `true` if security on returned objects should be applied to with respect to the user who performs a query. Returns `false` if all the objects that satisfy the query criteria should be returned regardless of security settings. The default value is `false`. This default mode, with no security information applied on the query, is more efficient.

  Note: If this method returns `true`, the query will not return any of the objects that the querying user does not have appropriate access to.

  Returns:
    `true` if the all security should be restored, otherwise `false`

### setMaximumResults

    public void setMaximumResults(int maximumResults)

  Sets the maximum results to return. Using the default value or setting this value to zero will return all results.

  Parameters:
    `maximumResults` - the maximum number of rows to return; 0 means unlimited

### setRestoreSecurity

    public void setRestoreSecurity(boolean restoreSecurity)

  Enables or disables the security filter on the result set of the query. Calling this method with `true` will enable security checking on each of the returned objects against the user who performs a query.

  Note: If the querying user does not have appropriate permission to access the returned objects, the query result will not include those objects.

  Not calling this method and calling this method with `false` will have the same effect on the query. An additional security filter will not be added, and all objects matching the query criteria will be returned. The default value is `false`, which is more efficient.

  This method can be used in conjunction with `isRestoreSecurity` , which would indicate if the query has `restoreSecurity` enabled.

  Parameters:
    `restoreSecurity` - `true` if security should be restored, otherwise `false`. Default value is `false` if not set.

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

For additional information on the IDK, including tutorials, blogs, code samples and more, see the AquaLogic User Interaction Developer Center on BEA dev2dev.

Copyright ©2007 BEA Systems, Inc. All Rights Reserved.