Class TranslationManager


  • public class TranslationManager
    extends Object
    Provides the translator for a connection. Automatically manages finding a translation cache for the connection conditions. If a cache is not avaialble it creates a new cache and attaches it to the translator.
    • Constructor Detail

      • TranslationManager

        public TranslationManager()
    • Method Detail

      • getTranslator

        public static Translator getTranslator​(String connectionURL,
                                               String user,
                                               String translationProfile,
                                               String localErrorTranslationFilePath)
                                        throws SQLException
        Get the query and error translator with an internal reference to the translation cache if one is available for the unique url, user and translation profile combination or a new cache if its not available.
        Parameters:
        connectionURL - the connection URL string for the connection
        user - the username for the connection
        translationProfile - The Translation profile
        localErrorTranslationFilePath - Path to the XML file defining the error translations for the case when connection cannot be established to the server and thus the translations cannot happen on the server
        Returns:
        the translator object
        Throws:
        SQLException - thrown if the the local error file cannot be parsed