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
Interface IDocumentQuery

public interface IDocumentQuery

Interface that allows querying of documents in the Knowledge Directory. The query can be directed to a specific document folder or narrowed down using a set of filters. An instance of a document query is created with a call to `IDocumentManager.createQuery()`. Once the desired query parameters are specified, the query can be executed with the `execute()` method.

Method Summary
`IObjectQuery` | `execute()` Executes the query and returns query results.
`QueryFilter[]` | `getFilters()` Gets an array of query filters.
`int` | `getFolderID()` Gets the folder ID to query.
`int` | `getMaxRows()` Gets the maximum number of query results to return.
`ObjectProperty` | `getSortProperty()` Gets the property on which the query results will be sorted.
`int` | `getStartRow()` Gets an index of the first query result to return.
`boolean` | `isShowUnapproved()` Gets whether unapproved documents will be returned in query results.
`void` | `setFilters(QueryFilter[] filters)` Sets an array of filters to narrow down the query.
`void` | `setFolderID(int folderID)` Sets the folder ID to query.
`void` | `setMaxRows(int maxRows)` Sets the maximum number of query results to return.
`void` | `setShowUnapproved(boolean showUnapproved)` Sets whether unapproved documents should be returned in query results.
`void` | `setSortProperty(ObjectProperty sortProperty)` Sets the property on which the query results will be sorted.
`void` | `setStartRow(int startRow)` Sets an index of the first query result to return.

Method Detail

### getFolderID

    public int getFolderID()

  Gets the folder ID to query.

  Returns:
    the ID of the folder to query

### setFolderID

    public void setFolderID(int folderID)

  Sets the folder ID to query.

  Parameters:
    `folderID` - the folder ID to query

### getStartRow

    public int getStartRow()

  Gets an index of the first query result to return.

  Returns:
    an index of the first query result to return

### setStartRow

    public void setStartRow(int startRow)

  Sets an index of the first query result to return.

  Parameters:
    `startRow` - an index of the first query result to return

### getMaxRows

    public int getMaxRows()

  Gets the maximum number of query results to return.

  Returns:
    the maximum number of query results to return

### setMaxRows

    public void setMaxRows(int maxRows)

  Sets the maximum number of query results to return.

  Parameters:
    `maxRows` - the maximum number of query results to return

### isShowUnapproved

    public boolean isShowUnapproved()

  Gets whether unapproved documents will be returned in query results.

  Returns:
    `true` if unapproved documents will be returned in query results, `false` otherwise

### setShowUnapproved

    public void setShowUnapproved(boolean showUnapproved)

  Sets whether unapproved documents should be returned in query results. Showing unapproved documents requires Edit access on the document folder. If this value is set to `true`, but the user does not have the required Edit access then it will reset to `false`.

  Parameters:
    `showUnapproved` - `true` if unapproved documents should be returned in query results, `false` otherwise

### getSortProperty

    public ObjectProperty getSortProperty()

  Gets the property on which the query results will be sorted.

  Returns:
    the query results sort property

### setSortProperty

    public void setSortProperty(ObjectProperty sortProperty)

  Sets the property on which the query results will be sorted.

  Parameters:
    `sortProperty` - the query results sort property

### getFilters

    public QueryFilter[] getFilters()

  Gets an array of query filters.

  Returns:
    an array of query filters

### setFilters

    public void setFilters(QueryFilter[] filters)

  Sets an array of filters to narrow down the query. The filters are AND'ed; a document must satisfy all the filters to be returned by the query. The `ObjectProperty` in each filter must be of one of the following allowed types: `CrawlerProperty.ImageUUID, DocumentProperty.ContentLanguage, DocumentProperty.CrawlerID, DocumentProperty.DatasourceID, DocumentProperty.DocumentTypeID, DocumentProperty.NumParents,DocumentProperty.ParentFolderID, DocumentProperty.URL, ObjectProperty.Created, ObjectProperty.Description, ObjectProperty.IsLocalized, ObjectProperty.Language, ObjectProperty.LastModified, ObjectProperty.LastModifiedBy ObjectProperty.Name, ObjectProperty.ObjectID, ObjectProperty.OwnerID, or ObjectProperty.UUID`.

  Parameters:
    `filters` - an array of query filters
  Throws:
    `java.lang.IllegalArgumentException` - if the `ObjectProperty` in any of the filters is not one of the above properties

### execute

    public IObjectQuery execute()
                         throws PortalException,
                                java.rmi.RemoteException

  Executes the query and returns query results.

  Returns:
    the query results
  Throws:
    `PortalException` - if the operation resulted in an error in the portal
    `java.rmi.RemoteException` - if there was a communication problem during the execution of the remote method call

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.