com.bea.apps.groupspace.search.controls
Interface ExpressionSearchControl<T>

All Superinterfaces
RepoSearchControl<T>, SearchControl<T>
All Known Subinterfaces:
CmExpressionSearchControl, GsExpressionSearchControl<T>

public interface ExpressionSearchControl<T>
extends RepoSearchControl<T>

Usage:


Method Summary
 ExpressionBuilder getExpressionBuilder()
          Return the ExpressionBuilder for use in constructing more comples expressions
 SortableFilterablePagedResult<T> search()
          Search using the current criteria set on the control properties.
 SortableFilterablePagedResult<T> search(Expression expression)
          Execute the search with the given Expression object
 SortableFilterablePagedResult<T> search(String expression)
          Execute the search with the given expression
 Set<T> searchAsSet()
           
 Set<T> searchAsSet(String exp)
          Convenience method.
 SortableFilterablePagedResult<T> searchContains(String property, String criteria, boolean anywhere)
          Find items whose property contains exactly this criteria.
 SortableFilterablePagedResult<T> searchContainsAll(String property, String[] criteria)
          Find items whose property contains all of these criteria.
 SortableFilterablePagedResult<T> searchContainsAny(String property, String[] criteria)
          Find items whose property contains any of these criteria.
 SortableFilterablePagedResult<T> searchCount(String property, int count, ExpressionBuilder.CountCriteria criteria)
          Construct the Expression to limit based on count.
 SortableFilterablePagedResult<T> searchDate(String property, String date, ExpressionBuilder.DateCriteria criteria)
          Construct the Expression to limit the date of the search.
 SortableFilterablePagedResult<T> searchEquals(String property, String criteria)
          Include this property in the search.
 T searchForOne(String exp)
          Convenience method
 SortableFilterablePagedResult<T> searchLike(String property, String criteria, boolean ignoreCase)
          Find items whose property contains something similar to this criteria.
 SortableFilterablePagedResult<T> searchNot(String property, String criteria)
          Excludes this property from the search.
 void setExcludeObjectClassNames(String[] ocNames)
          Exclude these ObjectClasses from the search.
 
Methods inherited from interface com.bea.apps.groupspace.search.controls.RepoSearchControl
getAvailableObjectClasses, getObjectClassProperties, getObjectClassPropertyDefinitions, setSearchPath, setSearchPaths
 
Methods inherited from interface com.bea.apps.groupspace.search.controls.SearchControl
asList, asSet, flushSearchCache, getSortCriteria, setSortCriteria
 

Method Detail

searchForOne

T searchForOne(String exp)
               throws Exception
Convenience method

Throws
Exception

searchAsSet

Set<T> searchAsSet(String exp)
                   throws Exception
Convenience method.

Throws
Exception

searchAsSet

Set<T> searchAsSet()
                   throws Exception
Throws
Exception

search

SortableFilterablePagedResult<T> search()
                                        throws Exception
Search using the current criteria set on the control properties. Returns null if nothing found.

Throws
Exception

getExpressionBuilder

ExpressionBuilder getExpressionBuilder()
Return the ExpressionBuilder for use in constructing more comples expressions


searchDate

SortableFilterablePagedResult<T> searchDate(String property,
                                            String date,
                                            ExpressionBuilder.DateCriteria criteria)
                                            throws Exception
Construct the Expression to limit the date of the search. For example, to find all books published before Jan 12, 2004: dateCriteria("pub_date", DateCriteria.BEFORE)

Throws
Exception

searchCount

SortableFilterablePagedResult<T> searchCount(String property,
                                             int count,
                                             ExpressionBuilder.CountCriteria criteria)
                                             throws Exception
Construct the Expression to limit based on count. For example, to retrieve items with the 'viewed' property value of 'less than three': countCriteria("viewed", 3, CountCriteria.LT);

Throws
Exception

searchNot

SortableFilterablePagedResult<T> searchNot(String property,
                                           String criteria)
                                           throws Exception
Excludes this property from the search. For example, to find all items where the 'genre' property is not 'mystery': not("genre", "mystery")

Throws
Exception

searchEquals

SortableFilterablePagedResult<T> searchEquals(String property,
                                              String criteria)
                                              throws Exception
Include this property in the search. For example, to find all items where the 'genre' property is equal to 'mystery': equals("genre", "mystery")

Throws
Exception

searchContains

SortableFilterablePagedResult<T> searchContains(String property,
                                                String criteria,
                                                boolean anywhere)
                                                throws Exception
Find items whose property contains exactly this criteria. Wildcards are not allowed; use the "like" construct for that. If "anywhere" is set to true, then the word will be searched for anywhere in the content. This means 'pen' will match "pen", " pencil", "open ", and "opening". In this case, it's probably best to use a full text search control.

Throws
Exception

searchContainsAll

SortableFilterablePagedResult<T> searchContainsAll(String property,
                                                   String[] criteria)
                                                   throws Exception
Find items whose property contains all of these criteria. Wildcards are not allowed; use the "like" construct for that.

Throws
Exception

searchContainsAny

SortableFilterablePagedResult<T> searchContainsAny(String property,
                                                   String[] criteria)
                                                   throws Exception
Find items whose property contains any of these criteria. Wildcards are not allowed; use the "like" construct for that. If multiple criteria, separate them by commas.

Throws
Exception

searchLike

SortableFilterablePagedResult<T> searchLike(String property,
                                            String criteria,
                                            boolean ignoreCase)
                                            throws Exception
Find items whose property contains something similar to this criteria. Wildcards are allowed.

Throws
Exception

search

SortableFilterablePagedResult<T> search(String expression)
                                        throws Exception
Execute the search with the given expression

Throws
Exception

search

SortableFilterablePagedResult<T> search(Expression expression)
                                        throws Exception
Execute the search with the given Expression object

Throws
Exception

setExcludeObjectClassNames

void setExcludeObjectClassNames(String[] ocNames)
Exclude these ObjectClasses from the search. This is a comma-separated list of ObjectClass names, eg: "LINK", "ISSUE". Note also you can restrict the search to include only a single ObjectClass, by using the objectClassName() property above. Then all others will be excluded from the search.



Copyright © 2006 BEA Systems, Inc. All Rights Reserved