Examples of ISession


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

  {
    IWidget widget = e.getWidget();

    if (widget instanceof ISessionWidget)
    {
      ISession session = ((ISessionWidget) widget).getSession();

      List<PluginSessionCallback> list = _pluginSessionCallbacksBySessionID.get(session.getIdentifier());

      if (null != list)
      {
        for (int i = 0; i < list.size(); i++)
        {
View Full Code Here

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

{

 
  @Test
  public void testIsPluginSession() throws Exception {
    ISession mockSession = mockHelper.createMock(ISession.class);
    ISQLDatabaseMetaData mockSQLDatabaseMetaData = mockHelper.createMock(ISQLDatabaseMetaData.class);
    expect(mockSession.getMetaData()).andStubReturn(mockSQLDatabaseMetaData);
    expect(mockSQLDatabaseMetaData.getDatabaseProductName()).andStubReturn(getDatabaseProductName());
    expect(mockSQLDatabaseMetaData.getDatabaseProductVersion()).andStubReturn(getDatabaseProductVersion());
   
    mockHelper.replayAll();
    if (classUnderTest instanceof DefaultSessionPlugin) {
View Full Code Here

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

    }

    // Test to ensure that we allow sessions that are ending to be GC'd.
    public void testSessionCleanup() {
        MyBaseMainPanelTab tab = new MyBaseMainPanelTab();
        ISession session1 = createMock(ISession.class);
        tab.setSession(session1);
        ISession session2 = createMock(ISession.class);
        tab.sessionEnding(session2);
        assertEquals(session1, tab.getSession());
        tab.sessionEnding(session1);
        assertEquals(null, tab.getSession());
    }
View Full Code Here

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

     * and to trigger the enable menu task if the session is relevant to this
     * plugin.
     */
    private class SessionListener extends SessionAdapter {
        public void sessionActivated(SessionEvent evt) {
            final ISession session = evt.getSession();
            EnableMenuTask task = new EnableMenuTask(session);
            session.getApplication().getThreadPool().addTask(task);
        }
View Full Code Here

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

  public Component getComponent()
  {
    if (_comp == null)
    {
      ISession session = getSession();
      SessionProperties props = session.getProperties();
      String destClassName = props.getMetaDataOutputClassName();
      try
      {
        _comp = new DataSetScrollingPanel(destClassName, null);
      } catch (Exception e)
View Full Code Here

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

    return _comp;
  }

  protected void refreshComponent() throws DataSetException
  {
    ISession session = getSession();
    if (session == null)
    {
      throw new IllegalStateException("Null ISession");
    }
    PreparedStatement pstmt = null;
View Full Code Here

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

  /**
   * Refresh the component displaying the database object.
   */
  public synchronized void refreshComponent() throws DataSetException
  {
    ISession session = getSession();
    if (session == null)
    {
      throw new IllegalStateException("Null ISession");
    }
    super._app.getThreadPool().addTask(new Runnable() {
View Full Code Here

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

   * @see net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.BaseSourceTab#createStatement()
   */
  @Override
  protected PreparedStatement createStatement() throws SQLException
  {
    final ISession session = getSession();

    ISQLConnection conn = session.getSQLConnection();

    String sqlStatement = getSqlStatement();
    String[] bindValues = getBindValues();

    if (s_log.isDebugEnabled())
View Full Code Here

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

  }

  public static ISession getEasyMockSession(String dbName, boolean replay) throws SQLException
  {
    ISQLDatabaseMetaData md = FwTestUtil.getEasyMockSQLMetaData(dbName, "jdbc:oracle");
    ISession session = AppTestUtil.getEasyMockSession(md, replay);
    return session;
  }
View Full Code Here

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

    return session;
  }

  public static ISession getEasyMockSession(ISQLDatabaseMetaData md, boolean replay)
  {
    ISession session = null;
    try
    {
      ISQLConnection con = FwTestUtil.getEasyMockSQLConnection();
      session = getEasyMockSession(md, con, false);
      if (replay)
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.