Package com.documentum.fc.client.search
Class DfExpressionFactory
java.lang.Object
com.documentum.fc.client.search.DfExpressionFactory
Factory to create search expressions
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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.
-
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 inIDfValue
, such asDF_STRING
).searchOp
- The search operation code (constants defined inIDfAttrExpression
andIDfSimpleAttrExpression
, such asSEARCH_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; ornull
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:
-
newRelativeDateExpression
public static IDfRelativeDateExpression newRelativeDateExpression(String attrName, int searchOpCode, boolean isRepeated, int relativeTime, int timeUnit) Creates a relative date expression. For example, ifsearchOpCode=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 inIDfAttrExpression
andIDfSimpleAttrExpression
, such asSEARCH_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:
-
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 inIDfValue
, for example,DF_STRING
).searchOp
- The search operation code (constants defined inIDfAttrExpression
andIDfSimpleAttrExpression
, 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:
-
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 theIDfValueListAttrExpression
returned.- Parameters:
attrName
- The attribute name.valueDataType
- The data type of the value (constants defined inIDfValue
, for example,DF_STRING
).searchOp
- The search operation code (constants defined inIDfAttrExpression
andIDfSimpleAttrExpression
, 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:
-
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 inIDfValue
, for example,DF_STRING
).searchOp
- The search operation code (constants defined inIDfAttrExpression
andIDfSimpleAttrExpression
, 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
ofString
). The non-string values are skipped.- Returns:
- The new search expression created.
- See Also:
-
newFullTextExpression
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
Creates an expression set.- Parameters:
logicalOperator
- The logical operator applied to the set (AND
orOR
).- Returns:
- The new expression set created.
-