Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.ifs.fdk
Class SearchExpression

    java.lang.Object
      oracle.ifs.fdk.SearchExpression

All Implemented Interfaces:
  java.io.Serializable

    public class SearchExpression

extends java.lang.Object
implements java.io.Serializable

This class represents a search expression in the form of an expression tree. Each node in the tree is an instance of this class and represents an operator, a left operand and a right operand.

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:

- FdkConstants.OPERATOR_AND
- FdkConstants.OPERATOR_OR
- FdkConstants.OPERATOR_NOT
- FdkConstants.OPERATOR_EQUAL
- FdkConstants.OPERATOR_GREATER_THAN
- FdkConstants.OPERATOR_GREATER_THAN_EQUAL
- FdkConstants.OPERATOR_LESS_THAN
- FdkConstants.OPERATOR_LESS_THAN_EQUAL
- FdkConstants.OPERATOR_NOT_EQUAL
- FdkConstants.OPERATOR_IS_NULL
- FdkConstants.OPERATOR_IS_NOT_NULL
- FdkConstants.OPERATOR_CONTAINS
- FdkConstants.OPERATOR_HAS_CATEGORY

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:

- Attributes.CREATE_DATE (data type is Date)
- Attributes.DESCRIPTION (data type is String)
- Attributes.LAST_MODIFIED_DATE (data type is Date)
- Attributes.MIME_TYPE (data type is String)
- Attributes.NAME (data type is String)
- Attributes.SIZE (data type is Long, only applies to Documents)
- Attributes.CREATED_BY:Attributes.ID (data type is Long)
- Attributes.CREATED_BY:Attributes.NAME (data type is String)
- Attributes.LAST_MODIFIED_BY:Attributes.ID (data type is Long)
- Attributes.LAST_MODIFIED_BY:Attributes.NAME (data type is String)
- Attributes.LIFECYCLE_POLICY (data type is Long)
- Attributes.LIFECYCLE_POLICY:Attributes.NAME (data type is String
- Attributes.RETENTION_POLICY (data type is Long)
- Attributes.RETENTION_POLICY:Attributes.NAME (data type is String)
- Attributes.LOCK_EXCEPTED_USER:Attributes.ID (data type is Long)
- Attributes.LOCK_EXCEPTED_USER:Attributes.NAME (data type is String)
- Attributes.LOCK_TYPE (data type is Integer)

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.

See Also:
  Serialized Form

Constructor Summary
`SearchExpression()` Constructor

Method Summary
`java.lang.Object` | `getLeftOperand()` Get the left operand.
`java.lang.String` | `getOperator()` Get the operator value.
`java.lang.Object` | `getRightOperand()` Get the right operand.
`void` | `setLeftOperand(java.lang.Object left)` Set the left operand.
`void` | `setOperator(java.lang.String operator)` Set the operator value.
`void` | `setRightOperand(java.lang.Object right)` Set the right operand.
`java.lang.String` | `toString()` Convert the search expression to a string representation.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### SearchExpression

    public SearchExpression()

  Constructor

Method Detail

### getOperator

    public java.lang.String getOperator()

  Description copied from class: `SearchExpression`
  Get the operator value.

### setOperator

    public void setOperator(java.lang.String operator)

  Description copied from class: `SearchExpression`
  Set the operator value.

### getLeftOperand

    public java.lang.Object getLeftOperand()

  Description copied from class: `SearchExpression`
  Get the left operand.

### setLeftOperand

    public void setLeftOperand(java.lang.Object left)

  Description copied from class: `SearchExpression`
  Set the left operand.

### getRightOperand

    public java.lang.Object getRightOperand()

  Description copied from class: `SearchExpression`
  Get the right operand.

### setRightOperand

    public void setRightOperand(java.lang.Object right)

  Description copied from class: `SearchExpression`
  Set the right operand.

### toString

    public java.lang.String toString()

  Description copied from class: `SearchExpression`
  Convert the search expression to a string representation.

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD