Package oracle.jdbc.babelfish
Class TranslationManager
- java.lang.Object
-
- oracle.jdbc.babelfish.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 Summary
Constructors Constructor Description TranslationManager()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Translator
getTranslator(String connectionURL, String user, String translationProfile, String localErrorTranslationFilePath)
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.
-
-
-
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 connectionuser
- the username for the connectiontranslationProfile
- The Translation profilelocalErrorTranslationFilePath
- 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
-
-