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 and Description
`TranslationManager()`

### Method Summary

All Methods Static Methods Concrete Methods
`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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### 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

Copyright © 2008, 2020, Oracle and/or its affiliates. All rights reserved.