i-net Konnekter

com.inet.jj.cli
Class JJConnection

java.lang.Object
  extended bycom.inet.jj.cli.JJConnection
All Implemented Interfaces:
java.sql.Connection

public class JJConnection
extends java.lang.Object
implements java.sql.Connection

The JJConnection class is a implementation of the java.sql.Connection interface.
Connection objects obtained from i-net Konnekter can be cast to this class to access i-net Konnekter - specific methods or to use JDBC 2.0 features under Java 1.1.x.
E.g. JJConnection con = (JJConnection)DriverManager.getConnection(..)

Below listed the i-net Konnekter - specific methods different from the JDBC API.


Field Summary
 
Fields inherited from interface java.sql.Connection
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE
 
Method Summary
 void clearWarnings()
           
 void close()
           
 void commit()
           
 java.sql.Statement createStatement()
           
 java.sql.Statement createStatement(int resultSetType, int resultSetConcurrency)
           
 void finalize()
           
 boolean getAutoCommit()
           
 java.lang.String getCatalog()
           
 java.lang.String getClientHostName()
          Returns the client host name.
 java.sql.DatabaseMetaData getMetaData()
           
 int getTransactionIsolation()
           
 java.util.Map getTypeMap()
           
 java.sql.SQLWarning getWarnings()
           
 boolean isClosed()
           
 boolean isReadOnly()
           
 java.lang.String nativeSQL(java.lang.String sql)
           
 java.sql.CallableStatement prepareCall(java.lang.String sql)
           
 java.sql.CallableStatement prepareCall(java.lang.String sql, int resultSetType, int resultSetConcurrency)
           
 java.sql.CallableStatement prepareCallCommand(java.lang.String cmd, int paramCount)
          Creates a new CallableStatement object for the specified command stored on the server.
 java.sql.CallableStatement prepareCallCommand(java.lang.String cmd, int paramCount, int resultSetType, int resultSetConcurrency)
          Creates a CallableStatement object for the specified command stored on the server that will generate ResultSet objects with the given type and concurrency.
 java.sql.PreparedStatement prepareCommand(java.lang.String cmd, int paramCount)
          Creates a new PreparedStatement object for the specified command stored on the server.
 java.sql.PreparedStatement prepareCommand(java.lang.String cmd, int paramCount, int resultSetType, int resultSetConcurrency)
          Creates a new PreparedStatement object for the specified command stored on the server.
 java.sql.PreparedStatement prepareStatement(java.lang.String sql)
           
 java.sql.PreparedStatement prepareStatement(java.lang.String sql, int resultSetType, int resultSetConcurrency)
           
 void rollback()
           
 void setAutoCommit(boolean autoCommit)
           
 void setCatalog(java.lang.String catalog)
           
 void setReadOnly(boolean readOnly)
           
 void setTransactionIsolation(int level)
           
 void setTypeMap(java.util.Map map)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.sql.Connection
createStatement, getHoldability, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, setHoldability, setSavepoint, setSavepoint
 

Method Detail

clearWarnings

public void clearWarnings()
                   throws java.sql.SQLException
Specified by:
clearWarnings in interface java.sql.Connection
Throws:
java.sql.SQLException

close

public void close()
Specified by:
close in interface java.sql.Connection

finalize

public void finalize()

commit

public void commit()
            throws java.sql.SQLException
Specified by:
commit in interface java.sql.Connection
Throws:
java.sql.SQLException

createStatement

public java.sql.Statement createStatement(int resultSetType,
                                          int resultSetConcurrency)
                                   throws java.sql.SQLException
Specified by:
createStatement in interface java.sql.Connection
Throws:
java.sql.SQLException

createStatement

public java.sql.Statement createStatement()
                                   throws java.sql.SQLException
Specified by:
createStatement in interface java.sql.Connection
Throws:
java.sql.SQLException

getAutoCommit

public boolean getAutoCommit()
                      throws java.sql.SQLException
Specified by:
getAutoCommit in interface java.sql.Connection
Throws:
java.sql.SQLException

getCatalog

public java.lang.String getCatalog()
                            throws java.sql.SQLException
Specified by:
getCatalog in interface java.sql.Connection
Throws:
java.sql.SQLException

getMetaData

public java.sql.DatabaseMetaData getMetaData()
                                      throws java.sql.SQLException
Specified by:
getMetaData in interface java.sql.Connection
Throws:
java.sql.SQLException

getTransactionIsolation

public int getTransactionIsolation()
                            throws java.sql.SQLException
Specified by:
getTransactionIsolation in interface java.sql.Connection
Throws:
java.sql.SQLException

getTypeMap

public java.util.Map getTypeMap()
                         throws java.sql.SQLException
Specified by:
getTypeMap in interface java.sql.Connection
Throws:
java.sql.SQLException

getWarnings

public java.sql.SQLWarning getWarnings()
                                throws java.sql.SQLException
Specified by:
getWarnings in interface java.sql.Connection
Throws:
java.sql.SQLException

isClosed

public boolean isClosed()
Specified by:
isClosed in interface java.sql.Connection

isReadOnly

public boolean isReadOnly()
                   throws java.sql.SQLException
Specified by:
isReadOnly in interface java.sql.Connection
Throws:
java.sql.SQLException

nativeSQL

