Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.hsqldb
Class Session  view Session download Session.java

java.lang.Object
  extended byorg.hsqldb.Session

class Session
extends java.lang.Object

Implementation of a user session with the database.

Version:
1.7.0

Field Summary
private  boolean bAutoCommit
           
private  boolean bClosed
           
private  boolean bNestedOldAutoCommit
           
private  boolean bNestedTransaction
           
private  boolean bReadOnly
           
private  Database dDatabase
           
private  java.util.Hashtable hSavepoints
           
private  int iId
           
private  int iLastIdentity
           
private  int iMaxRows
           
private  int iNestedOldTransIndex
           
private  jdbcConnection intConnection
           
private  boolean script
           
private  java.util.Vector tTransaction
           
private  User uUser
           
 
Constructor Summary
(package private) Session(Database db, User user, boolean autocommit, boolean readonly, int id)
          Constructor declaration
(package private) Session(Session c, int id)
          Constructor declaration
 
Method Summary
(package private)  void addTransactionDelete(Table table, java.lang.Object[] row)
          Method declaration
(package private)  void addTransactionInsert(Table table, java.lang.Object[] row)
          Method declaration
(package private)  void beginNestedTransaction()
          Method declaration
(package private)  void check(java.lang.String object, int right)
          Method declaration
(package private)  void checkAdmin()
          Method declaration
(package private)  void checkReadWrite()
          Method declaration
(package private)  void commit()
          Method declaration
(package private)  void disconnect()
          Method declaration
(package private)  void endNestedTransaction(boolean rollback)
          Method declaration
 void finalize()
          closes the session.
(package private)  boolean getAutoCommit()
          Method declaration
(package private)  Database getDatabase()
          Method declaration
(package private)  int getId()
          Method declaration
(package private)  jdbcConnection getInternalConnection()
           
(package private)  int getLastIdentity()
          Method declaration
(package private)  int getMaxRows()
          Method declaration
(package private)  boolean getScripting()
           
(package private)  java.lang.String getUsername()
          Method declaration
(package private)  boolean isClosed()
          Method declaration
(package private)  boolean isNestedTransaction()
          Method declaration
(package private)  boolean isReadOnly()
          Method declaration
(package private)  void rollback()
          Method declaration
(package private)  void rollbackToSavepoint(java.lang.String name)
          Implements a partial transaction ROLLBACK.
(package private)  void savepoint(java.lang.String name)
          Implements a transaction SAVEPOIINT.
(package private)  void setAutoCommit(boolean autocommit)
          Method declaration
(package private)  void setLastIdentity(int i)
          Method declaration
(package private)  void setMaxRows(int max)
          Method declaration
(package private)  void setPassword(java.lang.String s)
          Method declaration
(package private)  void setReadOnly(boolean readonly)
          Method declaration
(package private)  void setScripting(boolean script)
          A switch to set scripting on the basis of type of statement executed.
(package private)  void setUser(User user)
          Method declaration
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dDatabase

private Database dDatabase

uUser

private User uUser

tTransaction

private java.util.Vector tTransaction

bAutoCommit

private boolean bAutoCommit

bNestedTransaction

private boolean bNestedTransaction

bNestedOldAutoCommit

private boolean bNestedOldAutoCommit

iNestedOldTransIndex

private int iNestedOldTransIndex

bReadOnly

private boolean bReadOnly

iMaxRows

private int iMaxRows

iLastIdentity

private int iLastIdentity

bClosed

private boolean bClosed

iId

private int iId

hSavepoints

private java.util.Hashtable hSavepoints

script

private boolean script

intConnection

private jdbcConnection intConnection
Constructor Detail

Session

Session(Session c,
        int id)
Constructor declaration


Session

Session(Database db,
        User user,
        boolean autocommit,
        boolean readonly,
        int id)
Constructor declaration

Method Detail

finalize

public void finalize()
              throws java.sql.SQLException
closes the session.


getId

int getId()
Method declaration


disconnect

void disconnect()
          throws java.sql.SQLException
Method declaration


isClosed

boolean isClosed()
Method declaration


setLastIdentity

void setLastIdentity(int i)
Method declaration


getLastIdentity

int getLastIdentity()
Method declaration


getDatabase

Database getDatabase()
Method declaration


getUsername

java.lang.String getUsername()
Method declaration


setUser

void setUser(User user)
Method declaration


checkAdmin

void checkAdmin()
          throws java.sql.SQLException
Method declaration


check

void check(java.lang.String object,
           int right)
     throws java.sql.SQLException
Method declaration


checkReadWrite

void checkReadWrite()
              throws java.sql.SQLException
Method declaration


setPassword

void setPassword(java.lang.String s)
Method declaration


addTransactionDelete

void addTransactionDelete(Table table,
                          java.lang.Object[] row)
                    throws java.sql.SQLException
Method declaration


addTransactionInsert

void addTransactionInsert(Table table,
                          java.lang.Object[] row)
                    throws java.sql.SQLException
Method declaration


setAutoCommit

void setAutoCommit(boolean autocommit)
             throws java.sql.SQLException
Method declaration


commit

void commit()
      throws java.sql.SQLException
Method declaration


rollback

void rollback()
        throws java.sql.SQLException
Method declaration


savepoint

void savepoint(java.lang.String name)
         throws java.sql.SQLException
Implements a transaction SAVEPOIINT. Application may do a partial rollback by calling rollbackToSavepoint()


rollbackToSavepoint

void rollbackToSavepoint(java.lang.String name)
                   throws java.sql.SQLException
Implements a partial transaction ROLLBACK.


beginNestedTransaction

void beginNestedTransaction()
                      throws java.sql.SQLException
Method declaration


endNestedTransaction

void endNestedTransaction(boolean rollback)
                    throws java.sql.SQLException
Method declaration


setReadOnly

void setReadOnly(boolean readonly)
Method declaration


isReadOnly

boolean isReadOnly()
Method declaration


setMaxRows

void setMaxRows(int max)
Method declaration


getMaxRows

int getMaxRows()
Method declaration


isNestedTransaction

boolean isNestedTransaction()
Method declaration


getAutoCommit

boolean getAutoCommit()
Method declaration


setScripting

void setScripting(boolean script)
A switch to set scripting on the basis of type of statement executed. A method in Database.jave sets this value to false before other methods are called to act on an SQL statement, which may set this to true. Afterwards the method reponsible for logging uses getScripting() to determine if logging is required for the executed statement. (fredt@users)


getScripting

boolean getScripting()

getInternalConnection

jdbcConnection getInternalConnection()
                               throws java.sql.SQLException