public class SearchExpression extends Object implements Serializable
For AND and OR operators, the left and right operands must both be instances of this class. For the NOT operator, the right operand must be an instance of this class and the left operand must be null.
For comparison operators, the left operand is the name of the attribute being compared represented as a String, and the right operand is the value being compared represented as a String, Integer, Long, Boolean or Date. For the IS_NULL and IS_NOT_NULL operators, the right operand must be null.
The EQUALS operator supports the use of * and ? as wildcard characters. Wildcard characters are only allowed when comparing a String data type. Other operators treat the * and ? characters as literal characters and not as wildcard characters.
The CONTAINS operator does a text search on the contents of a document. The right operand either specifies words and phrases to be found in the contents of a document or specifies an Oracle Text query expression. Words are separated by spaces and phases are enclosed in double quotes ("). An Oracle Text query expression begins with a left brace ({) and ends with a right brace (}). The braces are removed and the enclosed string is passed directly as the text query in the SQL CONTAINS statement. The left operand must be null.
The allowable search expression operators are:
Only a subset of FDK attributes are supported in a search expression. See the list of supported attributes below. In addition, some attributes only apply to Documents. Using an attribute that only applies to a Document in a search expression will result in only Documents being returned in the search results. For example, searching on SIZE will result in only Documents (and not Folders) being returned.
The allowable attributes in a search expression are:
Category attributes may be used in a search expression to search for
documents with a category associated with the document where the category
has an attribute which satisfies the search condition. A category attribute
is specified by a string in the format
"[ category_class_name : category_attribute_name ]"
The category_class_name is the internal class name of the category which is different from the category display name. The internal class name of a category is returned by the Attributes.CLASS_NAME attribute of the CATEGORY_CLASS item corresponding to the category.
The category_attribute_name is the internal attribute name of the
category attribute which is different from the attribute display name.
The internal attribute name corresponds to the Attributes.ATTRIBUTE_NAME
value returned by making a subrequest on
Attributes.METADATA_ATTRIBUTES
.
The special operator HAS_CATEGORY may be used to check if a document
has a category of the specified type associated with it. The right operand
specifies the category class and the left operand must be null. The right
operand is a string in the format
"[ category_class_name ]"
The category_class_name is the internal class name of the category. The HAS_CATEGORY operator will check if a document has the specified category class, or any of the category's subclasses, associated with the document.
Constructor and Description |
---|
SearchExpression()
Constructor
|
Modifier and Type | Method and Description |
---|---|
Object |
getLeftOperand()
Get the left operand.
|
String |
getOperator()
Get the operator value.
|
Object |
getRightOperand()
Get the right operand.
|
void |
setLeftOperand(Object left)
Set the left operand.
|
void |
setOperator(String operator)
Set the operator value.
|
void |
setRightOperand(Object right)
Set the right operand.
|
String |
toString()
Convert the search expression to a string representation.
|
public String getOperator()
public void setOperator(String operator)
public Object getLeftOperand()
public void setLeftOperand(Object left)
public Object getRightOperand()
public void setRightOperand(Object right)
Copyright © 2023. All rights reserved.