Once you have specified the characteristics of the opaque type through the UDTMetaData methods, you can use the methods in the UDTManager class to create opaque types and their class and JAR files in the following order:
The constructor is defined as follows:
public UDTManager(Connection conn) throws SQLException
The createUDTClass() method has the following signature:
public String createUDTClass(UDTMetaData mdata) throws SQLException
The createUDTClass() method causes the driver to perform all of the following actions for your application:
If no class name was specified, the driver uses the name specified in the UDTMetaData.setSQLName() method.
If you specified TRUE by calling the UDTMetaData.keepJavaFile() method, the driver retains the generated .java file. The default is to delete the .java file.
Your application should call the createUDTClass() method only to create new .class and .java files to define an opaque type, not to generate an opaque type from existing files.
The createJar() method compiles the class files you specify in the classnames list. The files in the list must have the .class extension.
public String createJar(UDTMetaData mdata, String[] classnames) throws SQLException;
The driver creates a JAR file named sqlname.jar (where sqlname is the name you specified by calling UDTMetaData.setSQLName()) and returns the filename to your application.
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]