Class BaseParserListener

    • Constructor Detail

      • BaseParserListener

        BaseParserListener()
    • Method Detail

      • getTableOrColumnName

        private static String getTableOrColumnName​(String name)
        Resolves a table or column name from the provided string. Oracle table and column names are inherently stored in upper-case; however, if the objects are created using double-quotes, the case of the object name is retained. Therefore when needing to parse a table or column name, this method will adhere to those rules and will always return the name in upper-case unless the provided name is double-quoted in which the returned value will have the double-quotes removed and case retained.
        Parameters:
        name - table or column name
        Returns:
        parsed table or column name from the supplied name argument
      • removeQuotes

        private static String removeQuotes​(String text,
                                           boolean upperCaseIfNotQuoted)
        Removes leading and trailing double quote characters from the provided string.
        Parameters:
        text - value to have double quotes removed
        upperCaseIfNotQuoted - control if returned string is upper-cased if not quoted
        Returns:
        string that has had quotes removed