FilterCondition
A builder that can define a filter condition.
Methods
contentType
contentType(
pContentType):FilterCondition
Sets the content type that specifies the type of the content of an entity field. The following ContentTypes are available:
-
CONTENT_TYPE_LONG_TEXT
-
CONTENT_TYPE_TEXT
-
CONTENT_TYPE_HTML
-
CONTENT_TYPE_NUMBER
-
CONTENT_TYPE_TELEPHONE
-
CONTENT_TYPE_EMAIL
-
CONTENT_TYPE_LINK
-
CONTENT_TYPE_PASSWORD
-
CONTENT_TYPE_DATE
-
CONTENT_TYPE_BOOLEAN
Parameters
string | number | booleanReturns
FilterConditionExample
var filterConfig = neonFilter.createFilterCondition();
filterGroupConfig.contentType(neonFilter.CONTENT_TYPE_TEXT);
field
field(
pFieldName):FilterCondition
Sets the entityfield name.
Parameters
string | number | booleanentityfield name
Returns
FilterConditionFilterCondition
getContentType
getContentType():
string
Returns the content type that specifies the type of the content of an entity field. Uses the constants that start with CONTENT_TYPE_ of the package neonFilter.
Returns
stringthe content type
getField
getField():
string
Returns the entityfield name.
Returns
stringthe entityfield name
getKey
getKey():
string
Returns the key of the filter condition.
Returns
stringthe key
getSearchOperator
getSearchOperator():
string
Returns the search operator that specifies how to apply the filter properties to the field. Uses the constants that start with SEARCH_OPERATOR_ of the package neonFilter.
Returns
stringthe search operator
getValue
getValue():
string
Returns the value of the filter condition.
Returns
stringthe value
isUseMultiString
isUseMultiString():
boolean
Indicates if a search for a MultiString is to be performed.
Returns
booleantrue if MultiString is used
key
key(
pKey):FilterCondition
Sets the key of the filter condition.
Parameters
string | number | booleankey
Returns
FilterConditionFilterCondition
searchOperator
searchOperator(
pSearchOperator):FilterCondition
Sets the search operator that specifies how to apply the filter properties to the field. The available search operators depend on the content type of the field.
CONTENT_TYPE_DATE: {SEARCH_OPERATOR_TIMEFRAME_EQUAL, SEARCH_OPERATOR_TIMEFRAME_PAST, SEARCH_OPERATOR_TIMEFRAME_COMING, SEARCH_OPERATOR_EQUAL, SEARCH_OPERATOR_NOT_EQUAL, SEARCH_OPERATOR_LESS, SEARCH_OPERATOR_LESS_OR_EQUAL, SEARCH_OPERATOR_GREATER, SEARCH_OPERATOR_GREATER_OR_EQUAL, SEARCH_OPERATOR_ISNULL, SEARCH_OPERATOR_ISNOTNULL}
CONTENT_TYPE_NUMBER and aggregate field: {SEARCH_OPERATOR_EQUAL, SEARCH_OPERATOR_NOT_EQUAL, SEARCH_OPERATOR_LESS, SEARCH_OPERATOR_LESS_OR_EQUAL, SEARCH_OPERATOR_GREATER, SEARCH_OPERATOR_GREATER_OR_EQUAL}
CONTENT_TYPE_NUMBER and no aggregate field: {SEARCH_OPERATOR_EQUAL, SEARCH_OPERATOR_NOT_EQUAL, SEARCH_OPERATOR_LESS, SEARCH_OPERATOR_LESS_OR_EQUAL, SEARCH_OPERATOR_GREATER, SEARCH_OPERATOR_GREATER_OR_EQUAL, SEARCH_OPERATOR_ISNULL, SEARCH_OPERATOR_ISNOTNULL}
CONTENT_TYPE_BOOLEAN: {SEARCH_OPERATOR_EQUAL, SEARCH_OPERATOR_NOT_EQUAL, SEARCH_OPERATOR_ISNULL, SEARCH_OPERATOR_ISNOTNULL}
If the selection mode defined as multi: {SEARCH_OPERATOR_CONTAINS, SEARCH_OPERATOR_CONTAINSNOT, SEARCH_OPERATOR_ISNULL, SEARCH_OPERATOR_ISNOTNULL}
All content types where the input of text is possible: {SEARCH_OPERATOR_CONTAINS, SEARCH_OPERATOR_CONTAINSNOT, SEARCH_OPERATOR_STARTSWITH, SEARCH_OPERATOR_ENDSWITH, SEARCH_OPERATOR_EQUAL, SEARCH_OPERATOR_NOT_EQUAL, SEARCH_OPERATOR_ISNULL, SEARCH_OPERATOR_ISNOTNULL}
Rest of the content types: {SEARCH_OPERATOR_EQUAL, SEARCH_OPERATOR_NOT_EQUAL, SEARCH_OPERATOR_ISNULL, SEARCH_OPERATOR_ISNOTNULL}
Parameters
string | number | booleanReturns
FilterConditionExample
var filterConfig = neonFilter.createFilterCondition();
filterGroupConfig.searchOperator(neonFilter.SEARCH_OPERATOR_EQUAL);
toJson
toJson():
string
Converts the filter in a json format.
Returns
stringthe filter as json
useMultiString
useMultiString(
pUseMultiString):FilterCondition
Specifies to search for a MultiString.
Parameters
booleanuseMultiString
Returns
FilterConditionFilterCondition
value
value(
pValue):FilterCondition
Sets the value of the filter condition.
Parameters
string | number | booleanvalue
Returns
FilterConditionFilterCondition