Interface IdentifierUtil

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String appendNames​(java.lang.String rule, java.lang.String name1, java.lang.String name2)
      Append the names together while maintaining delimiters.
      java.lang.String appendNames​(IdentifierRule rule, java.lang.String name1, java.lang.String name2)
      Append the names together while maintaining delimiters.
      boolean canSplit​(java.lang.String rule, java.lang.String name)
      Determines whether a name can be split into multiple components.
      boolean canSplit​(java.lang.String rule, java.lang.String name, java.lang.String delim)
      Determines whether a name can be split into multiple components, taking into account the specified delimiter.
      boolean canSplit​(IdentifierRule rule, java.lang.String name)
      Determines whether a name can be split into multiple components.
      boolean canSplit​(IdentifierRule rule, java.lang.String name, java.lang.String delim)
      Determines whether a name can be split into multiple components, taking into account the specified delimiter.
      java.lang.String combineNames​(java.lang.String rule, java.lang.String[] names)
      Combines names using the specified delimiting rule and appropriate separators
      java.lang.String combineNames​(java.lang.String rule, java.lang.String[] rules, java.lang.String[] names)
      Combines names using delimiting rules and appropriate separators
      java.lang.String combineNames​(java.lang.String rule, java.lang.String name1, java.lang.String name2)
      Combines two names using delimiting rules and appropriate separators
      java.lang.String combineNames​(IdentifierRule rule, java.lang.String[] names)
      Combines names using the specified delimiting rule and appropriate separators
      java.lang.String combineNames​(IdentifierRule rule, java.lang.String name1, java.lang.String name2)
      Combines two names using delimiting rules and appropriate separators
      java.lang.String combineNames​(IdentifierRule rule, IdentifierRule[] rules, java.lang.String[] names)
      Combines names using delimiting rules and appropriate separators
      java.lang.String convert​(IdentifierConfiguration config, java.lang.String rule, java.lang.String name)
      Convert the string using this naming configuration to the supplied naming configuration.
      java.lang.String convertFull​(IdentifierConfiguration config, java.lang.String rule, java.lang.String fullName)
      Converts a qualified string-based name defined using the base configuration to the specified configuration.
      java.lang.String delimit​(java.lang.String rule, java.lang.String name)
      Delimit the name if it requires delimiters
      java.lang.String delimit​(java.lang.String rule, java.lang.String name, boolean force)
      Delimit the string with the option to force delimiting.
      java.lang.String delimit​(IdentifierRule rule, java.lang.String name)
      Delimit the name if it requires delimiters
      java.lang.String delimit​(IdentifierRule rule, java.lang.String name, boolean force)
      Delimit the string with the option to force delimiting.
      IdentifierConfiguration getIdentifierConfiguration()
      Get the naming configuration.
      boolean isDelimited​(java.lang.String rule, java.lang.String name)
      Determines whether a name is delimited.
      boolean isDelimited​(IdentifierRule rule, java.lang.String name)
      Determines whether a name is delimited.
      boolean isReservedWord​(java.lang.String rule, java.lang.String name)
      Returns whether a name is considered a reserved word
      boolean isReservedWord​(IdentifierRule rule, java.lang.String name)
      Returns whether a name is considered a reserved word
      java.lang.String joinNames​(java.lang.String[] rules, java.lang.String[] names)
      Joins several names with different naming rules into a single string using appropriate delimiters and separators
      java.lang.String joinNames​(java.lang.String rule, java.lang.String[] names)
      Joins several names with different naming rules into a single string using appropriate delimiters and separators
      java.lang.String joinNames​(java.lang.String rule, java.lang.String[] names, java.lang.String delimiter)
      Joins several names with different naming rules into a single string using the specified delimiter
      java.lang.String joinNames​(IdentifierRule[] rules, java.lang.String[] names)
      Joins several names with different naming rules into a single string using appropriate delimiters and separators
      java.lang.String joinNames​(IdentifierRule rule, java.lang.String[] names)
      Joins several names with different naming rules into a single string using appropriate delimiters and separators
      java.lang.String joinNames​(IdentifierRule rule, java.lang.String[] names, java.lang.String delimiter)
      Joins several names with different naming rules into a single string using the specified delimiter
      java.lang.String removeDelimiters​(java.lang.String rule, java.lang.String name)
      Remove delimiters from a delimited name
      java.lang.String removeDelimiters​(IdentifierConfiguration config, java.lang.String rule, java.lang.String name)
      Remove delimiters from a delimited name
      java.lang.String removeDelimiters​(IdentifierRule rule, java.lang.String name)
      Remove delimiters from a delimited name
      java.lang.String removeHungarianNotation​(java.lang.String rule, java.lang.String name)
      Removes Hungarian notation from the specified string.
      java.lang.String removeHungarianNotation​(IdentifierRule rule, java.lang.String name)
      Removes Hungarian notation from the specified string.
      boolean requiresDelimiters​(java.lang.String rule, java.lang.String name)
      Determines whether a name requires delimiters based upon: The SQL-92 Reference definition of a valid unquoted name The naming rule specified
      boolean requiresDelimiters​(IdentifierRule rule, java.lang.String name)
      Determines whether a name requires delimiters based upon: The SQL-92 Reference definition of a valid unquoted name The naming rule specified
      void setIdentifierConfiguration​(IdentifierConfiguration config)
      Set the naming configuration to use for naming operations.
      java.lang.String[] splitName​(java.lang.String rule, java.lang.String name)
      Splits a combined name name using the provided naming rule
      java.lang.String[] splitName​(java.lang.String rule, java.lang.String name, java.lang.String delimiter)
      Splits a combined name name using the provided naming rule and delimiter.
      java.lang.String[] splitName​(IdentifierRule rule, java.lang.String name)
      Splits a combined name name using the provided naming rule
      java.lang.String[] splitName​(IdentifierRule rule, java.lang.String name, java.lang.String delimiter)
      Splits a combined name name using the provided naming rule and delimiter.
      java.lang.String truncateName​(java.lang.String rule, java.lang.String name, int length)
      Truncates a name while maintaining delimiters.
      java.lang.String truncateName​(IdentifierRule rule, java.lang.String name, int length)
      Truncates a name while maintaining delimiters.
    • Method Detail

      • setIdentifierConfiguration

        void setIdentifierConfiguration​(IdentifierConfiguration config)
        Set the naming configuration to use for naming operations. A naming configuration must be set before calling any other methods.
      • delimit

        java.lang.String delimit​(java.lang.String rule,
                                 java.lang.String name)
        Delimit the name if it requires delimiters
        Parameters:
        rule - the rule to use for delimiting
        name - the name to delimit
        Returns:
        the delimited name, if delimiting was necessary.
      • delimit

        java.lang.String delimit​(IdentifierRule rule,
                                 java.lang.String name)
        Delimit the name if it requires delimiters
        Parameters:
        rule - the rule to use for delimiting
        name - the name to delimit
        Returns:
        the delimited name, if delimiting was necessary.
      • delimit

        java.lang.String delimit​(java.lang.String rule,
                                 java.lang.String name,
                                 boolean force)
        Delimit the string with the option to force delimiting. If force is true, the name will delimited without checking to see if it requires delimiters.
        Parameters:
        rule - the rule to use for delimiting
        name - the name to delimit
        force - add delimiters even if delimiting is not required
        Returns:
        the delimited name, if delimiting was necessary.
      • delimit

        java.lang.String delimit​(IdentifierRule rule,
                                 java.lang.String name,
                                 boolean force)
        Delimit the string with the option to force delimiting. If force is true, the name will delimited without checking to see if it requires delimiters.
        Parameters:
        rule - the rule to use for delimiting
        name - the name to delimit
        force - add delimiters even if delimiting is not required
        Returns:
        the delimited name, if delimiting was necessary.
      • removeDelimiters

        java.lang.String removeDelimiters​(java.lang.String rule,
                                          java.lang.String name)
        Remove delimiters from a delimited name
        Parameters:
        rule - the rule to use for removing delimiters
        name - the name from which to remove delimiters
      • removeDelimiters

        java.lang.String removeDelimiters​(IdentifierConfiguration config,
                                          java.lang.String rule,
                                          java.lang.String name)
        Remove delimiters from a delimited name
        Parameters:
        rule - the rule to use for removing delimiters
        name - the name from which to remove delimiters
      • removeDelimiters

        java.lang.String removeDelimiters​(IdentifierRule rule,
                                          java.lang.String name)
        Remove delimiters from a delimited name
        Parameters:
        rule - the rule to use for removing delimiters
        name - the name from which to remove delimiters
      • isDelimited

        boolean isDelimited​(java.lang.String rule,
                            java.lang.String name)
        Determines whether a name is delimited.
        Parameters:
        rule - the rule to use for removing delimiters
        name - the name to examine for delimiters
      • isDelimited

        boolean isDelimited​(IdentifierRule rule,
                            java.lang.String name)
        Determines whether a name is delimited.
        Parameters:
        rule - the rule to use for removing delimiters
        name - the name to examine for delimiters
      • requiresDelimiters

        boolean requiresDelimiters​(java.lang.String rule,
                                   java.lang.String name)
        Determines whether a name requires delimiters based upon:
        • The SQL-92 Reference definition of a valid unquoted name
        • The naming rule specified
        Parameters:
        rule - the rule to use for removing delimiters
        name - the name to examine for delimiting requirements
      • requiresDelimiters

        boolean requiresDelimiters​(IdentifierRule rule,
                                   java.lang.String name)
        Determines whether a name requires delimiters based upon:
        • The SQL-92 Reference definition of a valid unquoted name
        • The naming rule specified
        Parameters:
        rule - the rule to use for removing delimiters
        name - the name to examine for delimiting requirements
      • combineNames

        java.lang.String combineNames​(java.lang.String rule,
                                      java.lang.String[] rules,
                                      java.lang.String[] names)
        Combines names using delimiting rules and appropriate separators
        Returns:
        a combined name ex. {"TH IS", THAT} -> "TH IS_THAT"
      • combineNames

        java.lang.String combineNames​(IdentifierRule rule,
                                      IdentifierRule[] rules,
                                      java.lang.String[] names)
        Combines names using delimiting rules and appropriate separators
        Returns:
        a combined name ex. {"TH IS", THAT} -> "TH IS_THAT"
      • combineNames

        java.lang.String combineNames​(java.lang.String rule,
                                      java.lang.String[] names)
        Combines names using the specified delimiting rule and appropriate separators
        Returns:
        a combined name ex. {"TH IS", THAT} -> "TH IS_THAT"
      • combineNames

        java.lang.String combineNames​(IdentifierRule rule,
                                      java.lang.String[] names)
        Combines names using the specified delimiting rule and appropriate separators
        Returns:
        a combined name ex. {"TH IS", THAT} -> "TH IS_THAT"
      • combineNames

        java.lang.String combineNames​(java.lang.String rule,
                                      java.lang.String name1,
                                      java.lang.String name2)
        Combines two names using delimiting rules and appropriate separators
      • combineNames

        java.lang.String combineNames​(IdentifierRule rule,
                                      java.lang.String name1,
                                      java.lang.String name2)
        Combines two names using delimiting rules and appropriate separators
      • joinNames

        java.lang.String joinNames​(java.lang.String[] rules,
                                   java.lang.String[] names)
        Joins several names with different naming rules into a single string using appropriate delimiters and separators
      • joinNames

        java.lang.String joinNames​(IdentifierRule[] rules,
                                   java.lang.String[] names)
        Joins several names with different naming rules into a single string using appropriate delimiters and separators
      • joinNames

        java.lang.String joinNames​(java.lang.String rule,
                                   java.lang.String[] names)
        Joins several names with different naming rules into a single string using appropriate delimiters and separators
      • joinNames

        java.lang.String joinNames​(IdentifierRule rule,
                                   java.lang.String[] names)
        Joins several names with different naming rules into a single string using appropriate delimiters and separators
      • joinNames

        java.lang.String joinNames​(IdentifierRule rule,
                                   java.lang.String[] names,
                                   java.lang.String delimiter)
        Joins several names with different naming rules into a single string using the specified delimiter
      • joinNames

        java.lang.String joinNames​(java.lang.String rule,
                                   java.lang.String[] names,
                                   java.lang.String delimiter)
        Joins several names with different naming rules into a single string using the specified delimiter
      • splitName

        java.lang.String[] splitName​(java.lang.String rule,
                                     java.lang.String name)
        Splits a combined name name using the provided naming rule
        Parameters:
        name - the multi-value name
        Returns:
        individual components of the name ex. schema.table --> { schema, table }
      • splitName

        java.lang.String[] splitName​(IdentifierRule rule,
                                     java.lang.String name)
        Splits a combined name name using the provided naming rule
        Parameters:
        name - the multi-value name
        Returns:
        individual components of the name ex. schema.table --> { schema, table }
      • splitName

        java.lang.String[] splitName​(java.lang.String rule,
                                     java.lang.String name,
                                     java.lang.String delimiter)
        Splits a combined name name using the provided naming rule and delimiter.
        Parameters:
        name - the multi-value name
        Returns:
        individual components of the name ex. schema.table --> { schema, table }
      • splitName

        java.lang.String[] splitName​(IdentifierRule rule,
                                     java.lang.String name,
                                     java.lang.String delimiter)
        Splits a combined name name using the provided naming rule and delimiter.
        Parameters:
        name - the multi-value name
        Returns:
        individual components of the name ex. schema.table --> { schema, table }
      • isReservedWord

        boolean isReservedWord​(java.lang.String rule,
                               java.lang.String name)
        Returns whether a name is considered a reserved word
      • isReservedWord

        boolean isReservedWord​(IdentifierRule rule,
                               java.lang.String name)
        Returns whether a name is considered a reserved word
      • convert

        java.lang.String convert​(IdentifierConfiguration config,
                                 java.lang.String rule,
                                 java.lang.String name)
        Convert the string using this naming configuration to the supplied naming configuration.
      • truncateName

        java.lang.String truncateName​(java.lang.String rule,
                                      java.lang.String name,
                                      int length)
        Truncates a name while maintaining delimiters.
      • truncateName

        java.lang.String truncateName​(IdentifierRule rule,
                                      java.lang.String name,
                                      int length)
        Truncates a name while maintaining delimiters.
      • appendNames

        java.lang.String appendNames​(IdentifierRule rule,
                                     java.lang.String name1,
                                     java.lang.String name2)
        Append the names together while maintaining delimiters.
      • appendNames

        java.lang.String appendNames​(java.lang.String rule,
                                     java.lang.String name1,
                                     java.lang.String name2)
        Append the names together while maintaining delimiters.
      • convertFull

        java.lang.String convertFull​(IdentifierConfiguration config,
                                     java.lang.String rule,
                                     java.lang.String fullName)
        Converts a qualified string-based name defined using the base configuration to the specified configuration. Returns the converted name.
      • removeHungarianNotation

        java.lang.String removeHungarianNotation​(java.lang.String rule,
                                                 java.lang.String name)
        Removes Hungarian notation from the specified string.
      • removeHungarianNotation

        java.lang.String removeHungarianNotation​(IdentifierRule rule,
                                                 java.lang.String name)
        Removes Hungarian notation from the specified string.
      • canSplit

        boolean canSplit​(java.lang.String rule,
                         java.lang.String name)
        Determines whether a name can be split into multiple components.
      • canSplit

        boolean canSplit​(IdentifierRule rule,
                         java.lang.String name)
        Determines whether a name can be split into multiple components.
      • canSplit

        boolean canSplit​(java.lang.String rule,
                         java.lang.String name,
                         java.lang.String delim)
        Determines whether a name can be split into multiple components, taking into account the specified delimiter.
      • canSplit

        boolean canSplit​(IdentifierRule rule,
                         java.lang.String name,
                         java.lang.String delim)
        Determines whether a name can be split into multiple components, taking into account the specified delimiter.