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.search
Interface ISearchFactory

public interface ISearchFactory

Factory interface to generate `IPortalSearchRequest` and `IFilterClause`.

The example below shows how to query using and AND filter clause and an OR filter clause.

            //finds all documents that have been created in the last three months
            //AND those documents whose name contains ".doc" OR ".ppt"
            IFilterClause andFilterClause = searchFactory.createAndFilterClause();

            //add a statement for created in the last three months
            Calendar cal = Calendar.getInstance();
            cal.add(Calendar.MONTH, -3);

            andFilterClause.addStatement(PlumtreeField.CREATED, Operator.GreaterThan, cal.getTime());

            //make an or filter clause to say we want ppt files or doc files
            IFilterClause orFilterClause = searchFactory.createOrFilterClause();
            orFilterClause.addStatement(PlumtreeField.NAME, Operator.Contains, ".ppt");
            orFilterClause.addStatement(PlumtreeField.NAME, Operator.Contains, ".doc");
            andFilterClause.addClause(orFilterClause);

            searchRequest.setQuery(andFilterClause);
            //note that setQuery also has an override to take a query and a filter clause.

Method Summary
`IFilterClause` | `createAndFilterClause()` Creates an `IFilterClause` to use in `IPortalSearchRequest`.
`IFilterClause` | `createOrFilterClause()` Creates an `IFilterClause` to use in `IPortalSearchRequest`.
`IPortalSearchRequest` | `createPortalSearchRequest()` Creates an `IPortalSearchRequest`.

Method Detail

### createPortalSearchRequest

    public IPortalSearchRequest createPortalSearchRequest()

  Creates an `IPortalSearchRequest`.

  Returns:
    `IPortalSearchRequest`

### createAndFilterClause

    public IFilterClause createAndFilterClause()

  Creates an `IFilterClause` to use in `IPortalSearchRequest`. All statements and child subclauses added to the `IFilterClause` will be AND'd together.

  Returns:
    `IFilterClause`

### createOrFilterClause

    public IFilterClause createOrFilterClause()

  Creates an `IFilterClause` to use in `IPortalSearchRequest`. All statements and child subclauses added to the `IFilterClause` will be OR'd together.

  Returns:
    `IFilterClause`

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.