Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 6. Extending the Execution Factory Class
6.1. Extending the ExecutionFactory Class Copier lienLien copié sur presse-papiers!
Copier lienLien copié sur presse-papiers!
A custom translator must extend the
org.teiid.translator.ExecutionFactory class to connect and query a data source. This extended class must provide a constructor with no arguments that can be constructed using Java reflection libraries.
The following is an example constructor:
Specify the annotation
@Translator on the extended "ExecutionFactory" class. This annotation defines the name and description of your translator, and is also used as an identifier during deployment. This is the name you would be using in the VDB and elsewhere in the configuration to refer to this translator.
MyConnectionFactory specifies the type of ConnectionFactory interface that is expected from the associated resource adapter. This is required as part of the class definition when extending the ExecutionFactory class.
MyConnection specifies the type of Connection interface that is expected from the associated resource adapter. This is required as part of class definition when extending the ExecutionFactory class.