|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xquark.bridge.Mapping
An object implementing this class represents a processed mapping file.
Objects of this class are thread-safe and can be reused multiple times.
However, as they encapsulate a JDBC connection, it is better
to use different objects for different threads.
This class uses a cache for loaded mapping files, so that the loading overhead is
reduced. The cache mechanism can be overriden to reload a modified file.
Constructor Summary | |
Mapping(java.sql.Connection conn,
org.xml.sax.InputSource source,
boolean reload)
Constructor. |
|
Mapping(java.sql.Connection conn,
org.xml.sax.InputSource source,
boolean reload,
java.lang.ClassLoader loader)
Constructor. |
|
Mapping(java.sql.Connection conn,
java.lang.String fileURI,
boolean reload)
Constructor. |
|
Mapping(java.sql.Connection conn,
java.lang.String fileURI,
boolean reload,
java.lang.ClassLoader loader)
Constructor. |
Method Summary | |
void |
close()
Frees all resources associated to the object, and removes it from the cache |
java.sql.Connection |
getConnection()
Returns the JDBC2 connection used by this object to access the database. |
Mapper |
getMapper()
Creates a new Mapper object for storing a set of XML documents in the database |
java.lang.String |
getSystemId()
Returns the system id (the URL) of the mapping file, if known. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Mapping(java.sql.Connection conn, org.xml.sax.InputSource source, boolean reload, java.lang.ClassLoader loader) throws java.io.IOException, org.xml.sax.SAXException, java.sql.SQLException
conn
- a JDBC connectionsource
- the SAX InputSource encapsulating the mapping filereload
- true means that the mapping file should be reloaded, even if it is present in the cacheloader
- ClassLoader used for loading user generators
java.io.IOException
- if an IO error occured while accessing the mapping file
org.xml.sax.SAXException
- if a SAX error occured while parsing the mapping file
java.sql.SQLException
- if an SQL error occured while accessing the databasepublic Mapping(java.sql.Connection conn, org.xml.sax.InputSource source, boolean reload) throws java.io.IOException, org.xml.sax.SAXException, java.sql.SQLException
conn
- a JDBC connectionsource
- the SAX InputSource encapsulating the mapping filereload
- true means that the mapping file should be reloaded, even if it is present in the cache
java.io.IOException
- if an IO error occured while accessing the mapping file
org.xml.sax.SAXException
- if a SAX error occured while parsing the mapping file
java.sql.SQLException
- if an SQL error occured while accessing the databasepublic Mapping(java.sql.Connection conn, java.lang.String fileURI, boolean reload, java.lang.ClassLoader loader) throws java.io.IOException, org.xml.sax.SAXException, java.sql.SQLException
conn
- a JDBC connectionfileURI
- the URI of the mapping file.reload
- true means that the mapping file should be reloaded, even if it is present in the cacheloader
- ClassLoader used for loading user generators
java.io.IOException
- if an IO error occured while accessing the mapping file
org.xml.sax.SAXException
- if a SAX error occured while parsing the mapping file
java.sql.SQLException
- if an SQL error occured while accessing the databasepublic Mapping(java.sql.Connection conn, java.lang.String fileURI, boolean reload) throws java.io.IOException, org.xml.sax.SAXException, java.sql.SQLException
conn
- a JDBC connectionfileURI
- the URI of the mapping file.reload
- true means that the mapping file should be reloaded, even if it is present in the cache
java.io.IOException
- if an IO error occured while accessing the mapping file
org.xml.sax.SAXException
- if a SAX error occured while parsing the mapping file
java.sql.SQLException
- if an SQL error occured while accessing the databaseMethod Detail |
public void close() throws XMLDBCException, java.sql.SQLException
XMLDBCException
- if a database connection error occured.
java.sql.SQLException
public Mapper getMapper() throws XMLDBCException
XMLDBCException
- if a database connection error occured.Mapper
public java.sql.Connection getConnection()
public java.lang.String getSystemId()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |