|
Copyright © 2006 BEA Systems, Inc. All Rights Reserved | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bea.content.expression.Search
public class Search
This represents parameters for searching for Nodes.
There are reserved system properties that may be part of a search. They are:
Field Summary | |
---|---|
protected Map |
contextParams
The context params. |
protected Expression |
expression
The search expression. |
protected IFullTextSearch |
fullText
The full text search expression. |
protected int |
maxReturn
The maximum number of objects to return. |
protected List |
searchPaths
The paths under which to search. |
protected SortCriteria[] |
sortCriteria
The sorting criteria |
protected boolean |
useCache
indicates whether or not the search should use the cache or not |
protected boolean |
useFullTextSearch
Whether a full text search is to be performed instead of a database search. |
Constructor Summary | |
---|---|
Search()
Empty constructor. |
|
Search(Expression expr)
Constructor. |
|
Search(int maxReturn,
Expression expr)
Constructor. |
|
Search(int maxReturn,
SortCriteria[] sortCriteria,
Expression expr)
Constructor. |
|
Search(int maxReturn,
SortCriteria[] sortCriteria,
String expr)
Constructor. |
|
Search(int maxReturn,
String expr)
Constructor. |
|
Search(int maxReturn,
String sort,
Expression expr)
Constructor. |
|
Search(int maxReturn,
String sort,
String expr)
Constructor. |
|
Search(String expr)
Constructor. |
|
Search(String searchPath,
int maxReturn,
SortCriteria[] sortCriteria,
Expression expr)
Constructor. |
|
Search(String searchPath,
int maxReturn,
SortCriteria[] sortCriteria,
IFullTextSearch expr,
boolean performFullTextSearch)
Constructor. |
|
Search(String searchPath,
int maxReturn,
SortCriteria[] sortCriteria,
String expr)
Constructor. |
|
Search(String searchPath,
int maxReturn,
String sort,
Expression expr)
Constructor. |
|
Search(String searchPath,
int maxReturn,
String sort,
String expr)
Constructor. |
Method Summary | |
---|---|
void |
addSearchPath(String path)
Add a search path. |
void |
clearSearchPaths()
Clear the search paths. |
Object |
clone()
Make a deep copy of this object |
boolean |
equals(Object o)
Determine if another object is equals to this. |
Object |
getContextParam(Object key)
Get the value of a context param. |
Map |
getContextParams()
Get an unmodifiable copy of the context params. |
Expression |
getExpression()
Get the search expression. |
IFullTextSearch |
getFullTextExpression()
Get the search expression corresponding to a full text search. |
int |
getMaxReturn()
Get the maximum number of objects to return. |
int |
getNumSearchPaths()
Get the number of search paths. |
String[] |
getSearchPaths()
Get the search paths. |
Iterator |
getSearchPathsIterator()
Get an iterator over the search paths. |
SortCriteria[] |
getSortCriteria()
Get the sort criteria. |
int |
hashCode()
Override hashcode to use our parts. |
boolean |
isFullTextSearch()
Check if this is a Full Text Search instead of the Database Search |
boolean |
isUseCache()
Indicates whether or not the search, when executed will try to use the global search cache or not. |
void |
removeSearchPath(String path)
Remove a search path. |
Object |
setContextParam(Object key,
Object value)
Set the value of a context param. |
void |
setContextParams(Map input)
Set the context params based upon the objects in the input map. |
void |
setExpression(Expression expression)
Set the search expression. |
void |
setFullTextExpression(IFullTextSearch expression)
Set the search expression corresponding to a full text search. |
void |
setFullTextSearch(boolean fullTextSearch)
Enable/Disable Full Text Search |
void |
setMaxReturn(int maxReturn)
Set the maximum number of objects to return. |
void |
setSearchPath(String searchPath)
Set the search path to contain just this one. |
void |
setSearchPaths(String[] paths)
Set the search paths. |
void |
setSortCriteria(SortCriteria[] sortCriteria)
Set the sort criteria. |
void |
setSortCriteria(String sort)
Set the sort criteria. |
void |
setUseCache(boolean useCache)
Indicates to the search API whether or not to use the search cache when executing the search expression. |
String |
toString()
Get a String representation of this. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected List searchPaths
This should be empty to search under all paths (repositories in a federeated search.) This is an OR'ed list.
In a federated search, this can begin with "/*" (e.g."/*/some/path") to denote a search path under each repository. In non-federated search, this should not be construed to contain any special characters.
protected int maxReturn
Less than 0 signifies returning all matches.
protected SortCriteria[] sortCriteria
protected Expression expression
protected IFullTextSearch fullText
protected Map contextParams
Note from com.bea.p13n.content.expression.Search:
Attribute: contextParams
protected boolean useCache
protected boolean useFullTextSearch
Constructor Detail |
---|
public Search(String searchPath, int maxReturn, SortCriteria[] sortCriteria, IFullTextSearch expr, boolean performFullTextSearch)
public Search(String searchPath, int maxReturn, SortCriteria[] sortCriteria, Expression expr)
public Search(String searchPath, int maxReturn, SortCriteria[] sortCriteria, String expr) throws IllegalArgumentException
IllegalArgumentException
public Search(String searchPath, int maxReturn, String sort, Expression expr) throws IllegalArgumentException
IllegalArgumentException
public Search(String searchPath, int maxReturn, String sort, String expr) throws IllegalArgumentException
IllegalArgumentException
public Search(int maxReturn, SortCriteria[] sortCriteria, Expression expr)
public Search(int maxReturn, SortCriteria[] sortCriteria, String expr) throws IllegalArgumentException
IllegalArgumentException
public Search(int maxReturn, String sort, Expression expr) throws IllegalArgumentException
IllegalArgumentException
public Search(int maxReturn, String sort, String expr) throws IllegalArgumentException
IllegalArgumentException
public Search(int maxReturn, Expression expr)
public Search(int maxReturn, String expr) throws IllegalArgumentException
IllegalArgumentException
public Search(Expression expr)
public Search(String expr) throws IllegalArgumentException
IllegalArgumentException
public Search()
Method Detail |
---|
public boolean isFullTextSearch()
public void setFullTextSearch(boolean fullTextSearch)
fullTextSearch
- To enable, set to "true";
to disable full text search (and use database search instead), set to "false".public String[] getSearchPaths()
See searchPaths
for details about what this can be.
public Iterator getSearchPathsIterator()
See searchPaths
for details about what this can be.
public int getNumSearchPaths()
public void setSearchPath(String searchPath)
See searchPaths
for details about what this can be.
public void setSearchPaths(String[] paths)
public void addSearchPath(String path)
See searchPaths
for details about what this can be.
public void removeSearchPath(String path)
public void clearSearchPaths()
public int getMaxReturn()
Use less than 0 to signify returning all matches.
public void setMaxReturn(int maxReturn)
Use less than 0 to signify returning all matches.
public SortCriteria[] getSortCriteria()
public void setSortCriteria(SortCriteria[] sortCriteria)
public void setSortCriteria(String sort) throws IllegalArgumentException
IllegalArgumentException
- if the str string isn't valid occurred
to SortCriteria.getSortCriteria(java.lang.String)
.public Expression getExpression()
public IFullTextSearch getFullTextExpression()
public void setFullTextExpression(IFullTextSearch expression)
public void setExpression(Expression expression)
public Map getContextParams()
public void setContextParams(Map input)
public Object getContextParam(Object key)
public Object setContextParam(Object key, Object value)
The key and value must be Serializable.
key
- the context param key.value
- the context param value.
public Object clone()
clone
in class Object
public int hashCode()
hashCode
in class Object
public boolean isUseCache()
public void setUseCache(boolean useCache)
useCache
- variable indicating whether or not to use the search cache.public boolean equals(Object o)
equals
in class Object
public String toString()
toString
in class Object
|
Copyright © 2006 BEA Systems, Inc. All Rights Reserved | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |