|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.xquark.xml.xdbc.DefaultReadOnlyXMLConnection
A default implementation of XMLConnection for read-only connections
| Field Summary |
| Fields inherited from interface org.xquark.xml.xdbc.XMLConnection |
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE, XPATH_STRING_TYPE, XQUERY_STRING_TYPE |
| Constructor Summary | |
DefaultReadOnlyXMLConnection()
Creates a new instance of DefaultReadOnlyXMLConnection |
|
| Method Summary | |
void |
commit()
Makes all changes made since the previous commit/rollback permanent and releases any data source locks currently held by the connection. |
XMLCollection |
createCollection(java.lang.String name,
java.lang.String description,
Configurable config)
To create a new XML collection. |
Configurable |
createCollectionConfig()
To create a new XML Collection configuration for set features and properties before create a XML Collection. |
int |
deleteAllCollections()
To delete all XML collections of this connection. |
void |
deleteCollection(java.lang.String name)
To delete a XML collection by its name. |
boolean |
getAutoCommit()
To know the current auto-commit state. |
XMLCollection |
getCollection(java.lang.String name)
To retrieve a XMLcollection by its name. |
short |
getTransactionIsolation()
Gets this connection's current transaction isolation level. |
boolean |
isReadOnly()
To know the read/write mode of the current connection. |
void |
renameCollection(java.lang.String oldname,
java.lang.String newname)
To rename an XML collection by its name. |
void |
rollback()
Drops all changes made since the previous commit/rollback and releases any data source locks currently held by this connection. |
void |
setAutoCommit(boolean autoCommitMode)
Sets this connection's auto-commit mode. |
void |
setReadOnly(boolean readOnlyMode)
To change the read/write mode of the connection. |
void |
setTransactionIsolation(short level)
Attempts to change the transaction isolation level to the one given. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.xquark.xml.xdbc.XMLConnection |
close, createStatement, createStatement, getMetaData, getMetaData, getURL, getUserName, isClosed, prepareStatement, setBaseURI |
| Constructor Detail |
public DefaultReadOnlyXMLConnection()
| Method Detail |
public void commit()
throws XMLDBCException,
XMLDBCNotSupportedException
commit in interface XMLConnectionXMLDBCException - if a data source access error occurs.
XMLDBCNotSupportedException - if the data source does not support transactions
public XMLCollection createCollection(java.lang.String name,
java.lang.String description,
Configurable config)
throws XMLDBCException,
XMLDBCNotSupportedException
createCollection in interface XMLConnectionname - the unique name of the new XML collection.description - the description of the new XML collection (optional).config - a XML collection configuration. If null, the XML collection will be created with default configuration.
XMLDBCException - if a data source access error occurs or if the XML collection name already exists.
XMLDBCNotSupportedException - if the data source does not support this operation (typically, when the data source is read-only)
public Configurable createCollectionConfig()
throws XMLDBCException,
XMLDBCNotSupportedException
createCollectionConfig in interface XMLConnectionXMLDBCException - if a data source access error occurs.
XMLDBCNotSupportedException - if the data source does not support this operation (typically, when the data source is read-only)
public int deleteAllCollections()
throws XMLDBCException,
XMLDBCNotSupportedException
deleteAllCollections in interface XMLConnectionXMLDBCException - if a data source access error occurs.
XMLDBCNotSupportedException - if the data source does not support this operation (typically, when the data source is read-only)
public void deleteCollection(java.lang.String name)
throws XMLDBCException,
XMLDBCNotSupportedException
deleteCollection in interface XMLConnectionname - the unique name of an existing XML collection.
XMLDBCException - if a data source access error occurs or if the XML collection does not exist.
XMLDBCNotSupportedException - if the data source does not support this operation (typically, when the data source is read-only)
public boolean getAutoCommit()
throws XMLDBCException,
XMLDBCNotSupportedException
getAutoCommit in interface XMLConnectionXMLDBCException - if a data source access error occurs.
XMLDBCNotSupportedException - if the data source does not support transactions
public short getTransactionIsolation()
throws XMLDBCException,
XMLDBCNotSupportedException
getTransactionIsolation in interface XMLConnectionXMLDBCException - if a data source access error occurs.
XMLDBCNotSupportedException - if the data source does not support transactions
public XMLCollection getCollection(java.lang.String name)
throws XMLDBCException,
XMLDBCNotSupportedException
getCollection in interface XMLConnectionname - a name of XML collection.
XMLDBCException - if a data source access error occurs.
XMLDBCNotSupportedException - if the data source does not support this operation (typically, when the data source is read-only)
public boolean isReadOnly()
throws XMLDBCException
isReadOnly in interface XMLConnectionXMLDBCException - if a data source access error occurs.
public void renameCollection(java.lang.String oldname,
java.lang.String newname)
throws XMLDBCException,
XMLDBCNotSupportedException
renameCollection in interface XMLConnectionoldname - the unique name of an existing XML collection.newname - the new unique name of an existing XML collection.
XMLDBCException - if a data source access error errors, if the collection does not exist, or if the new name is not unique.
XMLDBCNotSupportedException - if the data source does not support this operation (typically, when the data source is read-only)
public void rollback()
throws XMLDBCException,
XMLDBCNotSupportedException
rollback in interface XMLConnectionXMLDBCException - if a data source access error occurs.
XMLDBCNotSupportedException - if the data source does not support transactions
public void setAutoCommit(boolean autoCommitMode)
throws XMLDBCException,
XMLDBCNotSupportedException
setAutoCommit in interface XMLConnectionautoCommitMode - if true, the connection will pass in auto-commit mode, else in manual commit mode.
XMLDBCException - if a data source access error occurs.
XMLDBCNotSupportedException - if the data source does not support transactions
public void setReadOnly(boolean readOnlyMode)
throws XMLDBCException,
XMLDBCNotSupportedException
setReadOnly in interface XMLConnectionreadOnlyMode - if true, the connection will pass in read-only mode, else in read/write mode.
XMLDBCException - if a data source access error occurs.
XMLDBCNotSupportedException - if the data source is read-only and the parameter is false.
public void setTransactionIsolation(short level)
throws XMLDBCException,
XMLDBCNotSupportedException
setTransactionIsolation in interface XMLConnectionlevel - one of the TRANSACTION_* (see field summary) isolation values with the exception of
TRANSACTION_NONE; some data sources may not support other values.
XMLDBCException - if a data source access error occurs.
XMLDBCNotSupportedException - if the data source does not support transactions
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||