All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class bank.storage.JdbcSession

java.lang.Object
   |
   +----bank.storage.JdbcSession

public class JdbcSession
extends Object
JDBCへの接続、切断を簡単に行うためのクラス 1インスタンスが、RDBに対する1接続を表現する。(セッションと呼んでいる) #pattern: Facade


Variable Index

 o connection
 o dbLocation
 o driverKind
 o isAutoCommit
 o isVerbose
 o preparedStatement
 o resultSet
 o statement

Constructor Index

 o JdbcSession()
 o JdbcSession(String)
 o JdbcSession(String, String)

Method Index

 o beAutoCommit(boolean)
 o beVerbose(boolean)
 o commit()
 o end()
 o executeQuery()
 o executeQuery(String)
 o executeUpdate()
 o executeUpdate(String)
 o finalize()
 o getConnection()
 o getDbLocation()
 o getDriverKind()
 o getStatement()
 o reportError(SQLException)
 o rollback()
 o setDbLocation(String)
 o setDriverKind(String)
 o start(String, String)

Variables

 o dbLocation
 protected String dbLocation
 o driverKind
 protected String driverKind
 o connection
 protected Connection connection
 o statement
 protected Statement statement
 o preparedStatement
 protected PreparedStatement preparedStatement
 o resultSet
 protected ResultSet resultSet
 o isAutoCommit
 protected boolean isAutoCommit
 o isVerbose
 protected boolean isVerbose

Constructors

 o JdbcSession
 public JdbcSession()
 o JdbcSession
 public JdbcSession(String dbUrl)
Parameters:
dBurl - java.lang.String
 o JdbcSession
 public JdbcSession(String driverKind,
                    String dbLocation)
Parameters:
dbUrl - java.lang.String
driverKind - java.lang.String

Methods

 o beAutoCommit
 public void beAutoCommit(boolean trueOrNot)
 o beVerbose
 public void beVerbose(boolean trueOrNot)
 o commit
 public void commit() throws SQLException
 o end
 public void end()
 o executeQuery
 public ResultSet executeQuery() throws SQLException
 o executeQuery
 public ResultSet executeQuery(String query) throws SQLException
 o executeUpdate
 public int executeUpdate() throws SQLException
 o executeUpdate
 public int executeUpdate(String query) throws SQLException
 o finalize
 public void finalize() throws Throwable
Overrides:
finalize in class Object
 o getConnection
 public Connection getConnection()
 o getDbLocation
 public String getDbLocation()
Returns:
java.lang.String
 o getDriverKind
 public String getDriverKind()
Returns:
java.lang.String
 o getStatement
 public Statement getStatement()
 o reportError
 protected void reportError(SQLException e)
Parameters:
e - java.sql.SQLException
 o rollback
 public void rollback() throws SQLException
 o setDbLocation
 public void setDbLocation(String dbLocation)
Parameters:
driverKind - java.lang.String
 o setDriverKind
 public void setDriverKind(String driverKind)
Parameters:
driverKind - java.lang.String
 o start
 public void start(String username,
                   String passwd) throws SQLException

All Packages  Class Hierarchy  This Package  Previous  Next  Index