Java Doc for Session.java in  » Database-DBMS » Quadcap-Embeddable-Database » com » quadcap » sql » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database DBMS » Quadcap Embeddable Database » com.quadcap.sql 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.quadcap.sql.Session

Session
public class Session (Code)
Analagous (and mapped onto) a JDBC Statement, this class maintains state and locks on behalf of a single session.
author:
   Stan Bailes


Field Summary
 byte[]buf8
    
 Listcursors
    
 Databasedb
    
static  intlastId
    
 longlastInsertId
    
 ObjectOutputStreamoos
    
 Objectplock
    
 ConnectionqConn
    
 ResultSetrs
    
 intsessionIndex
    
 HashtablestmtContext
    
 intstmtId
    
 ListstmtPendingActions
    
 intupdateCount
    
 booleanviewCheck
    

Constructor Summary
 Session(Connection conn, int sessionIndex)
    

Method Summary
final  voidaddCursor(Cursor c)
     Another cursor created for this session, which we need to keep track of.
final  voidaddPendingAction(LogStep action)
     An action to be executed once the currently open cursors are closed.
final public  voidbeginStatement()
    
public  voidclearViewCheck()
    
final public  voidclose()
    
final  voidcloseCursors(boolean abort)
    
final  voidcloseResultSet()
     When a statement is initiated on a connection, any previous result set open on that connection is implicitly closed.
final  voiddecrUpdateCount()
    
final  voiddoPendingActions()
    
final public  voiddoStatement(Stmt s)
     Execute a single SQL statement.
final public  voiddoStep(LogStep s)
    
final public  voidendStatement(boolean abort)
     Called to conclude the execution of this statement.
final  voidfinishContexts(Hashtable context, boolean abort)
     Each context object represents some state retained on behalf of a constraint.
final public  byte[]getBuf8(long l)
    
final public  ConnectiongetConnection()
    
final  StatementContextgetContext(Object obj, boolean deferrable)
     Return the requested statement context.
final public  DatabasegetDatabase()
    
final public  BlockFilegetFile()
    
public  longgetLastInsertId()
    
final public  LoggetLog()
    
final  RandomgetRandom()
    
final  ResultSetgetResultSet()
    
final public  ResultSetgetResultSet(Statement stmt)
    
public  intgetSessionId()
    
public  intgetStmtId()
    
final public  voidgetTableReadLock(String tableName)
    
final public  voidgetTableWriteLock(String tableName)
    
final public  TransactiongetTransaction()
    
final public  longgetTransactionId()
    
final public  intgetUpdateCount()
    
public  booleangetViewCheck()
    
public  booleaninRecovery()
    
final  voidincrUpdateCount()
    
final  BtreemakeTempTree(Comparator compare)
    
final  BtreemakeTempTree()
    
final public  longmakeTransaction()
    
final  voidputContext(Object key, boolean deferrable, StatementContext val)
     Add a new context...
final  voidrollbackStatement()
     Statement-level abort.
final  voidsetLastInsertId(long insid)
    
final  voidsetResultSet(QedResultSet rs)
    
final  voidsetUpdateCount(int c)
    
public  voidsetViewCheck()
    
public  StringtoString()
    

Field Detail
buf8
byte[] buf8(Code)
A buffer private to this session for formatting rowIds



cursors
List cursors(Code)



db
Database db(Code)



lastId
static int lastId(Code)



lastInsertId
long lastInsertId(Code)



oos
ObjectOutputStream oos(Code)



plock
Object plock(Code)



qConn
Connection qConn(Code)



rs
ResultSet rs(Code)



sessionIndex
int sessionIndex(Code)
my position in qConn.sessions



stmtContext
Hashtable stmtContext(Code)



stmtId
int stmtId(Code)



stmtPendingActions
List stmtPendingActions(Code)



updateCount
int updateCount(Code)



viewCheck
boolean viewCheck(Code)




Constructor Detail
Session
Session(Connection conn, int sessionIndex)(Code)
Construct a new session for the specified database with the specified authorization
Parameters:
  db - the database
Parameters:
  auth - the authorization id




Method Detail
addCursor
final void addCursor(Cursor c)(Code)
Another cursor created for this session, which we need to keep track of.



addPendingAction
final void addPendingAction(LogStep action)(Code)
An action to be executed once the currently open cursors are closed.



