Search Class
DEPRECATED
- public class Search
extends Object
implements Cloneable, Serializable
This represents parameters for searching for objects, specifically Content
objects.
Attribute: maxReturn
- Containment: By Value
- Multiplicity: 1:1
- This specifies the maximum number of objects to return. It should 0 or
less to specifying returning all objects that match, no matter how large.
Attribute: sort
- Containment: By Value
- Multiplicity: 1:1
- This specifies the SQL ORDER BY-style clause the controlling the
sorting on the return list. It is a comma-separated list of property names,
each optionally appended with either "ASC" (ascending sort) or "DESC"
(descending sort).
For example, "creationDate ASC, mimeType DESC, identifier" would specify to
sort ascending on on creationDate, to next sort descending on mimeType, and
to finally sort ascending on identifier.
Attribute: expression
- Containment: By Value
- Multiplicity: 1:1
- This specifies the Expression the objects must match against.
Attribute: userId
- Containment: By Value
- Multiplicity: 1:1
- This can contain the user id of the user the search originated from.
Attribute: contextParams
- Containment: By Value
- Multiplicity: 1:1
- This can other arbitrary parameters to pass through to the document
manager. Only Serializable objects should go into this. These are not used
to determine equality.
-
Hierarchy
-
Object
Search
-
All Implemented Interfaces
-
Cloneable, Serializable
contextParams
protected Map contextParams
- The context params.
expression
protected com.bea.p13n.expression.Expression expression
- The search expression.
maxReturn
protected long maxReturn
- The maximum number of objects to return.
sort
protected String sort
- The sorting criteria
userId
protected String userId
- The user id.
Search
public Search()
- Empty constructor.
Search
public Search(String userId,
long maxReturn,
String sort,
Expression expr)
- Constructor.
Search
public Search(long maxReturn,
String sort,
Expression expression)
- Constructor.
clone() Method
public Object clone()
Make a shallow copy of this object.
-
Overrides
-
Object.clone()
equals(Object) Method
public boolean equals(Object o)
Determine if another object is equals to this.
-
Overrides
-
Object.equals(Object)
getContextParam(Object) Method
public Object getContextParam(Object key)
Get the value of a context param.
getContextParams() Method
public Map getContextParams()
Get an unmodifiable copy of the context params.
getExpression() Method
public Expression getExpression()
Get the search expression.
getMaxReturn() Method
public long getMaxReturn()
Get the maximum number of objects to return.
getSort() Method
public String getSort()
Get the sort criteria.
getUserId() Method
public String getUserId()
Get the user id.
hashCode() Method
public int hashCode()
Override hashcode to use our parts.
-
Overrides
-
Object.hashCode()
setContextParam(Object, Object) Method
public Object setContextParam(Object key,
Object value)
Set the value of a context param.
The key and value must be Serializable.
Parameters
-
key
- the context param key.
-
value
- the context param value.
Returns
- the old context param value or null if none.
setContextParams(Map) Method
public void setContextParams(Map input)
Set the context params based upon the objects in the input map.
setExpression(Expression) Method
public void setExpression(Expression expression)
Set the search expression.
setMaxReturn(long) Method
public void setMaxReturn(long maxReturn)
Set the maximum number of objects to return.
setSort(String) Method
public void setSort(String sort)
Set the sort criteria.
setUserId(String) Method
public void setUserId(String userId)
Set the user id.
toString() Method
public String toString()
Get a String representation of this.
-
Overrides
-
Object.toString()