net.sf.farrago.syslib
Class FarragoMedUDR

java.lang.Object
  extended by net.sf.farrago.syslib.FarragoMedUDR

public abstract class FarragoMedUDR
extends Object

FarragoMedUDR is a set of user-defined routines providing access to SQL/MED information.

Version:
$Id: //open/dev/farrago/src/net/sf/farrago/syslib/FarragoMedUDR.java#10 $
Author:
John V. Sichi

Nested Class Summary
private static class FarragoMedUDR.BrowseSchemaSink
           
 
Constructor Summary
FarragoMedUDR()
           
 
Method Summary
static void browseConnectServer(String wrapperName, ResultSet serverOptions, PreparedStatement resultInserter)
          Queries SQL/MED connection information for a foreign data server.
private static void browseConnectServerChoice(int optionOrdinal, DriverPropertyInfo info, int choiceOrdinal, PreparedStatement resultInserter)
           
private static void browseConnectServerImpl(FarragoSessionStmtValidator stmtValidator, String wrapperName, Properties serverProps, PreparedStatement resultInserter)
           
static void browseForeignSchemas(String serverName, PreparedStatement resultInserter)
           
private static void browseForeignSchemasImpl(FarragoSessionStmtValidator stmtValidator, String serverName, PreparedStatement resultInserter)
           
static void testAllServersForWrapper(String wrapperName)
          Tests that a connection can be established for all SQL/MED servers instantiated from a particular data wrapper.
static void testServer(String serverName)
          Tests that a connection can be established to a particular SQL/MED local or foreign data server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FarragoMedUDR

public FarragoMedUDR()
Method Detail

testServer

public static void testServer(String serverName)
Tests that a connection can be established to a particular SQL/MED local or foreign data server. If no exception is thrown, the test was successful.

Parameters:
serverName - name of data server to test

testAllServersForWrapper

public static void testAllServersForWrapper(String wrapperName)
Tests that a connection can be established for all SQL/MED servers instantiated from a particular data wrapper. If no exception is thrown, the test was successful.

Parameters:
wrapperName - name of data wrapper to test

browseConnectServer

public static void browseConnectServer(String wrapperName,
                                       ResultSet serverOptions,
                                       PreparedStatement resultInserter)
                                throws SQLException
Queries SQL/MED connection information for a foreign data server.

Parameters:
wrapperName - name of foreign data wrapper to use
serverOptions - table of option NAME/VALUE pairs to use; this can be empty to query for all options
resultInserter - writes result table
Throws:
SQLException

browseConnectServerImpl

private static void browseConnectServerImpl(FarragoSessionStmtValidator stmtValidator,
                                            String wrapperName,
                                            Properties serverProps,
                                            PreparedStatement resultInserter)
                                     throws SQLException
Throws:
SQLException

browseConnectServerChoice

private static void browseConnectServerChoice(int optionOrdinal,
                                              DriverPropertyInfo info,
                                              int choiceOrdinal,
                                              PreparedStatement resultInserter)
                                       throws SQLException
Throws:
SQLException

browseForeignSchemas

public static void browseForeignSchemas(String serverName,
                                        PreparedStatement resultInserter)
                                 throws SQLException
Throws:
SQLException

browseForeignSchemasImpl

private static void browseForeignSchemasImpl(FarragoSessionStmtValidator stmtValidator,
                                             String serverName,
                                             PreparedStatement resultInserter)
                                      throws SQLException
Throws:
SQLException