Interface FarragoMedDataWrapper

All Superinterfaces:
ClosableAllocation, FarragoAllocation, FarragoMedDataWrapperInfo, FarragoPlugin
All Known Implementing Classes:
FlatFileDataWrapper, FlatFileDataWrapper, FtrsDataWrapper, LcsDataWrapper, MedAbstractDataWrapper, MedJdbcForeignDataWrapper, MedMdrForeignDataWrapper, MedMockForeignDataWrapper, MedMockLocalDataWrapper, MedMqlForeignDataWrapper

public interface FarragoMedDataWrapper
extends FarragoPlugin, FarragoMedDataWrapperInfo

FarragoMedDataWrapper defines an interface for accessing foreign or local data. It is a non-standard replacement for the standard SQL/MED internal interface.

Implementations of FarragoMedDataWrapper must provide a public default constructor in order to be loaded via the CREATE {FOREIGN|LOCAL} DATA WRAPPER statement. FarragoMedDataWrapper extends FarragoAllocation; when closeAllocation is called, all resources (such as connections) used to access the data should be released.

$Id: //open/dev/farrago/src/net/sf/farrago/namespace/ $
John V. Sichi

Method Summary
 FarragoMedDataServer newServer(String serverMofId, Properties props)
          Creates an instance of this wrapper for a particular server.
 boolean supportsServerSharing()
          Returns whether server supports sharing by multiple threads.
Methods inherited from interface net.sf.farrago.plugin.FarragoPlugin
getDescription, getLibraryName, getPluginPropertyInfo, getProperties, getSuggestedName, initialize, setLibraryName
Methods inherited from interface org.eigenbase.util.ClosableAllocation
Methods inherited from interface net.sf.farrago.jdbc.FarragoMedDataWrapperInfo
getColumnPropertyInfo, getColumnSetPropertyInfo, getPluginPropertyInfo, getServerPropertyInfo, isForeign

Method Detail


FarragoMedDataServer newServer(String serverMofId,
                               Properties props)
                               throws SQLException
Creates an instance of this wrapper for a particular server. This supports the SQL/MED CREATE SERVER statement. The TYPE and VERSION attributes are rolled in with the other properties. As much validation as possible should be performed, including establishing connections if appropriate.

If this wrapper returns false from the isForeign method, then returned server instances must implement the FarragoMedLocalDataServer interface.

serverMofId - MOFID of server definition in repository; this can be used for accessing the server definition from generated code
props - server properties
new server instance
SQLException - if server connection is unsuccessful


boolean supportsServerSharing()
Returns whether server supports sharing by multiple threads. Used by FarragoDataWrapperCache.loadServer(java.lang.String, net.sf.farrago.namespace.FarragoMedDataWrapper, java.util.Properties) to determine if the entry should be exclusive (not shared).

true only if server sharing is supported