Examples of ISession


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

    super.setUp();
    ObjectTreePanel localMockObjectTreePanel =
      localMockHelper.createMock("localMockObjectTreePanel", ObjectTreePanel.class);
    SquirrelPreferences localMockSquirrelPreferences =
      localMockHelper.createMock("mockSquirrelPreferences", SquirrelPreferences.class);
    ISession localMockSession = localMockHelper.createMock("localMockSession", ISession.class);
    IApplication localMockApplication =
      localMockHelper.createMock("localMockApplication", IApplication.class);
    Statement localMockStatement = localMockHelper.createMock("localMockStatement", Statement.class);
    ITableInfo localMockTableInfo = localMockHelper.createMock("localMockTableInfo", ITableInfo.class);
    ResultSet localMockResultSet = localMockHelper.createMock("localMockResultSet", ResultSet.class);
    ResultSetMetaData localMockResultSetMetaData =
      localMockHelper.createMock("localMockResultSetMetaData", ResultSetMetaData.class);

    expect(localMockObjectTreePanel.getSession()).andStubReturn(localMockSession);
    expect(localMockSession.getApplication()).andStubReturn(localMockApplication);
    expect(localMockApplication.getSquirrelPreferences()).andStubReturn(localMockSquirrelPreferences);
    expect(localMockSquirrelPreferences.getShowPleaseWaitDialog()).andStubReturn(false);
    expect(localMockTableInfo.getQualifiedName()).andStubReturn("Test Qualified TableName");

    localMockStatement.close();
View Full Code Here

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

    _comp = panel;
  }

  protected void refreshComponent()
  {
    ISession session = getSession();
    if (session == null)
    {
      throw new IllegalStateException("Null ISession");
    }
    try
    {
      PreparedStatement pstmt = createStatement();
      try
      {
        _comp.load(getSession(), pstmt);
      } finally
      {
        SQLUtilities.closeStatement(pstmt);
      }
    } catch (SQLException ex)
    {
      s_log.error(ex);
      session.showErrorMessage(ex);
    }
  }
View Full Code Here

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

    IApplication app = getApplication();
    CursorChanger cursorChg = new CursorChanger(app.getMainFrame());
    cursorChg.show();
    try
    {
         ISession activeSession = getApplication().getSessionManager().getActiveSession();
         if(   activeSession.getActiveSessionWindow() instanceof SessionInternalFrame
            || activeSession.getActiveSessionWindow() instanceof SQLInternalFrame)
         {
            // Can't work with ISessionAction because if a result window is on top
            // the session in a ISessionAction is null.
         new CloseAllSQLResultWindowsCommand(activeSession.getSQLPanelAPIOfActiveSessionWindow()).execute();
         }
    }
    finally
    {
      cursorChg.restore();
View Full Code Here

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

   */
  public void execute()
  {
    if (_objectTree != null)
    {
      final ISession session = _objectTree.getSession();
      final IApplication app = session.getApplication();
      final WindowManager winMgr = app.getWindowManager();
      winMgr.showSQLFilterDialog( _objectTree, _objectInfo);
    }
  }
View Full Code Here

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

  /**
   * Create the <TT>IDataSet</TT> to be displayed in this tab.
   */
  protected IDataSet createDataSet() throws DataSetException
  {
    final ISession session = getSession();
    try
    {
      final SQLDatabaseMetaData md = session.getSQLConnection().getSQLMetaData();
      return new ObjectArrayDataSet(md.getSystemFunctions());
    }
    catch (SQLException ex)
    {
      throw new DataSetException(ex);
View Full Code Here

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

  /**
   * Create the <TT>IDataSet</TT> to be displayed in this tab.
   */
  protected IDataSet createDataSet() throws DataSetException
  {
    final ISession session = getSession();
    try
    {
      final SQLDatabaseMetaData md = session.getSQLConnection().getSQLMetaData();
      return new ObjectArrayDataSet(md.getTimeDateFunctions());
    }
    catch (SQLException ex)
    {
      throw new DataSetException(ex);
View Full Code Here

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

  /**
   * Create the <TT>IDataSet</TT> to be displayed in this tab.
   */
  protected IDataSet createDataSet() throws DataSetException
  {
    final ISession session = getSession();
    try
    {
      final SQLDatabaseMetaData md = session.getSQLConnection().getSQLMetaData();
      return new ObjectArrayDataSet(md.getSQLKeywords());
    }
    catch (SQLException ex)
    {
      throw new DataSetException(ex);
View Full Code Here

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

  /**
   * Create the <TT>IDataSet</TT> to be displayed in this tab.
   */
  protected IDataSet createDataSet() throws DataSetException
  {
    final ISession session = getSession();
    try
    {
      final ISQLConnection conn = session.getSQLConnection();
      final String[] tableTypes = conn.getSQLMetaData().getTableTypes();
      return new ObjectArrayDataSet(tableTypes);
    }
    catch (SQLException ex)
    {
View Full Code Here

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

    setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);

    // This is a tool window.
    makeToolWindow(true);

    final ISession session = getSession();

    try
    {
      final ISQLConnection conn = session.getSQLConnection();
        TableColumnInfo[] infos = conn.getSQLMetaData().getColumnInfo((ITableInfo)_objectInfo);
        for (int i = 0; i < infos.length; i++) {
           TableColumnInfo info = infos[i];
           columnNames.add(info.getColumnName());
        }
    }
    catch (SQLException ex)
    {
      session.getApplication().showErrorDialog(
        // i18n[editWhereColsSheet.unableToEdit=Unable to get list of columns, {0}]
        s_stringMgr.getString("editWhereColsSheet.unableToEdit", ex));
    }
    String unambiguousname =
            ContentsTab.getUnambiguousTableName(session,
View Full Code Here

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

  /**
   * Create the <TT>IDataSet</TT> to be displayed in this tab.
   */
  protected IDataSet createDataSet() throws DataSetException
  {
    final ISession session = getSession();
    final ISQLConnection conn = session.getSQLConnection();
    return new JavabeanDataSet(new ConnectionInfo(conn, session));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.