Enum Class ConversionHint
- All Implemented Interfaces:
de.calamanari.adl.Flag,Serializable,Comparable<ConversionHint>,Constable
- Author:
- Karl Eilebrecht
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDerived hint: this query cannot be created with all inner joins in the main queryThe expression to be converted is either an atom (e.g.,color=red) or an OR of atoms (e.g.,color=red OR shape=circle OR size=XXL)The expression to be converted does not contain any (negated)MatchOperator.IS_UNKNOWNDerived hint: this query does not require any joins, all conditions can be applied as-isThere is no reference match with or against a multi-row argumentNone of the involved args is sensitive to multi-rowThe expression to be converted is either an atom (e.g.,color=red) or an AND of atoms (e.g.,color=red AND shape=circle AND size=XXL)The expression to be converted does not compare any arguments to other argumentsThe expression to be converted does not require any joins.The expression to be converted only deals with a single argName (attribute).All attributes involved in the query to be converted are mapped to the same table.All attributes involved in the query to be converted are mapped to the same table, and this table has all rows. -
Method Summary
Modifier and TypeMethodDescriptionstatic ConversionHintReturns the enum constant of this class with the specified name.static ConversionHint[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from interface de.calamanari.adl.Flag
check, check
-
Enum Constant Details
-
NO_IS_UNKNOWN
The expression to be converted does not contain any (negated)MatchOperator.IS_UNKNOWNThis hint can help simplifying queries because IS UNKNOWN (SQL IS NULL) can be evil in conjunction with multi-row-sensitivity where IS UNKNOWN effectively means not any row where this field as any value. If we know that the whole query does not suffer from this problem we might create a simpler query.
-
NO_REFERENCE_MATCH
The expression to be converted does not compare any arguments to other argumentsReference matches often require extra joins if the arguments are mapped to columns of the same table and the values sit on different rows.
Knowing that there are no reference matches in a query may lead to simpler queries. -
NO_AND
The expression to be converted is either an atom (e.g.,color=red) or an OR of atoms (e.g.,color=red OR shape=circle OR size=XXL) -
NO_OR
The expression to be converted is either an atom (e.g.,color=red) or an AND of atoms (e.g.,color=red AND shape=circle AND size=XXL) -
NO_MULTI_ROW_SENSITIVITY
None of the involved args is sensitive to multi-row -
NO_MULTI_ROW_REFERENCE_MATCH
There is no reference match with or against a multi-row argument -
NO_JOINS_REQUIRED
Derived hint: this query does not require any joins, all conditions can be applied as-is -
LEFT_OUTER_JOINS_REQUIRED
Derived hint: this query cannot be created with all inner joins in the main query -
SINGLE_ATTRIBUTE
The expression to be converted only deals with a single argName (attribute).This hint can lead to simplistic queries, e.g. if it is a simple OR of match conditions, it often does not matter if the attribute is multi-row or not.
-
SINGLE_TABLE
All attributes involved in the query to be converted are mapped to the same table.Knowing that only a single table is involved can help to write simple queries. E.g., if there are no IS UNKNOWNs involved and the related attributes are not multi-row, a simple select will do.
-
SINGLE_TABLE_CONTAINING_ALL_ROWS
All attributes involved in the query to be converted are mapped to the same table, and this table has all rows.In this case, and if there is no multi-row-sensitivity, then we can query IS NULL safely.
-
SIMPLE_CONDITION
The expression to be converted does not require any joins.Simple conditions can be quite complex (AND/OR) but they only deal with a single table that contains all IDs, and none of their arguments is multi-row-sensitive.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-