Java Doc for Session.java in  » Database-Client » squirrel-sql-2.6.5a » net » sourceforge » squirrel_sql » client » session » 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 Client » squirrel sql 2.6.5a » net.sourceforge.squirrel_sql.client.session 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   net.sourceforge.squirrel_sql.client.session.Session

Session
class Session implements ISession(Code)
Think of a session as being the users view of the database. IE it includes the database connection and the UI.
author:
   Colin Bell



Constructor Summary
public  Session(IApplication app, ISQLDriver driver, SQLAlias alias, SQLConnection conn, String user, String password, IIdentifier sessionId)
     Create a new session.

Method Summary
public  intaddMainTab(IMainPanelTab tab)
     Add a tab to the main tabbed panel.
Parameters:
  tab - The tab to be added.
public  voidaddSeparatorToToolbar()
    
public synchronized  voidaddToStatusBar(JComponent comp)
     Add component to the session sheets status bar.
public  voidaddToToolbar(Action action)
     Add the passed action to the session toolbar.
public  voidclose()
     Close this session.
throws:
  SQLException - Thrown if an error closing the SQL connection.
public synchronized  voidcloseSQLConnection()
    
public synchronized  voidcommit()
     Commit the current SQL transaction.
public  booleanconfirmClose()
    
protected  voidfinalize()
    
public  StringformatException(Throwable th)
    
public  BaseSessionInternalFramegetActiveSessionWindow()
    
public  ISQLAliasExtgetAlias()
    
public  IApplicationgetApplication()
     Return the Application API object.
public  ISQLDrivergetDriver()
    
public  ExceptionFormattergetExceptionFormatter()
    
public  IIdentifiergetIdentifier()
     Return the unique identifier for this session.
public  ISQLDatabaseMetaDatagetMetaData()
    
public  IObjectTreeAPIgetObjectTreeAPIOfActiveSessionWindow()
    
public  IParserEventsProcessorgetParserEventsProcessor(IIdentifier entryPanelIdentifier)
     The code in any SQLEditor is parsed in the background.
public synchronized  ObjectgetPluginObject(IPlugin plugin, String key)
    
public  SessionPropertiesgetProperties()
    
public  IQueryTokenizergetQueryTokenizer()
     Returns the IQueryTokenizer implementation to use for tokenizing scripts statements that should be sent to the server.
public  ISQLConnectiongetSQLConnection()
    
public  ISQLPanelAPIgetSQLPanelAPIOfActiveSessionWindow()
    
public  SchemaInfogetSchemaInfo()
     Retrieve the schema information object for this session.
public synchronized  SessionInternalFramegetSessionInternalFrame()
    
public synchronized  SessionPanelgetSessionSheet()
    
public  StringgetTitle()
     Retrieve the descriptive title of this session.
public  booleanisClosed()
     Retrieve whether this session has been closed.
public  booleanisfinishedLoading()
    
public synchronized  ObjectputPluginObject(IPlugin plugin, String key, Object value)
    
public  voidreconnect()
     Reconnect to the database.
public synchronized  voidremoveFromStatusBar(JComponent comp)
     Remove component from the session sheets status bar.
public synchronized  voidremovePluginObject(IPlugin plugin, String key)
    
public synchronized  voidrollback()
     Rollback the current SQL transaction.
public  voidselectMainTab(int tabIndex)
     Select a tab in the main tabbed pane.
Parameters:
  tabIndex - The tab to select.
public  voidsetActiveSessionWindow(BaseSessionInternalFrame activeActiveSessionWindow)
    
public  voidsetExceptionFormatter(ExceptionFormatter formatter)
    
public  voidsetMessageHandler(IMessageHandler handler)
    
public  voidsetPluginsfinishedLoading(boolean pluginsFinishedLoading)
    
public  voidsetQueryTokenizer(IQueryTokenizer aTokenizer)
     Sets the IQueryTokenizer implementation to use for this session.
public synchronized  voidsetSessionInternalFrame(SessionInternalFrame sif)
    
public synchronized  voidsetSessionSheet(SessionPanel child)
    
public  voidshowErrorMessage(String msg)
    
public  voidshowErrorMessage(Throwable th)
    
