boolean compareConnections( List<UIDatabaseConnection> ro1, List<UIDatabaseConnection> ro2 ) { if ( ro1 != null && ro2 != null ) { if ( ro1.size() != ro2.size() ) { return false; } for ( int i = 0; i < ro1.size(); i++ ) { if ( ro1.get( i ) != null && ro2.get( i ) != null ) { if ( !ro1.get( i ).getName().equals( ro2.get( i ).getName() ) ) { return false; } } } } else { return false; } return true; }
private UIDatabaseConnection createUIConnection( DatabaseMeta dbMeta ) { UIDatabaseConnection conn = null; try { conn = UIObjectRegistry.getInstance().constructUIDatabaseConnection( dbMeta, repository ); } catch ( UIObjectCreationException uoe ) { conn = new UIDatabaseConnection( dbMeta, repository ); } return conn; }
"AclTab.ConnectionPermission", dbconnObject.getDisplayName() ) ); //$NON-NLS-1$ bf.setBindingType( Binding.Type.ONE_WAY ); bf.createBinding( viewAclsModel, "acls", userRoleList, "elements" ); //$NON-NLS-1$ //$NON-NLS-2$ messageBox.setAcceptLabel( BaseMessages.getString( PKG, "Dialog.Ok" ) );//$NON-NLS-1$ messageBox.setMessage( BaseMessages.getString( PKG, "PermissionsController.UnableToGetAcls", dbconnObject.getName(), ade.getLocalizedMessage() ) );//$NON-NLS-1$ messageBox.setAcceptLabel( BaseMessages.getString( PKG, "Dialog.Ok" ) );//$NON-NLS-1$ messageBox.setMessage( BaseMessages.getString( PKG, "PermissionsController.UnableToGetAcls", dbconnObject.getName(), e.getLocalizedMessage() ) ); //$NON-NLS-1$ messageBox.open();
DatabaseMeta databaseMeta = ( (UIDatabaseConnection) connections.toArray()[0] ).getDatabaseMeta();
UIDatabaseConnection conn = createUIConnection( dbMeta ); if ( conn != null ) { conn.setRepositoryElementMetaInterface( repoMeta ); tmpList.add( conn );
UIDatabaseConnection connection = (UIDatabaseConnection) obj; DatabaseMeta databaseMeta = connection.getDatabaseMeta();