Package net.sourceforge.squirrel_sql.client.session

Examples of net.sourceforge.squirrel_sql.client.session.ISession


  }

  public static ISession getEasyMockSession(ISQLDatabaseMetaData md,
        ResultSet rs) throws SQLException {
     ISQLConnection con = FwTestUtil.getEasyMockSQLConnection(rs);
     ISession session = getEasyMockSession(md, con, false);
     replay(session);
     return session;
  }
View Full Code Here


    {
      getObjectTreePanel().removeTreeSelectionListener(_objTreeSelectionLis);
      _objTreeSelectionLis = null;
    }

    final ISession session = getSession();
    if (session != null)
    {
      if (_propsListener != null)
      {
        session.getProperties().removePropertyChangeListener(_propsListener);
        _propsListener = null;
      }
      _mainTabPane.sessionClosing(session);
      _sessionId = null;
    }
View Full Code Here

    _app.showErrorDialog(ex);
  }

  private void propertiesHaveChanged(String propertyName)
  {
    final ISession session = getSession();
    final SessionProperties props = session.getProperties();
    if (propertyName == null
      || propertyName.equals(
        SessionProperties.IPropertyNames.COMMIT_ON_CLOSING_CONNECTION))
    {
            _app.getThreadPool().addTask(new Runnable() {
                public void run() {
                    session.getSQLConnection().setCommitOnClose(
                            props.getCommitOnClosingConnection());                   
                }
            });
    }
    if (propertyName == null
View Full Code Here

      _sessionDropDown = control;
    }

    public void sessionConnected(SessionEvent evt)
    {
      final ISession session = evt.getSession();
         // Needes to be done via event queque because method is not called from the event disptach thread.
      GUIUtils.processOnSwingEventThread(new Runnable()
      {
        public void run()
        {
View Full Code Here

      });
    }

    public void sessionClosing(SessionEvent evt)
    {
      final ISession session = evt.getSession();
      GUIUtils.processOnSwingEventThread(new Runnable()
      {
        public void run()
        {
          _sessionDropDown._closing = true;
View Full Code Here

    }

      public void sessionActivated(SessionEvent evt)
      {
         final ISession session = evt.getSession();

         // Needes to be done via event queque because adding the session to the
         // drop down happens via the event queue too.
         GUIUtils.processOnSwingEventThread(new Runnable()
         {
View Full Code Here

  {
    final boolean isSQLFrame = (frame instanceof SQLInternalFrame);
    final boolean isTreeFrame = (frame instanceof ObjectTreeInternalFrame);
    final boolean isSessionInternalFrame = (frame instanceof SessionInternalFrame);

    ISession session = null;
    if (frame instanceof ISessionWidget)
    {
      session = ((ISessionWidget)frame).getSession();
    }
View Full Code Here

    super.setSourcePanel(new ConstraintSourcePanel());
  }

  @Override
  protected PreparedStatement createStatement() throws SQLException {
    final ISession session = getSession();
    final IDatabaseObjectInfo doi = getDatabaseObjectInfo();

    ISQLConnection conn = session.getSQLConnection();
    PreparedStatement pstmt = conn.prepareStatement(SQL);
    pstmt.setString(1, doi.getSchemaName());
    pstmt.setString(2, doi.getSimpleName());
    return pstmt;
  }
View Full Code Here

     * @see net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.BasePreparedStatementTab#createStatement()
     */
    @Override 
  protected PreparedStatement createStatement() throws SQLException
  {
    ISession session = getSession();
        IDatabaseObjectInfo doi = getDatabaseObjectInfo();
        if (s_log.isDebugEnabled()) {
            s_log.debug("Trigger details SQL: "+SQL);
            s_log.debug("Trigger schema: "+doi.getSchemaName());
            s_log.debug("Trigger name: "+doi.getSimpleName());
        }
    PreparedStatement pstmt = session.getSQLConnection().prepareStatement(SQL);
        pstmt.setString(1, doi.getSchemaName());
    pstmt.setString(2, doi.getSimpleName());
    return pstmt;
  }
View Full Code Here

   * @see net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.BasePreparedStatementTab#createStatement()
   */
  @Override
  protected PreparedStatement createStatement() throws SQLException
  {
    ISession session = getSession();
        IDatabaseObjectInfo doi = getDatabaseObjectInfo();
        String sql = SQL;
        if (isOS400) {
            sql = OS_400_SQL;
        }
        if (s_log.isDebugEnabled()) {
            s_log.debug("UDF details SQL: "+sql);
            s_log.debug("UDF schema: "+doi.getSchemaName());
            s_log.debug("UDF name: "+doi.getSimpleName());
        }
    PreparedStatement pstmt = session.getSQLConnection().prepareStatement(sql);
        pstmt.setString(1, doi.getSchemaName());
    pstmt.setString(2, doi.getSimpleName());
    return pstmt;
  }
View Full Code Here

TOP

Related Classes of net.sourceforge.squirrel_sql.client.session.ISession

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.