|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.altair.hwm.database.sql.HWMConnectionDB
public class HWMConnectionDB
Title: HWMConnectionDB
Description: The connection object for the server for embedded databases
Company: Altair Engineering, Inc.
Field Summary |
---|
Fields inherited from interface java.sql.Connection |
---|
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE |
Constructor Summary | |
---|---|
HWMConnectionDB()
Constructor |
Method Summary | |
---|---|
void |
clearWarnings()
Clears all warnings reported for this Connection object. |
void |
close()
Releases a Connection's database and JDBC resources immediately instead of waiting for them to be automatically released. |
void |
commit()
Makes all changes made since the previous commit/rollback permanent and releases any database locks currently held by the Connection. |
void |
ConnectToServer(java.lang.String strDBInfoClassName,
java.lang.String strServer,
int nPort,
java.lang.String strDBURL,
java.lang.String strUser,
java.lang.String strPwd,
boolean bCreateDB)
Create the socket connection with the server and ask it to coonect to the given database |
java.sql.Statement |
createStatement()
Creates a Statement object for sending SQL statements to the database. |
java.sql.Statement |
createStatement(int nResSetType,
int nResSetConcurrency)
Creates a Statement object that will generate ResultSet objects with the given type and concurrency. |
java.sql.Statement |
createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
|
boolean |
getAutoCommit()
Gets the current auto-commit state. |
java.lang.String |
getCatalog()
Returns the Connection's current catalog name. |
int |
getHoldability()
|
java.sql.DatabaseMetaData |
getMetaData()
Gets the metadata regarding this connection's database. |
DBProtocol |
GetProtocolHandler()
Returns the protocol handler |
int |
getTransactionIsolation()
Gets this Connection's current transaction isolation level. |
java.util.Map |
getTypeMap()
Gets the type map object associated with this connection. |
java.sql.SQLWarning |
getWarnings()
Returns the first warning reported by calls on this Connection NOTE: THIS METHOD IS NOT SUPPORTED BY ALTAIR SERVER |
boolean |
isClosed()
Tests to see if a Connection is closed. |
boolean |
isReadOnly()
Tests to see if the connection is in read-only mode NOTE: THIS METHOD IS NOT SUPPORTED BY ALTAIR SERVER |
java.lang.String |
nativeSQL(java.lang.String strSQL)
Converts the given SQL statement into the system's native SQL grammar. |
java.sql.CallableStatement |
prepareCall(java.lang.String strSQL)
Creates a CallableStatement object for calling database stored procedures. |
java.sql.CallableStatement |
prepareCall(java.lang.String strSQL,
int nResSetype,
int nResSetConcurrency)
Creates a CallableStatement object that will generate ResultSet objects with the given type and concurrency. |
java.sql.CallableStatement |
prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String strSQL)
Creates a PreparedStatement object for sending parameterized SQL statements to the database. |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int autoGeneratedKeys)
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int[] columnIndexes)
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String strSQL,
int nResSetype,
int nResSetConcurrency)
Creates a PreparedStatement object that will generate ResultSet objects with the given type and concurrency. |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
java.lang.String[] columnNames)
|
void |
releaseSavepoint(java.sql.Savepoint savepoint)
|
void |
rollback()
Drops all changes made since the previous commit/rollback and releases any database locks currently held by this Connection. |
void |
rollback(java.sql.Savepoint savepoint)
|
void |
setAutoCommit(boolean bAutoCommit)
Sets this connection's auto-commit mode. |
void |
setCatalog(java.lang.String strCatalog)
Sets a catalog name in order to select a subspace of this Connection's database in which to work. |
void |
setHoldability(int holdability)
|
void |
setReadOnly(boolean bReadOnly)
Puts this connection in read-only mode as a hint to enable database optimizations. |
java.sql.Savepoint |
setSavepoint()
|
java.sql.Savepoint |
setSavepoint(java.lang.String name)
|
void |
setTransactionIsolation(int nLevel)
Attempts to change the transaction isolation level to the one given. |
void |
setTypeMap(java.util.Map map)
Installs the given type map as the type map for this connection. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HWMConnectionDB()
Method Detail |
---|
public void ConnectToServer(java.lang.String strDBInfoClassName, java.lang.String strServer, int nPort, java.lang.String strDBURL, java.lang.String strUser, java.lang.String strPwd, boolean bCreateDB) throws java.lang.Exception
strDBInfoClassName
- The class name for the database info class.strServer
- The server addressnPort
- The port to connect tostrDBURL
- The database URLstrUser
- The user namestrPwd
- The passwordbCreateDB
- A flag indicating if the database should be created
java.lang.Exception
public DBProtocol GetProtocolHandler()
public java.sql.Statement createStatement() throws java.sql.SQLException
createStatement
in interface java.sql.Connection
java.sql.SQLException
- - if a database access error occurspublic java.sql.PreparedStatement prepareStatement(java.lang.String strSQL) throws java.sql.SQLException
prepareStatement
in interface java.sql.Connection
strSQL,
- The parametric SQL statement to execute
java.sql.SQLException
- - if a database access error occurspublic java.sql.Statement createStatement(int nResSetType, int nResSetConcurrency) throws java.sql.SQLException
createStatement
in interface java.sql.Connection
nResSetType
- - a result set type; see ResultSet.TYPE_XXXnResSetConcurrency
- - a concurrency type; see ResultSet.CONCUR_XXX
java.sql.SQLException
- - if a database access error occurspublic java.sql.PreparedStatement prepareStatement(java.lang.String strSQL, int nResSetype, int nResSetConcurrency) throws java.sql.SQLException
prepareStatement
in interface java.sql.Connection
strSQl
- the SQL statementnResSetType
- - a result set type; see ResultSet.TYPE_XXXnResSetConcurrency
- - a concurrency type; see ResultSet.CONCUR_XXX
java.sql.SQLException
- - if a database access error occurspublic void close() throws java.sql.SQLException
close
in interface java.sql.Connection
java.sql.SQLException
- - if a database access error occurspublic boolean isClosed() throws java.sql.SQLException
isClosed
in interface java.sql.Connection
java.sql.SQLException
- - if a database access error occurspublic java.sql.CallableStatement prepareCall(java.lang.String strSQL) throws java.sql.SQLException
prepareCall
in interface java.sql.Connection
strSQL,
- The parametric SQL statement to execute
java.sql.SQLException
- - if a database access error occurspublic java.lang.String nativeSQL(java.lang.String strSQL) throws java.sql.SQLException
nativeSQL
in interface java.sql.Connection
strSQL,
- The SQL statement to convert
java.sql.SQLException
- - if a database access error occurspublic void setAutoCommit(boolean bAutoCommit) throws java.sql.SQLException
setAutoCommit
in interface java.sql.Connection
bAutoCommit
- if true, updates are automatically committed
java.sql.SQLException
- - if a database access error occurspublic boolean getAutoCommit() throws java.sql.SQLException
getAutoCommit
in interface java.sql.Connection
java.sql.SQLException
- - if a database access error occurspublic void commit() throws java.sql.SQLException
commit
in interface java.sql.Connection
java.sql.SQLException
- - if a database access error occurspublic void rollback() throws java.sql.SQLException
rollback
in interface java.sql.Connection
java.sql.SQLException
- - if a database access error occurspublic java.sql.DatabaseMetaData getMetaData() throws java.sql.SQLException
getMetaData
in interface java.sql.Connection
java.sql.SQLException
- - if a database access error occurspublic void setReadOnly(boolean bReadOnly) throws java.sql.SQLException
setReadOnly
in interface java.sql.Connection
bReadOnly
- if true - its read only cxn
java.sql.SQLException
- - if a database access error occurspublic boolean isReadOnly() throws java.sql.SQLException
isReadOnly
in interface java.sql.Connection
java.sql.SQLException
- - if a database access error occurspublic void setCatalog(java.lang.String strCatalog) throws java.sql.SQLException
setCatalog
in interface java.sql.Connection
strCatalog
- The ctalog name
java.sql.SQLException
- - if a database access error occurspublic java.lang.String getCatalog() throws java.sql.SQLException
getCatalog
in interface java.sql.Connection
java.sql.SQLException
- - if a database access error occurspublic void setTransactionIsolation(int nLevel) throws java.sql.SQLException
setTransactionIsolation
in interface java.sql.Connection
nLevel
- one of the TRANSACTION_* isolation values with the
exception of TRANSACTION_NONE; some databases may not
support other values
java.sql.SQLException
- - if a database access error occurspublic int getTransactionIsolation() throws java.sql.SQLException
getTransactionIsolation
in interface java.sql.Connection
java.sql.SQLException
- - if a database access error occurspublic java.sql.SQLWarning getWarnings() throws java.sql.SQLException
getWarnings
in interface java.sql.Connection
java.sql.SQLException
- - if a database access error occurspublic void clearWarnings() throws java.sql.SQLException
clearWarnings
in interface java.sql.Connection
java.sql.SQLException
- - if a database access error occurspublic java.sql.CallableStatement prepareCall(java.lang.String strSQL, int nResSetype, int nResSetConcurrency) throws java.sql.SQLException
prepareCall
in interface java.sql.Connection
strSQl
- the SQL statementnResSetType
- - a result set type; see ResultSet.TYPE_XXXnResSetConcurrency
- - a concurrency type; see ResultSet.CONCUR_XXX
java.sql.SQLException
- - if a database access error occurspublic java.util.Map getTypeMap() throws java.sql.SQLException
getTypeMap
in interface java.sql.Connection
java.sql.SQLException
- - if a database access error occurspublic void setTypeMap(java.util.Map map) throws java.sql.SQLException
setTypeMap
in interface java.sql.Connection
map
- java.util.Map object to install as the replacement for this
Connection object's default type
java.sql.SQLException
- - if a database access error occurspublic int getHoldability() throws java.sql.SQLException
getHoldability
in interface java.sql.Connection
java.sql.SQLException
public void setHoldability(int holdability) throws java.sql.SQLException
setHoldability
in interface java.sql.Connection
java.sql.SQLException
public java.sql.Savepoint setSavepoint() throws java.sql.SQLException
setSavepoint
in interface java.sql.Connection
java.sql.SQLException
public void releaseSavepoint(java.sql.Savepoint savepoint) throws java.sql.SQLException
releaseSavepoint
in interface java.sql.Connection
java.sql.SQLException
public void rollback(java.sql.Savepoint savepoint) throws java.sql.SQLException
rollback
in interface java.sql.Connection
java.sql.SQLException
public java.sql.Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws java.sql.SQLException
createStatement
in interface java.sql.Connection
java.sql.SQLException
public java.sql.CallableStatement prepareCall(java.lang.String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws java.sql.SQLException
prepareCall
in interface java.sql.Connection
java.sql.SQLException
public java.sql.PreparedStatement prepareStatement(java.lang.String sql, int autoGeneratedKeys) throws java.sql.SQLException
prepareStatement
in interface java.sql.Connection
java.sql.SQLException
public java.sql.PreparedStatement prepareStatement(java.lang.String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws java.sql.SQLException
prepareStatement
in interface java.sql.Connection
java.sql.SQLException
public java.sql.PreparedStatement prepareStatement(java.lang.String sql, int[] columnIndexes) throws java.sql.SQLException
prepareStatement
in interface java.sql.Connection
java.sql.SQLException
public java.sql.Savepoint setSavepoint(java.lang.String name) throws java.sql.SQLException
setSavepoint
in interface java.sql.Connection
java.sql.SQLException
public java.sql.PreparedStatement prepareStatement(java.lang.String sql, java.lang.String[] columnNames) throws java.sql.SQLException
prepareStatement
in interface java.sql.Connection
java.sql.SQLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |