Package de.hybris.platform.core
Class Operator
java.lang.Object
de.hybris.platform.core.FlexibleSearchTranslatable
de.hybris.platform.core.Operator
- All Implemented Interfaces:
Serializable
Class represents an Operator; is used with all types of
GenericConditions.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Operatorcode: 17
symbol:AND
codestring:andstatic final Operatorcode: 6
symbol:LIKE
codestring:containsstatic final OperatorThe DEFAULT Operator is Operator.EQUALstatic final Operatorcode: 5
symbol:LIKE
codestring:ends withstatic final Operatorcode: 1
symbol:=
codestring:equalstatic final Operatorcode: 15
symbol:EXISTS
codestring:existsstatic final Operatorcode: 7
symbol:>
codestring:>static final Operatorcode: 9
symbol:>=
codestring:>=static final Operatorcode: 13
symbol:IN
codestring:instatic final Operatorcode: 11
symbol:IS NOT NULL
codestring:is not nullstatic final Operatorcode: 12
symbol:IS NULL
codestring:is nullstatic final Operatorcode: 8
symbol:<
codestring:<static final Operatorcode: 10
symbol:<=
codestring:<=static final Operatorcode: 3
symbol:LIKE
codestring:likestatic final Operatorcode: 16
symbol:NOT_EXISTS
codestring:not existsstatic final Operatorcode: 14
symbol:NOT IN
codestring:not instatic final Operatorcode: 19
symbol:NOT_LIKE
codestring:not likestatic final Operatorcode: 18
symbol:OR
codestring:orstatic final Operatorcode: 4
symbol:LIKE
codestring:starts withstatic final Operatorcode: 2
symbol:<>
codestring:<> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanintgetCode()static OperatorgetOperatorByCode(int code) static OperatorgetOperatorByStringCode(String str_code) inthashCode()booleanbooleanisUnary()voidtoFlexibleSearch(StringBuilder queryBuffer, Map<String, String> typeIndexMap, Map<String, Object> valueMap) toFlexibleSearchtoString()Methods inherited from class de.hybris.platform.core.FlexibleSearchTranslatable
getAliasFromTypeMap, toPolyglotSearch
-
Field Details
-
EQUAL
code: 1
symbol:=
codestring:equal -
UNEQUAL
code: 2
symbol:<>
codestring:<> -
LIKE
code: 3
symbol:LIKE
codestring:like -
STARTS_WITH
code: 4
symbol:LIKE
codestring:starts with -
ENDS_WITH
code: 5
symbol:LIKE
codestring:ends with -
CONTAINS
code: 6
symbol:LIKE
codestring:contains -
GREATER
code: 7
symbol:>
codestring:> -
LESS
code: 8
symbol:<
codestring:< -
GREATER_OR_EQUAL
code: 9
symbol:>=
codestring:>= -
LESS_OR_EQUAL
code: 10
symbol:<=
codestring:<= -
IS_NOT_NULL
code: 11
symbol:IS NOT NULL
codestring:is not null -
IS_NULL
code: 12
symbol:IS NULL
codestring:is null -
IN
code: 13
symbol:IN
codestring:in -
NOT_IN
code: 14
symbol:NOT IN
codestring:not in -
EXISTS
code: 15
symbol:EXISTS
codestring:exists -
NOT_EXISTS
code: 16
symbol:NOT_EXISTS
codestring:not exists -
AND
code: 17
symbol:AND
codestring:and -
OR
code: 18
symbol:OR
codestring:or -
NOT_LIKE
code: 19
symbol:NOT_LIKE
codestring:not like -
DEFAULT
The DEFAULT Operator is Operator.EQUAL
-
-
Constructor Details
-
Operator
Constructor. Creates a new Operator with the code, the sql string (like 'IS NULL')- Parameters:
code- code of the Operator, int value between 1 and 18sql_str- the sql equivalent of this operator, like 'NOT IN' or 'AND'code_str- the code string
-
-
Method Details
-
getCode
public int getCode()- Returns:
- the code.
-
getStringCode
- Returns:
- the string code, like '=' or 'not exists'
-
getSQLString
- Returns:
- the SQL query like 'NOT' or 'NOT_EXISTS'
-
toFlexibleSearch
public void toFlexibleSearch(StringBuilder queryBuffer, Map<String, String> typeIndexMap, Map<String, Object> valueMap) toFlexibleSearch- Specified by:
toFlexibleSearchin classFlexibleSearchTranslatable- Parameters:
typeIndexMap- not used here!valueMap- not used here!queryBuffer- The Content ofgetSQLString()is appended with a leading and ending " " to the QueryBuffer- See Also:
-
getOperatorByStringCode
- Parameters:
str_code- the string code- Returns:
- a new Instance of the Operator which match the given string code. Please have a look at the constants of this class.
-
getOperatorByCode
- Parameters:
code- the code of the Operator (at the moment: 1 - 18). Please have a look at the constants of this class.- Returns:
- new Instance of the Operator which match the given code (int value from 1 to 18)
-
toString
-
equals
-
hashCode
public int hashCode() -
allowsCollection
public boolean allowsCollection() -
isUnary
public boolean isUnary() -
isTranslatableToPolyglotDialect
public boolean isTranslatableToPolyglotDialect()
-