|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.altair.hwm.comm.database.DBServerComm
public class DBServerComm
Title: DBServerComm
Description: The communication object for database interactions
* 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 | |
|---|---|
DBServerComm(HWMCommMgr hwmCommMgr,
java.lang.String strSessionName)
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 |
Connect(java.lang.String strAddress,
int nPort)
Establishes connection with the server |
void |
Connect(java.lang.String strAddress,
int nPort,
java.lang.String strDBName)
Connect to server NOTE: Use "Connect" which takes the driver name, URL, port, user name and password. |
void |
Connect(java.lang.String strDBType,
java.lang.String strAddress,
int nPort,
java.lang.String strDBName,
java.lang.String strUser,
java.lang.String strPwd,
boolean bCreate)
Connect to server. |
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)
|
void |
Disconnect()
Disconnect from server |
boolean |
getAutoCommit()
Gets the current auto-commit state. |
java.lang.String |
getCatalog()
Returns the Connection's current catalog name. |
java.sql.Connection |
GetConnection()
Get the connection to the database (or server) |
HWMDatabaseInfo |
GetDBInfo()
Returns the DB info class being used. |
HWMDBModel |
GetDBModel()
|
int |
getHoldability()
|
java.sql.DatabaseMetaData |
getMetaData()
Gets the metadata regarding this connection's database. |
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 |
boolean |
isClosed()
Tests to see if a Connection is closed. |
boolean |
isReadOnly()
Tests to see if the connection is in read-only mode |
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)
|
HWMDBModel |
RetrieveDataModel()
Retrieve the data model from the server |
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. |
void |
StoreDataModel(HWMDBModel hwmDataModel)
Store the data model in the server |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DBServerComm(HWMCommMgr hwmCommMgr,
java.lang.String strSessionName)
| Method Detail |
|---|
public java.sql.Connection GetConnection()
public void Connect(java.lang.String strAddress,
int nPort)
throws java.lang.Exception
Connect in interface HWMCommstrAddress - The address of the servernPort - The port number to which to connect to
IOException, - UnknownHostException
java.lang.Exception
public void Connect(java.lang.String strAddress,
int nPort,
java.lang.String strDBName)
throws java.lang.Exception
strAddress - The address/URL for the servernPort - The port # which is required only for Altair's DB server for
QED
java.lang.Exception
public void Connect(java.lang.String strDBType,
java.lang.String strAddress,
int nPort,
java.lang.String strDBName,
java.lang.String strUser,
java.lang.String strPwd,
boolean bCreate)
throws java.lang.Exception
strDBType - The type of database being used. Can be one of the
DBTYPE_XXX in HWMDatabaseInfo class.strAddress - The address/URL for the servernPort - The port # at the server on which the DB server is listening
for clientsstrDBName - The database name to connect tostrUser - The user namestrPwd - The password for the userbCreate - If true, the database is created. This will work only if
the driver vendor has provided a method to create a database
java.lang.Exceptionpublic void Disconnect()
Disconnect in interface HWMCommpublic HWMDatabaseInfo GetDBInfo()
public void StoreDataModel(HWMDBModel hwmDataModel)
throws java.lang.Exception
hwmDataModel - The data model class
java.lang.Exception
public HWMDBModel RetrieveDataModel()
throws java.lang.Exception
java.lang.Exceptionpublic HWMDBModel GetDBModel()
public java.sql.Statement createStatement()
throws java.sql.SQLException
createStatement in interface java.sql.Connectionjava.sql.SQLException - - if a database access error occurs
public java.sql.PreparedStatement prepareStatement(java.lang.String strSQL)
throws java.sql.SQLException
prepareStatement in interface java.sql.ConnectionstrSQL, - The parametric SQL statement to execute
java.sql.SQLException - - if a database access error occurs
public java.sql.CallableStatement prepareCall(java.lang.String strSQL)
throws java.sql.SQLException
prepareCall in interface java.sql.ConnectionstrSQL, - The parametric SQL statement to execute
java.sql.SQLException - - if a database access error occurs
public java.lang.String nativeSQL(java.lang.String strSQL)
throws java.sql.SQLException
nativeSQL in interface java.sql.ConnectionstrSQL, - The SQL statement to convert
java.sql.SQLException - - if a database access error occurs
public void setAutoCommit(boolean bAutoCommit)
throws java.sql.SQLException
setAutoCommit in interface java.sql.ConnectionbAutoCommit - if true, updates are automatically committed
java.sql.SQLException - - if a database access error occurs
public boolean getAutoCommit()
throws java.sql.SQLException
getAutoCommit in interface java.sql.Connectionjava.sql.SQLException - - if a database access error occurs
public void commit()
throws java.sql.SQLException
commit in interface java.sql.Connectionjava.sql.SQLException - - if a database access error occurs
public void rollback()
throws java.sql.SQLException
rollback in interface java.sql.Connectionjava.sql.SQLException - - if a database access error occurs
public void close()
throws java.sql.SQLException
close in interface java.sql.Connectionjava.sql.SQLException - - if a database access error occurs
public boolean isClosed()
throws java.sql.SQLException
isClosed in interface java.sql.Connectionjava.sql.SQLException - - if a database access error occurs
public java.sql.DatabaseMetaData getMetaData()
throws java.sql.SQLException
getMetaData in interface java.sql.Connectionjava.sql.SQLException - - if a database access error occurs
public void setReadOnly(boolean bReadOnly)
throws java.sql.SQLException
setReadOnly in interface java.sql.ConnectionbReadOnly - if true - its read only cxn
java.sql.SQLException - - if a database access error occurs
public boolean isReadOnly()
throws java.sql.SQLException
isReadOnly in interface java.sql.Connectionjava.sql.SQLException - - if a database access error occurs
public void setCatalog(java.lang.String strCatalog)
throws java.sql.SQLException
setCatalog in interface java.sql.ConnectionstrCatalog - The ctalog name
java.sql.SQLException - - if a database access error occurs
public java.lang.String getCatalog()
throws java.sql.SQLException
getCatalog in interface java.sql.Connectionjava.sql.SQLException - - if a database access error occurs
public void setTransactionIsolation(int nLevel)
throws java.sql.SQLException
setTransactionIsolation in interface java.sql.ConnectionnLevel - 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 occurs
public int getTransactionIsolation()
throws java.sql.SQLException
getTransactionIsolation in interface java.sql.Connectionjava.sql.SQLException - - if a database access error occurs
public java.sql.SQLWarning getWarnings()
throws java.sql.SQLException
getWarnings in interface java.sql.Connectionjava.sql.SQLException - - if a database access error occurs
public void clearWarnings()
throws java.sql.SQLException
clearWarnings in interface java.sql.Connectionjava.sql.SQLException - - if a database access error occurs
public java.sql.Statement createStatement(int nResSetType,
int nResSetConcurrency)
throws java.sql.SQLException
createStatement in interface java.sql.ConnectionnResSetType - - a result set type; see ResultSet.TYPE_XXXnResSetConcurrency - - a concurrency type; see ResultSet.CONCUR_XXX
java.sql.SQLException - - if a database access error occurs
public java.sql.PreparedStatement prepareStatement(java.lang.String strSQL,
int nResSetype,
int nResSetConcurrency)
throws java.sql.SQLException
prepareStatement in interface java.sql.ConnectionstrSQl - 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 occurs
public java.sql.CallableStatement prepareCall(java.lang.String strSQL,
int nResSetype,
int nResSetConcurrency)
throws java.sql.SQLException
prepareCall in interface java.sql.ConnectionstrSQl - 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 occurs
public java.util.Map getTypeMap()
throws java.sql.SQLException
getTypeMap in interface java.sql.Connectionjava.sql.SQLException - - if a database access error occurs
public void setTypeMap(java.util.Map map)
throws java.sql.SQLException
setTypeMap in interface java.sql.Connectionmap - java.util.Map object to install as the replacement for this
Connection object's default type
java.sql.SQLException - - if a database access error occurs
public int getHoldability()
throws java.sql.SQLException
getHoldability in interface java.sql.Connectionjava.sql.SQLException
public void setHoldability(int holdability)
throws java.sql.SQLException
setHoldability in interface java.sql.Connectionjava.sql.SQLException
public java.sql.Savepoint setSavepoint()
throws java.sql.SQLException
setSavepoint in interface java.sql.Connectionjava.sql.SQLException
public void releaseSavepoint(java.sql.Savepoint savepoint)
throws java.sql.SQLException
releaseSavepoint in interface java.sql.Connectionjava.sql.SQLException
public void rollback(java.sql.Savepoint savepoint)
throws java.sql.SQLException
rollback in interface java.sql.Connectionjava.sql.SQLException
public java.sql.Statement createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws java.sql.SQLException
createStatement in interface java.sql.Connectionjava.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.Connectionjava.sql.SQLException
public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int autoGeneratedKeys)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionjava.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.Connectionjava.sql.SQLException
public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int[] columnIndexes)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionjava.sql.SQLException
public java.sql.Savepoint setSavepoint(java.lang.String name)
throws java.sql.SQLException
setSavepoint in interface java.sql.Connectionjava.sql.SQLException
public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
java.lang.String[] columnNames)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionjava.sql.SQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||