Class TaskSearchQueryTerm
java.lang.Object
com.webmethods.portal.service.task.TaskSearchQueryTerm
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
TaskSearchQueryTerm
TaskSearchQueryTerm represents task search Query term implementation.
The search term can be task fields or field bindings.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructorCopy constructorTaskSearchQueryTerm
(String[] fields, String operator) Construct a new task search term using given fields and operator.TaskSearchQueryTerm
(String[] fields, String operator, Object value) Construct a new task search term using given fields, operator and value.TaskSearchQueryTerm
(String[] fields, String operator, Object value, boolean caseInsensitive) Construct a new task search term using given fields, operator, value and the flag indicates whether search should be case insensitive.TaskSearchQueryTerm
(String field, String operator) Construct a new task search term using given field and operator.TaskSearchQueryTerm
(String field, String operator, Object value) Construct a new task search term using given field, operator, and value. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Deprecated.usegetFieldExpressions()
insteadReturns first element of field bindings or null if there is no field bindings defined.Return field value bindings as they were set or create a them from thefields
array.getFieldExpressionsString
(Map contextMap, com.webmethods.caf.rules.IBindingExpressionEvaluator resolver) String[]
Return search fields.boolean
Returns flag which indicates if the search term matches the taskReturns search operatorReturns the DB table name for the search term.getValue()
Returns search value for this termboolean
Returns flag if search term should implement case-insensitive search when comparing string.boolean
boolean
boolean
boolean
matches
(FacesContext facesContext) Check whether the search term match the information defined in faces context.protected void
reset()
Resets searach term statevoid
setCaseInsensitive
(boolean insensitive) Sets flag if search term should implement case-insensitive searchvoid
setFieldBinding
(ValueBinding fieldBinding) Deprecated.usesetFieldExpression(ValueExpression)
insteadvoid
setFieldBindings
(ValueBinding[] fieldBindings) Deprecated.usesetFieldExpressions(ValueExpression[])
insteadvoid
setFieldExpression
(ValueExpression fieldBinding) Set field bindings to search.void
setFieldExpressions
(ValueExpression[] fieldBindings) Set field bindings to search on.void
Set fields to search.void
setMatched
(boolean matched) Set the flag indicates whether the search term matches the taskvoid
setOperator
(String operator) Sets search operator.void
setTableName
(String tableName) Sets a concrete DB table name for the search term.void
Set search value for the term.toString()
void
validate()
Validates current search query term.
-
Field Details
-
FIELD_DELIMITERS
- See Also:
-
TASK_TYPE_INDEX_FIELD_DELIMITERS
- See Also:
-
m_fields
-
m_operator
-
m_value
-
m_caseInsensitive
protected boolean m_caseInsensitive -
m_matched
protected transient boolean m_matched -
m_valuePattern
-
fieldBindings
-
m_tableName
-
-
Constructor Details
-
TaskSearchQueryTerm
public TaskSearchQueryTerm()Default constructor -
TaskSearchQueryTerm
Copy constructor- Parameters:
term
- search term to copy from
-
TaskSearchQueryTerm
Construct a new task search term using given field and operator. Set the value as null and the search should be case insensitive.- Parameters:
field
- name of the search fieldoperator
- search operator
-
TaskSearchQueryTerm
Construct a new task search term using given fields and operator. Set the value as null and the search should be case insensitive.- Parameters:
fields
- names of the search fieldsoperator
- search operator
-
TaskSearchQueryTerm
Construct a new task search term using given field, operator, and value.- Parameters:
fields
- name of the search fieldoperator
- search operatorvalue
- search value
-
TaskSearchQueryTerm
Construct a new task search term using given fields, operator and value.- Parameters:
fields
- names of the search fieldsoperator
- search operatorvalue
- search value
-
TaskSearchQueryTerm
Construct a new task search term using given fields, operator, value and the flag indicates whether search should be case insensitive.- Parameters:
fields
- names of the search fieldsoperator
- search operatorvalue
- search valuecaseInsensitive
- whether to use case-insensitive search for string comparisons
-
-
Method Details
-
getFields
Return search fields. Construct fields based on field bindings if the fields are not defined.- Returns:
- the fields could be null if neither fields nor field binding expression are defined.
-
setFields
Set fields to search. Setting fields will override any previously set value in {@link #setFieldBindings(ValueBinding[])(String[])}- Parameters:
fields
- the fields to set
-
getFieldBinding
Deprecated.usegetFieldExpression()
insteadReturns first element of field bindings or null if there is no field bindings defined. -
getFieldExpression
Returns first element of field bindings or null if there is no field bindings defined. -
setFieldBinding
Deprecated.usesetFieldExpression(ValueExpression)
insteadSet field bindings to search. Setting field bindings will override any previously set value insetFields(String[])
- Parameters:
field
- the field to set
-
setFieldExpression
Set field bindings to search. Setting field bindings will override any previously set value insetFields(String[])
- Parameters:
field
- the field to set
-
getFieldBindings
Deprecated.usegetFieldExpressions()
insteadReturn field value bindings as they were set or create a them from thefields
array. Construct the field bindings based on fields information if field bindings is null.- Returns:
- array of value bindings for fields
-
getFieldExpressions
Return field value bindings as they were set or create a them from thefields
array. Construct the field bindings based on fields information if field bindings is null.- Returns:
- array of value bindings for fields
-
getFieldExpressionsString
-
setFieldBindings
Deprecated.usesetFieldExpressions(ValueExpression[])
insteadSet field bindings to search on. Setting field bindings will override any previously set value insetFields(String[])
- Parameters:
field
- the field to set
-
setFieldExpressions
Set field bindings to search on. Setting field bindings will override any previously set value insetFields(String[])
- Parameters:
field
- the field to set
-
getOperator
Returns search operator -
setOperator
Sets search operator. -
getValue
Returns search value for this term -
isCaseInsensitive
public boolean isCaseInsensitive()Returns flag if search term should implement case-insensitive search when comparing string. This is valid only for non-indexed search. For indexed searches strings comparison is done in the database according to database rules (typically case-sensitive) -
setCaseInsensitive
public void setCaseInsensitive(boolean insensitive) Sets flag if search term should implement case-insensitive search- Parameters:
insensitive
-
-
setValue
Set search value for the term. The value to be set depends on the type of field used and an operator It can be either java primitive object, or it can be an array of objects for "in" and "between" operators- Parameters:
value
- the value to set
-
setTableName
Sets a concrete DB table name for the search term.- Parameters:
tableName
-
-
getTableName
Returns the DB table name for the search term. -
setMatched
public void setMatched(boolean matched) Set the flag indicates whether the search term matches the task- Parameters:
matched
-
-
getMatchedValue
public boolean getMatchedValue()Returns flag which indicates if the search term matches the task -
matches
Check whether the search term match the information defined in faces context. This method can be overridden to implement a fully custom searching.- Returns:
- true if current search term matches the task set on the facesContext. The task can be retrieved from facesContext via #{currentTask} binding expression
- Throws:
Exception
-
matches
public boolean matches(Map contextMap, com.webmethods.caf.rules.IBindingExpressionEvaluator resolver) throws Exception - Throws:
Exception
-
validate
Validates current search query term.- Throws:
Exception
-
reset
protected void reset()Resets searach term state -
isUnaryOperator
public boolean isUnaryOperator() -
isValueEmpty
public boolean isValueEmpty() -
toString
-
getFieldExpression()
instead