|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
A connection (session) with a specific database. Within the context of an XDBCConnection, XQuery statements are executed and results are returned.
An XDBCConnection's database will provide information describing its
XQuery compliance level and the capabilities of the connection with
the getMetaData method.
Note: By default the XDBCConnection automatically commits changes after executing each statement. Unsetting autocommit mode is currently NOT supported.
| Field Summary | |
static int |
XDBC_TRANSACTION_NONE
Transaction isolation level: Indicates that transactions are not supported. |
static int |
XDBC_TRANSACTION_READ_COMMITTED
Transaction isolation level: Dirty reads are prevented; non-repeatable reads and phantom reads can occur. |
static int |
XDBC_TRANSACTION_READ_UNCOMMITTED
Transaction isolation level: Dirty reads, non-repeatable reads and phantom reads can occur. |
static int |
XDBC_TRANSACTION_REPEATABLE_READ
Transaction isolation level: Dirty reads and non-repeatable reads are prevented; phantom reads can occur. |
static int |
XDBC_TRANSACTION_SERIALIZABLE
Transaction isolation level: Dirty reads, non-repeatable reads and phantom reads are prevented. |
| Method Summary | |
void |
clearWarnings()
Clears all warnings reported for this XDBCConnection object. |
void |
close()
Releases a XDBCConnection's database and XDBC resources immediately instead of waiting for this to be done by the Java runtime. |
void |
commit()
NOTE: This method is NOT currently supported. |
XDBCStatement |
createStatement()
Creates a XDBCStatement object for sending XQuery expressions to the database. |
boolean |
getAutoCommit()
Gets the current auto-commit state. |
String |
getHost()
Gets the host associated with this connection. |
Locale |
getLocale()
Gets the locale associated with this database connection. |
XDBCDatabaseMetaData |
getMetaData()
Gets the metadata regarding this connection's database. |
int |
getPort()
Gets the port number of this connection. |
TimeZone |
getTimeZone()
Gets the timezone associated with this database connection. |
int |
getTransactionIsolation()
Gets this XDBCConnection's current transaction isolation level. |
XDBCWarning |
getWarnings()
Returns the first warning reported by calls on this Connection. |
boolean |
isClosed()
Tests if this XDBCConnection is closed. |
boolean |
isReadOnly()
Tests if this XDBCConnection is in read-only mode. |
void |
rollback()
NOTE: This method is NOT currently supported. |
void |
setAutoCommit(boolean autoCommit)
NOTE: This method is NOT currently supported. |
void |
setLocale(Locale locale)
Sets the locale for this connection object. |
void |
setReadOnly(boolean readOnly)
NOTE: This method is NOT currently supported. |
void |
setTimeZone(TimeZone tz)
Sets the timezone for this connection object. |
void |
setTransactionIsolation(int level)
NOTE: This method is NOT currently supported. |
| Field Detail |
public static final int XDBC_TRANSACTION_NONE
public static final int XDBC_TRANSACTION_READ_UNCOMMITTED
READ UNCOMMITTED allows queries in the transaction to read data without acquiring any lock.
public static final int XDBC_TRANSACTION_READ_COMMITTED
A transaction may issue the same query several times and get different answers. For example, a reservation system could be READ_COMMITTED; the transaction could repeatably poll to see if a seat was available, hoping for a cancellation.
public static final int XDBC_TRANSACTION_REPEATABLE_READ
public static final int XDBC_TRANSACTION_SERIALIZABLE
| Method Detail |
public void close()
throws XDBCException
Calling this method frees up resources immediately and its use is strongly encouraged.
XDBCException - if a database access error occurs
public void commit()
throws XDBCException
NOTE: This method is NOT currently supported.
Makes all changes made since the previous commit/rollback permanent and releases any database locks currently held by the connection.
XDBCException - if a database access error occurs
public XDBCStatement createStatement()
throws XDBCException
XDBCException - if a database access error occurs
public boolean getAutoCommit()
throws XDBCException
XDBCException - if a database access error occurs
public String getHost()
throws XDBCException
XDBCException - if a database access error occurs
public Locale getLocale()
throws XDBCException
XDBCException - if a database access error occursjava.util.Locale
public TimeZone getTimeZone()
throws XDBCException
XDBCException - if a database access error occursjava.util.TimeZone
public XDBCDatabaseMetaData getMetaData()
throws XDBCException
XDBCException - if a database access error occurs
public int getPort()
throws XDBCException
XDBCException - if a database access error occurs
public int getTransactionIsolation()
throws XDBCException
XDBCException - if a database access error occursXDBC_TRANSACTION_NONE,
XDBC_TRANSACTION_READ_UNCOMMITTED,
XDBC_TRANSACTION_READ_COMMITTED,
XDBC_TRANSACTION_REPEATABLE_READ,
XDBC_TRANSACTION_SERIALIZABLE
public void setTransactionIsolation(int level)
throws XDBCException
NOTE: This method is NOT currently supported.
Attempts to change the transaction isolation level to the one given.
level - the integer transaction isolation level to set on this
XDBCConnection
XDBCException - if a database access error occursXDBC_TRANSACTION_NONE,
XDBC_TRANSACTION_READ_UNCOMMITTED,
XDBC_TRANSACTION_READ_COMMITTED,
XDBC_TRANSACTION_REPEATABLE_READ,
XDBC_TRANSACTION_SERIALIZABLE
public XDBCWarning getWarnings()
throws XDBCException
XDBCException - if a database access error occurs
public void clearWarnings()
throws XDBCException
XDBCException - if a database access error occurs
public boolean isClosed()
throws XDBCException
XDBCException - if a database access error occurs
public boolean isReadOnly()
throws XDBCException
XDBCException - if a database access error occurs
public void rollback()
throws XDBCException
NOTE: This method is NOT currently supported.
Drops all changes made since the previous commit/rollback and releases any database locks currently held by this XDBCConnection.
XDBCException - if a database access error occurs
public void setAutoCommit(boolean autoCommit)
throws XDBCException
NOTE: This method is NOT currently supported.
Sets this connection's auto-commit mode.
autoCommit - true to enable auto-commit mode for this
XDBCConnection; false to disable auto-commit mode.
XDBCException - if a database access error occurs
public void setLocale(Locale locale)
throws XDBCException
Generally, the locale needs to be changed before creating a statement or other operation, for which the new locale is needed.
locale - the java.util.Locale object to use for with this
connection object.
XDBCException - if a database access error occursLocale
public void setTimeZone(TimeZone tz)
throws XDBCException
Generally, the timezone needs to be changed before creating a statement or other operation, for which the new timezone is needed.
tz - the java.util.TimeZone object to use for with this
connection object.
XDBCException - if a database access error occursTimeZone
public void setReadOnly(boolean readOnly)
throws XDBCException
NOTE: This method is NOT currently supported.
Puts this connection in read-only mode as a hint to enable database optimizations.
readOnly - true to enable read-only mode for this
XDBCConnection; false to disable read-only mode.
XDBCException - if a database access error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||