Interface DBIdentifierUtil

All Superinterfaces:
IdentifierUtil
All Known Implementing Classes:
DBIdentifierUtilImpl

public interface DBIdentifierUtil extends IdentifierUtil
An interface for DB identifier utility-style operations. This interface extends the basic operations provided by IdentifierUtil with additional operations those specific to DBIdentifiers and identifier conversion.
  • Field Details

  • Method Details

    • makeIdentifierValid

      DBIdentifier makeIdentifierValid(DBIdentifier sname, NameSet set, int maxLen, boolean checkForUniqueness)
      Shortens the given name to the given maximum length, then checks that it is not a reserved word. If it is reserved, appends a "0". If the name conflicts with an existing schema component and uniqueness checking is enabled, the last character is replace with '0', then '1', etc. Note that the given max len may be 0 if the database metadata is incomplete. Note: If the name is delimited, make sure the ending delimiter is not stripped off.
    • makeNameValid

      DBIdentifier makeNameValid(String name, NameSet set, int maxLen, int nameType, boolean checkForUniqueness)
      Shortens the given name to the given maximum length, then checks that it is not a reserved word. If it is reserved, appends a "0". If the name conflicts with an existing schema component and uniqueness checking is enabled, the last character is replace with '0', then '1', etc. Note that the given max len may be 0 if the database metadata is incomplete. Note: If the name is delimited, make sure the ending delimiter is not stripped off.
    • getValidColumnIdentifier

      DBIdentifier getValidColumnIdentifier(DBIdentifier name, Table table, int maxLen, boolean checkForUniqueness)
      Returns a valid column name/identifier, based upon the configuration and provided parameters.
      Parameters:
      name -
      table -
      maxLen -
      checkForUniqueness -
    • getValidIndexIdentifier

      DBIdentifier getValidIndexIdentifier(DBIdentifier name, Table table, int maxLen)
      Returns a valid index identifier, based upon the configuration and provided parameters.
      Parameters:
      name -
      table -
      maxLen -
      checkForUniqueness -
    • getValidSequenceIdentifier

      DBIdentifier getValidSequenceIdentifier(DBIdentifier name, Schema schema, int maxLen)
      Returns a valid index identifier, based upon the configuration and provided parameters.
      Parameters:
      name -
      table -
      maxLen -
      checkForUniqueness -
    • getValidTableIdentifier

      DBIdentifier getValidTableIdentifier(DBIdentifier name, Schema schema, int maxLen)
      Returns a valid table identifier, based upon the configuration and provided parameters.
      Parameters:
      name -
      schema -
      maxLen -
    • getValidUniqueIdentifier

      DBIdentifier getValidUniqueIdentifier(DBIdentifier name, Table table, int maxLen)
      Returns a valid unique constraint identifier, based upon the configuration and provided parameters.
      Parameters:
      name -
      table -
      maxLen -
    • getValidForeignKeyIdentifier

      DBIdentifier getValidForeignKeyIdentifier(DBIdentifier name, Table table, Table toTable, int maxLen)
      Returns a valid foreign key identifier, based upon the configuration and provided parameters.
      Parameters:
      name -
      table -
      toTable -
      maxLen -
    • toDBName

      String toDBName(DBIdentifier name)
      Converts the specified identifier to a format required by the database.
      Parameters:
      name -
    • toDBName

      String toDBName(DBIdentifier name, boolean delimit)
      Converts the specified identifier to a format required by the database, optionally delimiting the name.
      Parameters:
      name -
      delimit -
    • toDBName

      String toDBName(String name)
      Converts the specified string to a format required by the database.
      Parameters:
      name -
    • toDBName

      String toDBName(String name, boolean delimit)
      Converts the specified string to a format required by the database, optionally delimiting the name.
      Parameters:
      name -
    • fromDBName

      Converts the name returned by the database to an identifier of the specified type.
      Parameters:
      name -
    • appendColumns

      String appendColumns(Column[] columns)
      Appends multiple columns names together into comma delimited string.
      Parameters:
      columns -
    • convertSchemaCase

      DBIdentifier convertSchemaCase(DBIdentifier schema)
      Converts the name of the specified delimiter to the appropriate case as defined by the configuration.
      Parameters:
      columns -
    • append

      Appends multiple names together using the appropriate name delimiter.
      Parameters:
      resultId -
      names -
    • getGeneratedKeySequenceName

      DBIdentifier getGeneratedKeySequenceName(Column col, int maxLen)
      Returns a generated key sequence identifier for the column.
      Parameters:
      col -
      maxLen -
    • convertAlias

      String convertAlias(String alias)
      Converts a provided alias to a format specified in the configuration.
      Parameters:
      alias -