public  voidshowMessage(String msg)
    
public  voidshowMessage(Throwable th)
    
public  voidshowWarningMessage(String msg)
    
public  StringtoString()
    


Constructor Detail
Session
public Session(IApplication app, ISQLDriver driver, SQLAlias alias, SQLConnection conn, String user, String password, IIdentifier sessionId)(Code)
Create a new session.
Parameters:
  app - Application API.
Parameters:
  driver - JDBC driver for session.
Parameters:
  alias - Defines URL to database.
Parameters:
  conn - Connection to database.
Parameters:
  user - User name connected with.
Parameters:
  password - Password for user
Parameters:
  sessionId - ID that uniquely identifies this session.
throws:
  IllegalArgumentException - if any parameter is null.




Method Detail
addMainTab
public int addMainTab(IMainPanelTab tab)(Code)
Add a tab to the main tabbed panel.
Parameters:
  tab - The tab to be added. the index of the new tab that was added.
throws:
  IllegalArgumentException - Thrown if a null IMainPanelTab passed.



addSeparatorToToolbar
public void addSeparatorToToolbar()(Code)



addToStatusBar
public synchronized void addToStatusBar(JComponent comp)(Code)
Add component to the session sheets status bar.
Parameters:
  comp - Component to add.



addToToolbar
public void addToToolbar(Action action)(Code)
Add the passed action to the session toolbar.
Parameters:
  action - Action to be added.



close
public void close() throws SQLException(Code)
Close this session.
throws:
  SQLException - Thrown if an error closing the SQL connection. The sessionwill still be closed even though the connection may not havebeen.



closeSQLConnection
public synchronized void closeSQLConnection() throws SQLException(Code)



commit
public synchronized void commit()(Code)
Commit the current SQL transaction.



confirmClose
public boolean confirmClose()(Code)



finalize
protected void finalize() throws Throwable(Code)



formatException
public String formatException(Throwable th)(Code)

See Also:   net.sourceforge.squirrel_sql.client.session.ISession.formatException(java.lang.Throwable)



getActiveSessionWindow
public BaseSessionInternalFrame getActiveSessionWindow()(Code)



getAlias
public ISQLAliasExt getAlias()(Code)
ISQLAlias for this session.



getApplication
public IApplication getApplication()(Code)
Return the Application API object. the Application API object.



getDriver
public ISQLDriver getDriver()(Code)
ISQLDriver for this session.



getExceptionFormatter
public ExceptionFormatter getExceptionFormatter()(Code)

See Also:   net.sourceforge.squirrel_sql.client.session.ISession.getExceptionFormatter



getIdentifier
public IIdentifier getIdentifier()(Code)
Return the unique identifier for this session. the unique identifier for this session.



getMetaData
public ISQLDatabaseMetaData getMetaData()(Code)

See Also:   net.sourceforge.squirrel_sql.client.session.ISession.getMetaData



getObjectTreeAPIOfActiveSessionWindow
public IObjectTreeAPI getObjectTreeAPIOfActiveSessionWindow()(Code)

throws:
  IllegalStateException - if ActiveSessionWindow doesn't provide an IObjectTreeAPIfor example if it is an SQLInternalFrame



getParserEventsProcessor
public IParserEventsProcessor getParserEventsProcessor(IIdentifier entryPanelIdentifier)(Code)
The code in any SQLEditor is parsed in the background. You may attach a listener to the ParserEventsProcessor to get to know about the results of parsing. The events are passed synchron with the event queue (via SwingUtils.invokeLater()). At the moment events are produced for errors in the SQLScript which are highlighted in the syntax plugin and for aliases of table names which are used in the code completion plugin.

If you want the ParserEventsProcessor to produce further events feel free to contact gerdwagner@users.sourceforge.net.




getPluginObject
public synchronized Object getPluginObject(IPlugin plugin, String key)(Code)



getProperties
public SessionProperties getProperties()(Code)



getQueryTokenizer
public IQueryTokenizer getQueryTokenizer()(Code)
Returns the IQueryTokenizer implementation to use for tokenizing scripts statements that should be sent to the server. If the tokenizer hasn't been initialized yet, then a default one will be created. If a cutom tokenizer has been installed, this will just return that one, in lieu of the default one. an implementation of IQueryTokenizer



