Package com.documentum.fc.client.search

# Class DfExpressionFactory

java.lang.Object
com.documentum.fc.client.search.DfExpressionFactory

public class DfExpressionFactory extends Object
Factory to create search expressions

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DfExpressionFactory()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static IDfExpressionSet`
  `newExpressionSet(int logicalOperator)`
  Creates an expression set.
  `static IDfFullTextExpression`
  `newFullTextExpression(String value)`
  Creates a full-text search expression.
  `static IDfRelativeDateExpression`
  `newRelativeDateExpression(String attrName, int searchOpCode, boolean isRepeated, int relativeTime, int timeUnit)`
  Creates a relative date expression.
  `static IDfSimpleAttrExpression`
  `newSimpleAttrExpression(String attrName, int valueDataType, int searchOp, boolean isCaseSensitive, boolean isRepeated, String value)`
  Creates a simple attribute value expression.
  `static IDfValueListAttrExpression`
  `newValueListAttrExpression(String attrName, int valueDataType, int searchOp, boolean isCaseSensitive, boolean isRepeated)`
  Creates a search expression that requires the attribute value to be included in a list of values.
  `static IDfValueListAttrExpression`
  `newValueListAttrExpression(String attrName, int valueDataType, int searchOp, boolean isCaseSensitive, boolean isRepeated, IDfList valueList)`
  Creates a search expression that requires the attribute value to be included in a list of values.
  `static IDfValueRangeAttrExpression`
  `newValueRangeAttrExpression(String attrName, int valueDataType, int searchOp, boolean isCaseSensitive, boolean isRepeated, String fromValue, String toValue)`
  Creates a search expression that requires the attribute value to be within a range.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### DfExpressionFactory

    public DfExpressionFactory()

- ## Method Details

  - ### newSimpleAttrExpression

    public static IDfSimpleAttrExpression newSimpleAttrExpression(String attrName, int valueDataType, int searchOp, boolean isCaseSensitive, boolean isRepeated, String value)
    Creates a simple attribute value expression.
    Parameters:
      `attrName` - The attribute name.
      `valueDataType` - The data type of the value (constants defined in `IDfValue`, such as `DF_STRING`).
      `searchOp` - The search operation code (constants defined in `IDfAttrExpression` and `IDfSimpleAttrExpression`, such as `SEARCH_OP_CONTAINS`).
      `isCaseSensitive` - `true` if the search operation is case sensitive; `false` otherwise.
      `isRepeated` - `true` if the attribute is repeated; `false` otherwise.
      `value` - The expected value of the search operation; or `null` if there is no value (for example: for IS_NULL or IS_NOT_NULL operator).
    Returns:
      The new simple attribute value expression created.
    See Also:
      - `IDfValue.DF_STRING`
      - `IDfSimpleAttrExpression.SEARCH_OP_CONTAINS`

  - ### newRelativeDateExpression

    public static IDfRelativeDateExpression newRelativeDateExpression(String attrName, int searchOpCode, boolean isRepeated, int relativeTime, int timeUnit)
    Creates a relative date expression. For example, if `searchOpCode=GREATER_THAN`, `relativeTime=-3`, `timeUnit=MONTH`, then the expression defines a constraint on a date that must be greater than the current date minus 3 months.
    Parameters:
      `attrName` - The attribute name.
      `searchOpCode` - The search operation code (constants defined in `IDfAttrExpression` and `IDfSimpleAttrExpression`, such as `SEARCH_OP_CONTAINS`).
      `isRepeated` - `true` if the attribute is repeated; `false` otherwise.
      `relativeTime` - The relative time to add to the actual date of the query execution.
      `timeUnit` - The time unit (`Calendar.MINUTE, Calendar.DAY_OF_MONTH, Calendar.MONTH, Calendar.YEAR`).
    Returns:
      The new relative date expression created.
    See Also:
      - `IDfSimpleAttrExpression.SEARCH_OP_GREATER_EQUAL`

  - ### newValueRangeAttrExpression

    public static IDfValueRangeAttrExpression newValueRangeAttrExpression(String attrName, int valueDataType, int searchOp, boolean isCaseSensitive, boolean isRepeated, String fromValue, String toValue)
    Creates a search expression that requires the attribute value to be within a range.
    Parameters:
      `attrName` - The attribute name.
      `valueDataType` - The data type of the value (constants defined in `IDfValue`, for example, `DF_STRING`).
      `searchOp` - The search operation code (constants defined in `IDfAttrExpression` and `IDfSimpleAttrExpression`, for example, `SEARCH_OP_CONTAINS`).
      `isCaseSensitive` - `true` if the search operation is case sensitive; `false` otherwise.
      `isRepeated` - `true` if the attribute is repeated; `false` otherwise.
      `fromValue` - The minimum value of the range (included).
      `toValue` - The maximum value of the range (included).
    Returns:
      The new search expression created.
    See Also:
      - `IDfValue.DF_STRING`
      - `IDfSimpleAttrExpression.SEARCH_OP_CONTAINS`

  - ### newValueListAttrExpression

    public static IDfValueListAttrExpression newValueListAttrExpression(String attrName, int valueDataType, int searchOp, boolean isCaseSensitive, boolean isRepeated)
    Creates a search expression that requires the attribute value to be included in a list of values. The list of values is initially empty. New values can be added directly on the `IDfValueListAttrExpression` returned.
    Parameters:
      `attrName` - The attribute name.
      `valueDataType` - The data type of the value (constants defined in `IDfValue`, for example, `DF_STRING`).
      `searchOp` - The search operation code (constants defined in `IDfAttrExpression` and `IDfSimpleAttrExpression`, for example, `SEARCH_OP_CONTAINS`).
      `isCaseSensitive` - `true` if the search operation is case sensitive; `false` otherwise.
      `isRepeated` - `true` if the attribute is repeated; `false` otherwise.
    Returns:
      The new search expression created.
    See Also:
      - `IDfValue.DF_STRING`
      - `IDfSimpleAttrExpression.SEARCH_OP_CONTAINS`

  - ### newValueListAttrExpression

    public static IDfValueListAttrExpression newValueListAttrExpression(String attrName, int valueDataType, int searchOp, boolean isCaseSensitive, boolean isRepeated, IDfList valueList)
    Creates a search expression that requires the attribute value to be included in a list of values.
    Parameters:
      `attrName` - The attribute name.
      `valueDataType` - The data type of the value (constants defined in `IDfValue`, for example, `DF_STRING`).
      `searchOp` - The search operation code (constants defined in `IDfAttrExpression` and `IDfSimpleAttrExpression`, for example, `SEARCH_OP_CONTAINS`).
      `isCaseSensitive` - `true` if the search operation is case sensitive; `false` otherwise.
      `isRepeated` - `true` if the attribute is repeated; `false` otherwise.
      `valueList` - The list of values (`IDfList` of `String`). The non-string values are skipped.
    Returns:
      The new search expression created.
    See Also:
      - `IDfValue.DF_STRING`
      - `IDfSimpleAttrExpression.SEARCH_OP_CONTAINS`

  - ### newFullTextExpression

    public static IDfFullTextExpression newFullTextExpression(String value)
    Creates a full-text search expression.
    Parameters:
      `value` - The string to look for in full text.
    Returns:
      The new full-text search expression created.

  - ### newExpressionSet

    public static IDfExpressionSet newExpressionSet(int logicalOperator)
    Creates an expression set.
    Parameters:
      `logicalOperator` - The logical operator applied to the set (`AND` or `OR`).
    Returns:
      The new expression set created.