public java.lang.String nativeSQL(java.lang.String sql)
                           throws java.sql.SQLException
Specified by:
nativeSQL in interface java.sql.Connection
Throws:
java.sql.SQLException

prepareCall

public java.sql.CallableStatement prepareCall(java.lang.String sql,
                                              int resultSetType,
                                              int resultSetConcurrency)
                                       throws java.sql.SQLException
Specified by:
prepareCall in interface java.sql.Connection
Throws:
java.sql.SQLException

prepareCallCommand

public java.sql.CallableStatement prepareCallCommand(java.lang.String cmd,
                                                     int paramCount,
                                                     int resultSetType,
                                                     int resultSetConcurrency)
                                              throws java.sql.SQLException
Creates a CallableStatement object for the specified command stored on the server that will generate ResultSet objects with the given type and concurrency.

Parameters:
cmd - the command's name.
paramCount - the number of parameters which must be supplied for this command.
resultSetType - a result set type; see ResultSet.TYPE_XXX
resultSetConcurrency - a concurrency type; see ResultSet.CONCUR_XXX
Returns:
a new CallableStatement object.
Throws:
java.sql.SQLException - if a database access error occurs
See Also:
prepareCallCommand(String, int), JJServer.addCommand(String, String), JJServer.addCommand(String, JavaCommandFactory)

prepareCall

public java.sql.CallableStatement prepareCall(java.lang.String sql)
                                       throws java.sql.SQLException
Specified by:
prepareCall in interface java.sql.Connection
Throws:
java.sql.SQLException

prepareCallCommand

public java.sql.CallableStatement prepareCallCommand(java.lang.String cmd,
                                                     int paramCount)
                                              throws java.sql.SQLException
Creates a new CallableStatement object for the specified command stored on the server.

Parameters:
cmd - the command's name.
paramCount - the number of parameters which must be supplied for this command.
Returns:
a new CallableStatement object.
Throws:
java.sql.SQLException - if a database access error occurs
See Also:
prepareCallCommand(String, int, int, int), JJServer.addCommand(String, String), JJServer.addCommand(String, JavaCommandFactory)

prepareStatement

public java.sql.PreparedStatement prepareStatement(java.lang.String sql)
                                            throws java.sql.SQLException
Specified by:
prepareStatement in interface java.sql.Connection
Throws:
java.sql.SQLException

prepareCommand

public java.sql.PreparedStatement prepareCommand(java.lang.String cmd,
                                                 int paramCount)
                                          throws java.sql.SQLException
Creates a new PreparedStatement object for the specified command stored on the server.

Parameters:
cmd - the command's name.
paramCount - the number of parameters which must be supplied for this command.
Returns:
a new PreparedStatement object.
Throws:
java.sql.SQLException - if a database access error occurs
See Also:
prepareCommand(String, int, int, int), JJServer.addCommand(String, String), JJServer.addCommand(String, JavaCommandFactory)

prepareStatement

public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
                                                   int resultSetType,
                                                   int resultSetConcurrency)
                                            throws java.sql.SQLException
Specified by:
prepareStatement in interface java.sql.Connection
Throws:
java.sql.SQLException

prepareCommand

public java.sql.PreparedStatement prepareCommand(java.lang.String cmd,
                                                 int paramCount,
                                                 int resultSetType,
                                                 int resultSetConcurrency)
                                          throws java.sql.SQLException
Creates a new PreparedStatement object for the specified command stored on the server. that will generate ResultSet objects with the given type and concurrency.

Parameters:
cmd - the command's name.
paramCount - the number of parameters which must be supplied for this command.
resultSetType - a result set type; see ResultSet.TYPE_XXX
resultSetConcurrency - a concurrency type; see ResultSet.CONCUR_XXX
Returns:
a new PreparedStatement object.
Throws:
java.sql.SQLException - if a database access error occurs
See Also:
prepareCommand(String, int, int, int), JJServer.addCommand(String, String), JJServer.addCommand(String, JavaCommandFactory)

rollback

public void rollback()
              throws java.sql.SQLException
Specified by:
rollback in interface java.sql.Connection
Throws:
java.sql.SQLException

setAutoCommit

public void setAutoCommit(boolean autoCommit)
                   throws java.sql.SQLException
Specified by:
setAutoCommit in interface java.sql.Connection
Throws:
java.sql.SQLException

setCatalog

public void setCatalog(java.lang.String catalog)
                throws java.sql.SQLException
Specified by:
setCatalog in interface java.sql.Connection
Throws:
java.sql.SQLException

setReadOnly

public void setReadOnly(boolean readOnly)
                 throws java.sql.SQLException
Specified by:
setReadOnly in interface java.sql.Connection
Throws:
java.sql.SQLException

setTransactionIsolation

public void setTransactionIsolation(int level)
                             throws java.sql.SQLException
Specified by:
setTransactionIsolation in interface java.sql.Connection
Throws:
java.sql.SQLException

setTypeMap

public void setTypeMap(java.util.Map map)
                throws java.sql.SQLException
Specified by:
setTypeMap in interface java.sql.Connection
Throws:
java.sql.SQLException

getClientHostName

public java.lang.String getClientHostName()
                                   throws java.sql.SQLException
Returns the client host name.

Throws:
java.sql.SQLException

i-net Konnekter


copyright by i-net software