Enum Class ConversionDirective
- All Implemented Interfaces:
de.calamanari.adl.Flag, Serializable, Comparable<ConversionDirective>, Constable
ConversionDirectives are Flags that influence details of the query generation process.- Author:
- Karl Eilebrecht
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThis disallows any CONTAINS to SQL-translation, no matter how the data binding is configured.By default the converter will alignDefaultAdlType.DATEto higher resolution typesDefaultAdlSqlType.SQL_TIMESTAMP,DefaultAdlSqlType.SQL_INTEGERorDefaultAdlSqlType.SQL_BIGINTby turning the query into a range query.This disallows any LESS THAN or GREATER THAN to be translated, no matter how the data binding is configuredThis disallows any reference matching, no matter how the data binding is configured.This disallows the union of aliases as base query (always use any table withTableNature.containsAllIds()insteadThis directive enforces the usage of the primary table as start selection, no matter if the table is required in the current query or not. -
Method Summary
Modifier and TypeMethodDescriptionstatic ConversionDirectiveReturns the enum constant of this class with the specified name.static ConversionDirective[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from interface de.calamanari.adl.Flag
check, check
-
Enum Constant Details
-
DISABLE_DATE_TIME_ALIGNMENT
By default the converter will alignDefaultAdlType.DATEto higher resolution typesDefaultAdlSqlType.SQL_TIMESTAMP,DefaultAdlSqlType.SQL_INTEGERorDefaultAdlSqlType.SQL_BIGINTby turning the query into a range query.This directive turns off this feature.
Be aware that with this directive dates will be matched against timestamps assuming a 00:00:00 as the time portion.
For example2024-12-13will no longer match (equal) the db-timestamp2024-12-13 12:30:12. -
DISABLE_CONTAINS
This disallows any CONTAINS to SQL-translation, no matter how the data binding is configured. -
DISABLE_LESS_THAN_GREATER_THAN
This disallows any LESS THAN or GREATER THAN to be translated, no matter how the data binding is configured -
DISABLE_REFERENCE_MATCHING
This disallows any reference matching, no matter how the data binding is configured. -
DISABLE_UNION
This disallows the union of aliases as base query (always use any table withTableNature.containsAllIds()insteadUNIONs appear in a base selection if none of the aliases in the WITH-clause alone can serve as a base selection but the converter knows that a combination of some aliases would work. On some systems the UNION-approach may lead to bad performance.
This directive is not required if your configuration contains a primary table because the primary table takes precedence over UNIONs as base selection.
-
ENFORCE_PRIMARY_TABLE
This directive enforces the usage of the primary table as start selection, no matter if the table is required in the current query or not.Without this directive the query builder may decide not to query from the primary table if it is logically not required.
Use this directive if you want to be sure the primary table will be involved in every query.
For example, set this directive if you have anIS_ACTIVEcolumn only in your base table and this shall be always considered.
This directive can also be useful if the primary table is drastically smaller then some of the other tables.
-
-
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
-