beginStatement
final public void beginStatement() throws IOException(Code)



clearViewCheck
public void clearViewCheck()(Code)



close
final public void close() throws SQLException, IOException(Code)
Close this session



closeCursors
final void closeCursors(boolean abort) throws SQLException, IOException(Code)
Close any open cursors, aborting or commiting the current transaction



closeResultSet
final void closeResultSet()(Code)
When a statement is initiated on a connection, any previous result set open on that connection is implicitly closed.



decrUpdateCount
final void decrUpdateCount()(Code)



doPendingActions
final void doPendingActions() throws SQLException, IOException(Code)
At transaction end, execute all of the pending actions



doStatement
final public void doStatement(Stmt s) throws IOException, SQLException(Code)
Execute a single SQL statement.



doStep
final public void doStep(LogStep s) throws SQLException, IOException(Code)
Log and execute the given unit of work for this session



endStatement
final public void endStatement(boolean abort) throws IOException, SQLException(Code)
Called to conclude the execution of this statement.
Parameters:
  abort - if true, we perform statement-levelrollback, otherwise we conclude the statement (possiblycommitting the results if autoCommit is true.



finishContexts
final void finishContexts(Hashtable context, boolean abort) throws SQLException, IOException(Code)
Each context object represents some state retained on behalf of a constraint. The 'finish()' method of the context is used to perform any constraint-specific processing at the end of a statement/transaction.



getBuf8
final public byte[] getBuf8(long l)(Code)



getConnection
final public Connection getConnection()(Code)
Accessor for my connection



getContext
final StatementContext getContext(Object obj, boolean deferrable)(Code)
Return the requested statement context.
Parameters:
  obj - is the key which uniquely identifies the context
Parameters:
  deferrable - is true if this context's execution canbe deferred until after the current statement.



getDatabase
final public Database getDatabase()(Code)
Accessor for my database



getFile
final public BlockFile getFile()(Code)
Accessor for my file



getLastInsertId
public long getLastInsertId()(Code)
Return the session's "LAST INSERT ID"



getLog
final public Log getLog()(Code)
Accessor for my logger



getRandom
final Random getRandom()(Code)
Accessor for my 'Random' object



getResultSet
final ResultSet getResultSet()(Code)
Return the result set associated with this session



getResultSet
final public ResultSet getResultSet(Statement stmt)(Code)
Return the result set associated with this session, after making sure that the the result set is bound to my Statement!



getSessionId
public int getSessionId()(Code)
Return my session id



getStmtId
public int getStmtId()(Code)
Return the current statement number



getTableReadLock
final public void getTableReadLock(String tableName) throws SQLException, IOException(Code)
Helper routine to obtain a read lock on the specified table



getTableWriteLock
final public void getTableWriteLock(String tableName) throws SQLException, IOException(Code)
Helper routine to obtain a write lock on the specified table



getTransaction
final public Transaction getTransaction()(Code)
Accessor for my transaction (lazy)



getTransactionId
final public long getTransactionId()(Code)
Accessor for my transaction id (lazy)



getUpdateCount
final public int getUpdateCount()(Code)
Return the session update count



getViewCheck
public boolean getViewCheck()(Code)



inRecovery
public boolean inRecovery() throws IOException(Code)



incrUpdateCount
final void incrUpdateCount()(Code)



makeTempTree
final Btree makeTempTree(Comparator compare) throws IOException(Code)
Create a temporary btree with the specified comparator



makeTempTree
final Btree makeTempTree() throws IOException(Code)
Create a temporary btree with the default comparator



makeTransaction
final public long makeTransaction() throws SQLException(Code)
Return the transaction id, starting a new transaction if necessary



putContext
final void putContext(Object key, boolean deferrable, StatementContext val)(Code)
Add a new context...



rollbackStatement
final void rollbackStatement() throws IOException, SQLException(Code)
Statement-level abort. The current statement has failed, but the transaction as a whole is still ongoing, so only the effects of the current statement so far should be undone.



setLastInsertId
final void setLastInsertId(long insid)(Code)
Set the session's "LAST INSERT ID"



setResultSet
final void setResultSet(QedResultSet rs)(Code)



setUpdateCount
final void setUpdateCount(int c)(Code)



setViewCheck
public void setViewCheck()(Code)



toString
public String toString()(Code)
Return a string representation for debugging



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.