Package net.sourceforge.squirrel_sql.client.gui.db

Examples of net.sourceforge.squirrel_sql.client.gui.db.SQLAlias


      }

      _app = app;
      _driver = driver;

      _alias = new SQLAlias();

      try
      {
         _alias.assignFrom(alias, true);
      }
View Full Code Here


     return prefs;
  }

  public static SQLAlias getEasyMockSQLAlias(IIdentifier SqlAliasId,
        IIdentifier SqlDriverId) {
     SQLAlias mockSqlAlias = createMock(SQLAlias.class);
     SQLDriverPropertyCollection mockSqlDriverPropCol = createMock(SQLDriverPropertyCollection.class);
     expect(mockSqlAlias.getIdentifier()).andReturn(SqlAliasId).anyTimes();
     expect(mockSqlAlias.getName()).andReturn("TestAliasName").anyTimes();
     expect(mockSqlAlias.getDriverIdentifier()).andReturn(SqlDriverId)
                                               .anyTimes();
     expect(mockSqlAlias.getUrl()).andReturn("TestUrl").anyTimes();
     expect(mockSqlAlias.getUserName()).andReturn("TestUserName").anyTimes();
     expect(mockSqlAlias.getPassword()).andReturn("TestPassword").anyTimes();
     expect(mockSqlAlias.isAutoLogon()).andReturn(true).anyTimes();
     expect(mockSqlAlias.getUseDriverProperties()).andReturn(true).anyTimes();
     expect(mockSqlAlias.getDriverPropertiesClone()).andReturn(mockSqlDriverPropCol)
                                                    .anyTimes();
     SQLAliasConnectionProperties mockConnProps = createMock(SQLAliasConnectionProperties.class);
     expect(mockConnProps.isEnableConnectionKeepAlive()).andStubReturn(false);
     expect(mockConnProps.getKeepAliveSleepTimeSeconds()).andStubReturn(120);
     expect(mockConnProps.getKeepAliveSqlStatement()).andStubReturn("");
     expect(mockSqlAlias.getConnectionProperties()).andStubReturn(mockConnProps);
    
     replay(mockSqlAlias);
     replay(mockConnProps);
     return mockSqlAlias;
  }
View Full Code Here

    messageHandler = new MockMessageHandler();
    props = new SessionProperties();
    props.setLoadSchemasCatalogs(false);
    app = new MockApplication();
    app.getMockSessionManager().setSession(this);
    sqlAlias = new SQLAlias(new UidIdentifier());
    schemaInfo = new SchemaInfo(app);
    schemaInfo.initialLoad(this);
    prefs = app.getSquirrelPreferences();
    try
    {
View Full Code Here

      messageHandler = new MockMessageHandler();
      props = new SessionProperties();
      props.setLoadSchemasCatalogs(false);
      app = new MockApplication();
      app.getMockSessionManager().setSession(this);
      sqlAlias = new SQLAlias(new UidIdentifier());
      schemaInfo = new SchemaInfo(app);
      schemaInfo.initialLoad(this);
      prefs = app.getSquirrelPreferences();
      try {
        UIFactory.initialize(prefs, app);
View Full Code Here

         }
      }
      final Iterator<ISQLAlias> it = aliases.iterator();
      while (it.hasNext())
      {
         final SQLAlias alias = (SQLAlias) it.next();
         new ConnectToAliasCommand(_app, alias).execute();
      }
   }
View Full Code Here

    * @param  evt    The current event.
    */
   public void actionPerformed(ActionEvent evt)
   {
      moveToFrontAndSelectAliasFrame();     
      final SQLAlias alias = _aliases.getSelectedAlias(null);
      if (alias != null)
      {
         new ConnectToAliasCommand(getApplication(), alias).execute();
      }
   }
View Full Code Here

    * @param  evt  The current event.
    */
   public void actionPerformed(ActionEvent evt)
   {
      moveToFrontAndSelectAliasFrame();
      SQLAlias alias = _aliases.getSelectedAlias(null);
      if (alias != null)
      {
         new CopyAliasCommand(getApplication(), alias).execute();
      }
   }
View Full Code Here

TOP

Related Classes of net.sourceforge.squirrel_sql.client.gui.db.SQLAlias

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.