getSQLConnection
public ISQLConnection getSQLConnection()(Code)
SQLConnection for this session.



getSQLPanelAPIOfActiveSessionWindow
public ISQLPanelAPI getSQLPanelAPIOfActiveSessionWindow()(Code)

throws:
  IllegalStateException - if ActiveSessionWindow doesn't provide an SQLPanelAPIfor example if it is an ObjectTreeInternalFrame



getSchemaInfo
public SchemaInfo getSchemaInfo()(Code)
Retrieve the schema information object for this session.



getSessionInternalFrame
public synchronized SessionInternalFrame getSessionInternalFrame()(Code)



getSessionSheet
public synchronized SessionPanel getSessionSheet()(Code)



getTitle
public String getTitle()(Code)
Retrieve the descriptive title of this session. The descriptive title of this session.



isClosed
public boolean isClosed()(Code)
Retrieve whether this session has been closed. true if session closed else false.



isfinishedLoading
public boolean isfinishedLoading()(Code)
Returns the _finishedLoading.



putPluginObject
public synchronized Object putPluginObject(IPlugin plugin, String key, Object value)(Code)



reconnect
public void reconnect()(Code)
Reconnect to the database.



removeFromStatusBar
public synchronized void removeFromStatusBar(JComponent comp)(Code)
Remove component from the session sheets status bar.
Parameters:
  comp - Component to remove.



removePluginObject
public synchronized void removePluginObject(IPlugin plugin, String key)(Code)



rollback
public synchronized void rollback()(Code)
Rollback the current SQL transaction.



selectMainTab
public void selectMainTab(int tabIndex)(Code)
Select a tab in the main tabbed pane.
Parameters:
  tabIndex - The tab to select. @see ISession.IMainTabIndexes
throws:
  IllegalArgumentException - Thrown if an invalid tabId passed.



setActiveSessionWindow
public void setActiveSessionWindow(BaseSessionInternalFrame activeActiveSessionWindow)(Code)



setExceptionFormatter
public void setExceptionFormatter(ExceptionFormatter formatter)(Code)

See Also:   net.sourceforge.squirrel_sql.client.session.ISession.setExceptionFormatter(net.sourceforge.squirrel_sql.fw.util.ExceptionFormatter)



setMessageHandler
public void setMessageHandler(IMessageHandler handler)(Code)



setPluginsfinishedLoading
public void setPluginsfinishedLoading(boolean pluginsFinishedLoading)(Code)

Parameters:
  _finishedLoading - The _finishedLoading to set.



setQueryTokenizer
public void setQueryTokenizer(IQueryTokenizer aTokenizer)(Code)
Sets the IQueryTokenizer implementation to use for this session.
Parameters:
  tokenizer -
throws:
  IllegalArgumentException - for null argument
throws:
  IllegalStateException - if a custom tokenizer is already installed.



setSessionInternalFrame
public synchronized void setSessionInternalFrame(SessionInternalFrame sif)(Code)



setSessionSheet
public synchronized void setSessionSheet(SessionPanel child)(Code)



showErrorMessage
public void showErrorMessage(String msg)(Code)

See Also:   net.sourceforge.squirrel_sql.client.session.ISession.showErrorMessage(java.lang.String)



showErrorMessage
public void showErrorMessage(Throwable th)(Code)

See Also:   net.sourceforge.squirrel_sql.client.session.ISession.showErrorMessage(java.lang.Throwablenet.sourceforge.squirrel_sql.fw.util.ExceptionFormatter)



showMessage
public void showMessage(String msg)(Code)

See Also:   net.sourceforge.squirrel_sql.client.session.ISession.showMessage(java.lang.String)



showMessage
public void showMessage(Throwable th)(Code)

See Also:   net.sourceforge.squirrel_sql.client.session.ISession.showMessage(java.lang.Throwablenet.sourceforge.squirrel_sql.fw.util.ExceptionFormatter)



showWarningMessage
public void showWarningMessage(String msg)(Code)

See Also:   net.sourceforge.squirrel_sql.client.session.ISession.showWarningMessage(java.lang.String)



toString
public String toString()(Code)



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.