Enum Class ConversionDirective

java.lang.Object
java.lang.Enum<ConversionDirective>
de.calamanari.adl.sql.cnv.ConversionDirective
All Implemented Interfaces:
de.calamanari.adl.Flag, Serializable, Comparable<ConversionDirective>, Constable

public enum ConversionDirective extends Enum<ConversionDirective> implements de.calamanari.adl.Flag
ConversionDirectives are Flags that influence details of the query generation process.
Author:
Karl Eilebrecht
  • Enum Constant Details

    • DISABLE_DATE_TIME_ALIGNMENT

      public static final ConversionDirective DISABLE_DATE_TIME_ALIGNMENT
      By default the converter will align DefaultAdlType.DATE to higher resolution types DefaultAdlSqlType.SQL_TIMESTAMP, DefaultAdlSqlType.SQL_INTEGER or DefaultAdlSqlType.SQL_BIGINT by 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 example 2024-12-13 will no longer match (equal) the db-timestamp 2024-12-13 12:30:12.

    • DISABLE_CONTAINS

      public static final ConversionDirective DISABLE_CONTAINS
      This disallows any CONTAINS to SQL-translation, no matter how the data binding is configured.
    • DISABLE_LESS_THAN_GREATER_THAN

      public static final ConversionDirective 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

      public static final ConversionDirective DISABLE_REFERENCE_MATCHING
      This disallows any reference matching, no matter how the data binding is configured.
    • DISABLE_UNION

      public static final ConversionDirective DISABLE_UNION
      This disallows the union of aliases as base query (always use any table with TableNature.containsAllIds() instead

      UNIONs 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

      public static final ConversionDirective 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 an IS_ACTIVE column 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

      public static ConversionDirective[] 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

      public static ConversionDirective valueOf(String name)
      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 name
      NullPointerException - if the argument is null