All Packages Class Hierarchy This Package Previous Next Index
Class org.xmlmiddleware.xmldbms.TransferInfo
java.lang.Object
|
+----org.xmlmiddleware.xmldbms.TransferInfo
- public class TransferInfo
- extends Object
Contains information needed to transfer data between an XML document and
the database.
A TransferInfo object encapsulates the mapping metadata and DataHandler objects
needed to transfer data between an XML document and the database(s) according
to a particular map. It contains a single XMLDBMSMap object and one DataHandler object per
database and is roughly equivalent to a XMLDBMSMap object in XML-DBMS version 1.0.
Applications that use more than one map -- that is, that transfer data to/from
more than one class of XML documents -- should use one TransferInfo object per map.
TransferInfo objects are reusable. In fact, reusing them on multiple calls
to DOMToDBMS.processDocument, DBMSDelete.delete, and DBMSToDOM.retrieveDocument
will be more efficient than recreating them. This is because they contain XMLDBMSMap
objects (which don't need to be recompiled), as well as pooled connections and
statements (which don't need to be reprepared).
It is possible that TransferInfo objects are thread-safe, but I'll have to
think about this a bit...
- Version:
- 2.0
- Author:
- Ronald Bourret
- See Also:
- DataHandler
-
TransferInfo(XMLDBMSMap)
- Create a new TransferInfo object.
-
TransferInfo(XMLDBMSMap, String, DataHandler)
- Create a new TransferInfo object and set the DataHandler.
-
addDataHandler(String, DataHandler)
- Add a new DataHandler.
-
getDataHandler(String)
- Get a DataHandler.
-
getDataHandlers()
- Get all DataHandlers.
-
getMap()
- Get the XMLDBMSMap object
TransferInfo
public TransferInfo(XMLDBMSMap map)
- Create a new TransferInfo object.
- Parameters:
- map - The XMLDBMSMap object to which the TransferInfo object applies
TransferInfo
public TransferInfo(XMLDBMSMap map,
String dbName,
DataHandler dataHandler)
- Create a new TransferInfo object and set the DataHandler.
This is a convenience constructor for applications that use a
single database.
- Parameters:
- map - The XMLDBMSMap object to which the TransferInfo object applies
- dbName - The name of the database as it appears in the map. If this
is null, the name "Default" is used.
- dataHandler - An implementation of DataHandler for the database.
getMap
public final XMLDBMSMap getMap()
- Get the XMLDBMSMap object
- Returns:
- The XMLDBMSMap object.
addDataHandler
public void addDataHandler(String dbName,
DataHandler dataHandler)
- Add a new DataHandler.
- Parameters:
- dbName - The name of the database as it appears in the map. If this
is null, the name "Default" is used.
- dataHandler - An implementation of DataHandler for the database.
getDataHandler
public final DataHandler getDataHandler(String dbName)
- Get a DataHandler.
- Parameters:
- dbName - The name of the database for which to get the DataHandler. May not be null.
- Returns:
- An implementation of DataHandler. This is null if no DataHandler is found.
getDataHandlers
public final Enumeration getDataHandlers()
- Get all DataHandlers.
- Returns:
- An Enumeration containing DataHandler implementations. May be empty.
All Packages Class Hierarchy This Package Previous Next Index