Package com.documentum.fc.client.search

# Interface IDfRelativeDateExpression

All Superinterfaces:
  `IDfAttrExpression`, `IDfExpression`, `IDfSimpleAttrExpression`

public interface IDfRelativeDateExpression extends IDfSimpleAttrExpression
Defines an expression on a date that is relative to the actual date when the query is executed. For example, a date greater than (<actual date> - 3 months).
The inherited method `getValue()` returns a dynamic date that is relative to the actual date when the query is executed.

See Also:
  - `IDfQueryBuilder.getRootExpressionSet()`
  - `IDfExpressionSet.addRelativeDateExpression(String, int, boolean, int, int)`

- ## Field Summary

  ### Fields inherited from interface com.documentum.fc.client.search.IDfAttrExpression

  `SEARCH_OP_UNDEFINED`

  ### Fields inherited from interface com.documentum.fc.client.search.IDfExpression

  `DATE_FORMAT_DEFAULT, EXPR_TYPE_FULLTEXT, EXPR_TYPE_MLT, EXPR_TYPE_RELATIVE_DATE, EXPR_TYPE_SET, EXPR_TYPE_SIMPLE_ATTR, EXPR_TYPE_UNDEFINED, EXPR_TYPE_VALUE_LIST_ATTR, EXPR_TYPE_VALUE_RANGE_ATTR`

  ### Fields inherited from interface com.documentum.fc.client.search.IDfSimpleAttrExpression

  `SEARCH_OP_BEGINS_WITH, SEARCH_OP_CONTAINS, SEARCH_OP_DOES_NOT_CONTAIN, SEARCH_OP_ENDS_WITH, SEARCH_OP_EQUAL, SEARCH_OP_GREATER_EQUAL, SEARCH_OP_GREATER_THAN, SEARCH_OP_IS_NOT_NULL, SEARCH_OP_IS_NULL, SEARCH_OP_LESS_EQUAL, SEARCH_OP_LESS_THAN, SEARCH_OP_NOT_EQUAL`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getRelativeTime()`
  Gets the number of time units for the relative date expression.
  These time units are added to the current date to compute the real expression date.
  `int`
  `getTimeUnit()`
  Gets the time unit for the 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.

  ### Methods inherited from interface com.documentum.fc.client.search.IDfAttrExpression

  `getAttrName, getSearchOperation, getSearchOperationCode, getValueDataType, isCaseSensitive, isRepeated`

  ### Methods inherited from interface com.documentum.fc.client.search.IDfExpression

  `acceptVisitor, getDateFormat, getExpressionType, setDateFormat`

  ### Methods inherited from interface com.documentum.fc.client.search.IDfSimpleAttrExpression

  `getFuzzySearchSimilarity, getThesaurusLibrary, getValue, isExactMatchEnabled, isFuzzySearchEnabled, isThesaurusSearchEnabled, setExactMatchEnabled, setFuzzySearchEnabled, setFuzzySearchSimilarity, setThesaurusLibrary, setThesaurusSearchEnabled`

- ## Method Details

  - ### getRelativeTime

    int getRelativeTime()
    Gets the number of time units for the relative date expression.
    These time units are added to the current date to compute the real expression date. For example, if `search operator=GREATER_THAN`, `relative time=-3`, `time unit=MONTH`, then the expression defines a constraint on a date that must be greater than the current date minus 3 months. In this example, this method would return the value -3.
    Returns:
      The number of time units for the relative date expression.

  - ### getTimeUnit

    int getTimeUnit()
    Gets the time unit for the 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. In this example, this method would return the value MONTH.
    Returns:
      The time unit for the relative date expression.