Class DOFWDialect

java.lang.Object
org.eclnt.ccee.db.dofw.DOFWDialect
All Implemented Interfaces:
ICCEEConstants

public class DOFWDialect extends Object implements ICCEEConstants
Central management of DB syntax differences during automated creation of SQL statements. Heavily used by class DOFWSql - but also may be used by others.
  • Field Details

  • Constructor Details

    • DOFWDialect

      public DOFWDialect()
  • Method Details

    • getSelectTopVariant

      public static int getSelectTopVariant(String contextName)
    • updateColumnNameForTextConversion

      public static String updateColumnNameForTextConversion(String contextName, String columnName)
    • approveDialectIsOK

      public static void approveDialectIsOK(String dialect)
    • getColumnNameSurrounder

      public static String getColumnNameSurrounder(String contextName)
      Some DB systems require column names to be written into special surrounding characters. E.g. if using case sensitive column names with Oracle, then they have to be put into "\""...
    • getTableNameSurrounder

      public static String getTableNameSurrounder(String contextName)
      Some DB systems require table names to be written into special surrounding characters. E.g. if using case sensitive table names with Oracle, then they have to be put into "\""...
    • checkIfUUIDIsRepresentedAsString

      public static boolean checkIfUUIDIsRepresentedAsString(String contextName)
      Some databases do not support UUID objects. In this case UUID values have to be explicitly converted to their String representation before passing them into the DB processing.
    • getFixColumnNameForAutoIncrementedColumns

      public static String getFixColumnNameForAutoIncrementedColumns(String contextName)
      When executing an INSERT into the database then the value of auto-generated columns is transferred back into the data object. For this reason a result set is analyzed that is passed back. The column name of the key column in this result set typically is the real column name of the corresponding column - but in some cases is a different other one...
    • getAutoIncrementGetValueSupported

      public static boolean getAutoIncrementGetValueSupported(String contextName)
    • adaptTableCreationStatement

      public static String adaptTableCreationStatement(String contextName, String sql)
      Processed when running DBCreateTables.
    • findSqlDialect

      public static String findSqlDialect(String contextName)
      Central method for finding the dialect for a context.
    • checkIfRangeSelectionIsSupported

      public static boolean checkIfRangeSelectionIsSupported(String contextName)
      The query for ranges (i.e. with top and offset definition) is not supported by all databases. Here you can check if the current database supports querying for ranges.