Examples of ISession


Examples of com.google.enterprise.connector.dctm.dfcwrap.ISession

   * Sets current session as well. Per DFC javadoc, if session does
   * not exist, a new one is created.
   */
  @Override
  public ISession getSession(String docbase) throws RepositoryException {
    ISession session;
    if (!sessMgerSessions.containsKey(docbase))
      session = newSession(docbase);
    else {
      session = sessMgerSessions.get(docbase);
      allSessions.put(session, new Throwable("Session allocated from pool"));
View Full Code Here

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

  }

  @Test
  public void testCreateDataSet() throws DataSetException {
   
    ISession mockSession = mockHelper.createMock(ISession.class);
    IApplication mockApplication = mockHelper.createMock(IApplication.class);
    IIdentifier mockIdentifier = mockHelper.createMock(IIdentifier.class);
    SessionManager mockSessionManager = mockHelper.createMock(SessionManager.class);
    ISQLConnection mockSqlConnection = mockHelper.createMock(ISQLConnection.class);
    SQLDatabaseMetaData mockMetaData = mockHelper.createMock(SQLDatabaseMetaData.class);
    IProcedureInfo mockProcedureInfo = mockHelper.createMock(IProcedureInfo.class);
   
    expect(mockSessionManager.getSession(mockIdentifier)).andStubReturn(mockSession);
    expect(mockSession.getApplication()).andStubReturn(mockApplication);
    expect(mockSession.getIdentifier()).andStubReturn(mockIdentifier);
    expect(mockApplication.getSessionManager()).andStubReturn(mockSessionManager);
    expect(mockSession.getSQLConnection()).andStubReturn(mockSqlConnection);
    expect(mockSqlConnection.getSQLMetaData()).andStubReturn(mockMetaData);
    expect(mockMetaData.getProcedureColumnsDataSet(mockProcedureInfo)).andStubReturn(null);
   
    mockHelper.replayAll();
    classUnderTest.setProcedureInfo(mockProcedureInfo);
View Full Code Here

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

    _panel = panel;
  }

  public void execute()
  {
    final ISession session = _panel.getSession();
    final Connection conn = session.getSQLConnection().getConnection();
    try
    {
      final String sql = conn.nativeSQL(_panel.getSQLScriptToBeExecuted());
      if (sql.length() > 0)
      {
        _panel.appendSQLScript("\n" + sql, true);
      }
    }
    catch (SQLException ex)
    {
      session.showErrorMessage(ex);
    }
  }
View Full Code Here

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

    IApplication app = getApplication();
    if(Dialogs.showYesNo(app.getMainFrame(), i18n.MSG))
    {
         // Can't work with ISessionAction because if a result window is on top
         // the session in a ISessionAction is null.
         ISession activeSession = getApplication().getSessionManager().getActiveSession();
      activeSession.reconnect();
    }
  }
View Full Code Here

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

   */
  protected IDataSet createDataSet() throws DataSetException
  {
    // Dont need to close the ResultSet as DatabaseTypesDataSet
    // will do so when its finished with it.
    final ISession session = getSession();
        return session.getSQLConnection().getSQLMetaData().getTypesDataSet();
  }
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.getCatalogs());
    }
    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.getNumericFunctions());
    }
    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.getStringFunctions());
    }
    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();
      final ISQLConnection conn = session.getSQLConnection();
      ISQLDatabaseMetaData md = session.getMetaData();

     
      try
      {
         final Statement stmt = conn.createStatement();
         try
         {
            final SessionProperties props = session.getProperties();
            if (props.getContentsLimitRows())
            {
               try
               {
                  stmt.setMaxRows(props.getContentsNbrRowsToShow());
View Full Code Here

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

    * @return Returns true if the ObjectTree tab is selected.
    *                 false is returned otherwise.
    */
   private boolean objectTreeTabIsSelected() {
      boolean result = false;
      ISession session = _treePanel.getSession();
      if (session != null) {
         SessionPanel sessionPanel = session.getSessionSheet();
         if (sessionPanel != null) {
            result = sessionPanel.isObjectTreeTabSelected();
         }
      }
      return result;
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.