Enum Condition
- java.lang.Object
-
- java.lang.Enum<Condition>
-
- com.epam.ta.reportportal.commons.querygen.Condition
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ANYOverlap condition between two arraysBETWEENBetween condition.CONTAINSContains operation.EQUALSEQUALS conditionEQUALS_ANYIN condition.EXISTSExists conditionGREATER_THANGreater than conditionGREATER_THAN_OR_EQUALSGreater than or Equals conditionHASHAS condition.ININ condition.LEVELLOWER_THANLower than conditionLOWER_THAN_OR_EQUALSLower than or Equals conditionNOT_EQUALSNot equals conditionUNDER
-
Field Summary
Fields Modifier and Type Field Description static java.lang.IntegerBETWEEN_FILTER_VALUES_COUNTstatic java.lang.StringCNTstatic java.lang.StringEQstatic java.lang.IntegerFIRST_TIMESTAMP_INDEXstatic java.lang.StringNEGATIVE_MARKERstatic java.lang.StringTIMESTAMP_SEPARATORstatic java.lang.StringVALUES_SEPARATORstatic java.lang.IntegerZERO_TIMESTAMP_INDEXstatic java.lang.IntegerZONE_OFFSET_INDEX
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.Object[]castArray(CriteriaHolder criteriaHolder, java.lang.String value, com.epam.ta.reportportal.ws.model.ErrorType errorType)Cast values for filters which have many values(filters with conditions:btw, in, etc)abstract java.lang.ObjectcastValue(CriteriaHolder criteriaHolder, java.lang.String values, com.epam.ta.reportportal.ws.model.ErrorType errorType)Cast filter values according condition.static java.util.Optional<Condition>findByMarker(java.lang.String marker)Finds condition by marker.java.lang.StringgetMarker()static booleanisNegative(java.lang.String marker)Check whether condition is negativestatic java.lang.StringmakeNegative(boolean negative, java.lang.String marker)Makes filter marker negativeabstract org.jooq.ConditiontoCondition(FilterCondition filter, CriteriaHolder criteriaHolder)abstract voidvalidate(CriteriaHolder criteriaHolder, java.lang.String value, boolean isNegative, com.epam.ta.reportportal.ws.model.ErrorType errorType)Validate condition value.static ConditionvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static Condition[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
EQUALS
public static final Condition EQUALS
EQUALS condition
-
NOT_EQUALS
public static final Condition NOT_EQUALS
Not equals condition
-
CONTAINS
public static final Condition CONTAINS
Contains operation. Case insensitive
-
UNDER
public static final Condition UNDER
-
LEVEL
public static final Condition LEVEL
-
EXISTS
public static final Condition EXISTS
Exists condition
-
IN
public static final Condition IN
IN condition. Accepts filter value as comma-separated list
-
EQUALS_ANY
public static final Condition EQUALS_ANY
IN condition. Accepts filter value as comma-separated list
-
HAS
public static final Condition HAS
HAS condition. Accepts filter value as comma-separated list. Returns 'TRUE' of all provided values exist in collection
Applicable only for collections
-
ANY
public static final Condition ANY
Overlap condition between two arrays
-
GREATER_THAN
public static final Condition GREATER_THAN
Greater than condition
-
GREATER_THAN_OR_EQUALS
public static final Condition GREATER_THAN_OR_EQUALS
Greater than or Equals condition
-
LOWER_THAN
public static final Condition LOWER_THAN
Lower than condition
-
LOWER_THAN_OR_EQUALS
public static final Condition LOWER_THAN_OR_EQUALS
Lower than or Equals condition
-
BETWEEN
public static final Condition BETWEEN
Between condition. Include boundaries
-
-
Field Detail
-
EQ
public static final java.lang.String EQ
- See Also:
- Constant Field Values
-
CNT
public static final java.lang.String CNT
- See Also:
- Constant Field Values
-
VALUES_SEPARATOR
public static final java.lang.String VALUES_SEPARATOR
- See Also:
- Constant Field Values
-
TIMESTAMP_SEPARATOR
public static final java.lang.String TIMESTAMP_SEPARATOR
- See Also:
- Constant Field Values
-
NEGATIVE_MARKER
public static final java.lang.String NEGATIVE_MARKER
- See Also:
- Constant Field Values
-
BETWEEN_FILTER_VALUES_COUNT
public static final java.lang.Integer BETWEEN_FILTER_VALUES_COUNT
-
ZERO_TIMESTAMP_INDEX
public static final java.lang.Integer ZERO_TIMESTAMP_INDEX
-
FIRST_TIMESTAMP_INDEX
public static final java.lang.Integer FIRST_TIMESTAMP_INDEX
-
ZONE_OFFSET_INDEX
public static final java.lang.Integer ZONE_OFFSET_INDEX
-
-
Method Detail
-
values
public static Condition[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Condition c : Condition.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Condition valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
toCondition
public abstract org.jooq.Condition toCondition(FilterCondition filter, CriteriaHolder criteriaHolder)
-
validate
public abstract void validate(CriteriaHolder criteriaHolder, java.lang.String value, boolean isNegative, com.epam.ta.reportportal.ws.model.ErrorType errorType)
Validate condition value. This method should be overridden in all conditions which contains validations- Parameters:
criteriaHolder- Criteria descriptionvalue- Value to be castedisNegative- Whether filter is negative
-
castValue
public abstract java.lang.Object castValue(CriteriaHolder criteriaHolder, java.lang.String values, com.epam.ta.reportportal.ws.model.ErrorType errorType)
Cast filter values according condition.- Parameters:
criteriaHolder- Criteria descriptionvalues- Value to be casted- Returns:
- Casted value
-
getMarker
public java.lang.String getMarker()
-
findByMarker
public static java.util.Optional<Condition> findByMarker(java.lang.String marker)
Finds condition by marker. If there is no condition with specified marker returns NULL- Parameters:
marker- Marker to be checked- Returns:
- Condition if found or NULL
-
isNegative
public static boolean isNegative(java.lang.String marker)
Check whether condition is negative- Parameters:
marker- Marker to check- Returns:
- TRUE of negative
-
makeNegative
public static java.lang.String makeNegative(boolean negative, java.lang.String marker)Makes filter marker negative- Parameters:
negative- Whether condition is negativemarker- Marker to check- Returns:
- TRUE of negative
-
castArray
public java.lang.Object[] castArray(CriteriaHolder criteriaHolder, java.lang.String value, com.epam.ta.reportportal.ws.model.ErrorType errorType)
Cast values for filters which have many values(filters with conditions:btw, in, etc)- Parameters:
criteriaHolder- Criteria descriptionvalue- Value to be casted- Returns:
- Casted value
-
-