@Override public List<DatabaseMeta> getObjectsForSyncFromTransformation( TransMeta transformation ) { return transformation.getDatabases(); }
/** * Adds db connection text boxes for input * * @return the last control specified */ protected Control addDbConnectionInputs() { List<String> ibConnections = new ArrayList<String>(); for ( DatabaseMeta dbMeta : transMeta.getDatabases() ) { if ( dbMeta.getDatabaseInterface() instanceof IngresDatabaseMeta ) { ibConnections.add( dbMeta.getName() ); } } serverConnection = addStandardSelect( "Connection", wStepname, ibConnections.toArray( new String[ibConnections.size()] ) ); return serverConnection; }
/** * Adds db connection text boxes for input * * @return the last control specified */ protected Control addDbConnectionInputs() { List<String> ibConnections = new ArrayList<String>(); for ( DatabaseMeta dbMeta : transMeta.getDatabases() ) { if ( dbMeta.getDatabaseInterface().isMySQLVariant() ) { ibConnections.add( dbMeta.getName() ); } } serverConnection = addStandardSelect( BaseMessages.getString( PKG, "InfobrightLoaderDialog.Connection.Label" ), wStepname, ibConnections .toArray( new String[ibConnections.size()] ) ); return serverConnection; }
public void widgetSelected( SelectionEvent e ) { CreateDatabaseWizard cdw = new CreateDatabaseWizard(); DatabaseMeta newDBInfo = cdw.createAndRunDatabaseWizard( shell, props, transMeta.getDatabases() ); if ( newDBInfo != null ) { transMeta.addDatabase( newDBInfo ); reinitConnectionDropDown( wConnection, newDBInfo.getName() ); } } } );
@Injection( name = "CONNECTIONNAME" ) public void setConnection( String connectionName ) { databaseMeta = DatabaseMeta.findDatabase( getParentStepMeta().getParentTransMeta().getDatabases(), connectionName ); }
public void editPartitionSchema( TransMeta transMeta, PartitionSchema partitionSchema ) { String originalName = partitionSchema.getName(); PartitionSchemaDialog dialog = new PartitionSchemaDialog( spoon.getShell(), partitionSchema, transMeta.getPartitionSchemas(), transMeta.getDatabases(), transMeta ); if ( dialog.open() ) { if ( spoon.rep != null && partitionSchema.getObjectId() != null ) { try { saveSharedObjectToRepository( partitionSchema, null ); if ( sharedObjectSyncUtil != null ) { sharedObjectSyncUtil.synchronizePartitionSchemas( partitionSchema, originalName ); } } catch ( KettleException e ) { showSaveErrorDialog( partitionSchema, e ); } } refreshTree(); } }
private void getTableName() { int connr = wConnection.getSelectionIndex(); if ( connr < 0 ) { return; } DatabaseMeta inf = transMeta.getDatabase( connr ); logDebug( BaseMessages.getString( PKG, "DimensionLookupDialog.Log.LookingAtConnection" ) + inf.toString() ); DatabaseExplorerDialog std = new DatabaseExplorerDialog( shell, SWT.NONE, inf, transMeta.getDatabases() ); std.setSelectedSchemaAndTable( wSchema.getText(), wTable.getText() ); if ( std.open() ) { wSchema.setText( Const.NVL( std.getSchemaName(), "" ) ); wTable.setText( Const.NVL( std.getTableName(), "" ) ); setTableFieldCombo(); } }
private void getTableName() { // New class: SelectTableDialog int connr = wConnection.getSelectionIndex(); if ( connr >= 0 ) { DatabaseMeta inf = transMeta.getDatabase( connr ); DatabaseExplorerDialog std = new DatabaseExplorerDialog( shell, SWT.NONE, inf, transMeta.getDatabases() ); std.setSelectedSchemaAndTable( wSchemaname.getText(), wTablenameText.getText() ); if ( std.open() ) { wSchemaname.setText( Const.NVL( std.getSchemaName(), "" ) ); wTablenameText.setText( Const.NVL( std.getTableName(), "" ) ); } } else { MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_ERROR ); mb.setMessage( BaseMessages.getString( PKG, "ColumnExistsDialog.ConnectionError2.DialogMessage" ) ); mb.setText( BaseMessages.getString( PKG, "System.Dialog.Error.Title" ) ); mb.open(); } }
private void getTableName() { // New class: SelectTableDialog int connr = wConnection.getSelectionIndex(); if ( connr >= 0 ) { DatabaseMeta inf = transMeta.getDatabase( connr ); logDebug( BaseMessages.getString( PKG, "SQLFileOutputDialog.Log.LookingAtConnection", inf.toString() ) ); DatabaseExplorerDialog std = new DatabaseExplorerDialog( shell, SWT.NONE, inf, transMeta.getDatabases() ); std.setSelectedSchemaAndTable( wSchema.getText(), wTable.getText() ); if ( std.open() ) { wSchema.setText( Const.NVL( std.getSchemaName(), "" ) ); wTable.setText( Const.NVL( std.getTableName(), "" ) ); } } else { MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_ERROR ); mb.setMessage( BaseMessages.getString( PKG, "SQLFileOutputDialog.ConnectionError2.DialogMessage" ) ); mb.setText( BaseMessages.getString( PKG, "System.Dialog.Error.Title" ) ); mb.open(); } }
private void getTableName() { DatabaseMeta inf = null; // New class: SelectTableDialog int connr = wConnection.getSelectionIndex(); if ( connr >= 0 ) { inf = transMeta.getDatabase( connr ); } if ( inf != null ) { logDebug( BaseMessages.getString( PKG, "LucidDBStreamingLoaderDialog.Log.LookingAtConnection" ) + inf.toString() ); DatabaseExplorerDialog std = new DatabaseExplorerDialog( shell, SWT.NONE, inf, transMeta.getDatabases() ); std.setSelectedSchemaAndTable( wSchema.getText(), wTable.getText() ); if ( std.open() ) { wSchema.setText( Const.NVL( std.getSchemaName(), "" ) ); wTable.setText( Const.NVL( std.getTableName(), "" ) ); } } else { MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_ERROR ); mb .setMessage( BaseMessages .getString( PKG, "LucidDBStreamingLoaderDialog.InvalidConnection.DialogMessage" ) ); mb.setText( BaseMessages.getString( PKG, "LucidDBStreamingLoaderDialog.InvalidConnection.DialogTitle" ) ); mb.open(); } }
private void getTableName() { DatabaseMeta inf = null; // New class: SelectTableDialog int connr = wConnection.getSelectionIndex(); if ( connr >= 0 ) { inf = transMeta.getDatabase( connr ); } if ( inf != null ) { logDebug( BaseMessages.getString( PKG, "PGBulkLoaderDialog.Log.LookingAtConnection" ) + inf.toString() ); DatabaseExplorerDialog std = new DatabaseExplorerDialog( shell, SWT.NONE, inf, transMeta.getDatabases() ); std.setSelectedSchemaAndTable( wSchema.getText(), wTable.getText() ); if ( std.open() ) { wSchema.setText( Const.NVL( std.getSchemaName(), "" ) ); wTable.setText( Const.NVL( std.getTableName(), "" ) ); } } else { MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_ERROR ); mb.setMessage( BaseMessages.getString( PKG, "PGBulkLoaderDialog.InvalidConnection.DialogMessage" ) ); mb.setText( BaseMessages.getString( PKG, "PGBulkLoaderDialog.InvalidConnection.DialogTitle" ) ); mb.open(); } }
private void getTableName() { DatabaseMeta inf = null; // New class: SelectTableDialog int connr = wConnection.getSelectionIndex(); if ( connr >= 0 ) { inf = transMeta.getDatabase( connr ); } if ( inf != null ) { logDebug( BaseMessages.getString( PKG, "DeleteDialog.Log.LookingAtConnection" ) + inf.toString() ); DatabaseExplorerDialog std = new DatabaseExplorerDialog( shell, SWT.NONE, inf, transMeta.getDatabases() ); std.setSelectedSchemaAndTable( wSchema.getText(), wTable.getText() ); if ( std.open() ) { wSchema.setText( Const.NVL( std.getSchemaName(), "" ) ); wTable.setText( Const.NVL( std.getTableName(), "" ) ); setTableFieldCombo(); } } else { MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_ERROR ); mb.setMessage( BaseMessages.getString( PKG, "DeleteDialog.InvalidConnection.DialogMessage" ) ); mb.setText( BaseMessages.getString( PKG, "DeleteDialog.InvalidConnection.DialogTitle" ) ); mb.open(); } }
private void getTableName() { DatabaseMeta inf = null; // New class: SelectTableDialog int connr = wConnection.getSelectionIndex(); if ( connr >= 0 ) { inf = transMeta.getDatabase( connr ); } if ( inf != null ) { if ( log.isDebug() ) { logDebug( BaseMessages.getString( PKG, "GPBulkLoaderDialog.Log.LookingAtConnection" ) + inf.toString() ); } DatabaseExplorerDialog std = new DatabaseExplorerDialog( shell, SWT.NONE, inf, transMeta.getDatabases() ); std.setSelectedSchemaAndTable( wSchema.getText(), wTable.getText() ); if ( std.open() ) { wSchema.setText( Const.NVL( std.getSchemaName(), "" ) ); wTable.setText( Const.NVL( std.getTableName(), "" ) ); } } else { MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_ERROR ); mb.setMessage( BaseMessages.getString( PKG, "GPBulkLoaderDialog.InvalidConnection.DialogMessage" ) ); mb.setText( BaseMessages.getString( PKG, "GPBulkLoaderDialog.InvalidConnection.DialogTitle" ) ); mb.open(); } }
private void getTableName() { // New class: SelectTableDialog int connr = wConnection.getSelectionIndex(); if ( connr >= 0 ) { DatabaseMeta inf = transMeta.getDatabase( connr ); if ( log.isDebug() ) { logDebug( BaseMessages.getString( PKG, "TableOutputDialog.Log.LookingAtConnection", inf.toString() ) ); } DatabaseExplorerDialog std = new DatabaseExplorerDialog( shell, SWT.NONE, inf, transMeta.getDatabases() ); std.setSelectedSchemaAndTable( wSchema.getText(), wTable.getText() ); if ( std.open() ) { wSchema.setText( Const.NVL( std.getSchemaName(), "" ) ); wTable.setText( Const.NVL( std.getTableName(), "" ) ); setTableFieldCombo(); } } else { MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_ERROR ); mb.setMessage( BaseMessages.getString( PKG, "TableOutputDialog.ConnectionError2.DialogMessage" ) ); mb.setText( BaseMessages.getString( PKG, "System.Dialog.Error.Title" ) ); mb.open(); } }
private void getTableName() { DatabaseMeta inf = null; // New class: SelectTableDialog int connr = wConnection.getSelectionIndex(); if ( connr >= 0 ) { inf = transMeta.getDatabase( connr ); } if ( inf != null ) { logDebug( BaseMessages.getString( PKG, "CombinationLookupDialog.Log.LookingAtConnection", inf.toString() ) ); DatabaseExplorerDialog std = new DatabaseExplorerDialog( shell, SWT.NONE, inf, transMeta.getDatabases() ); std.setSelectedSchemaAndTable( wSchema.getText(), wTable.getText() ); if ( std.open() ) { wSchema.setText( Const.NVL( std.getSchemaName(), "" ) ); wTable.setText( Const.NVL( std.getTableName(), "" ) ); setTableFieldCombo(); } } else { MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_ERROR ); mb.setMessage( BaseMessages.getString( PKG, "CombinationLookupDialog.ConnectionError2.DialogMessage" ) ); mb.setText( BaseMessages.getString( PKG, "System.Dialog.Error.Title" ) ); mb.open(); } }
private void getTableName( TextVar schema, TextVar tableName ) { DatabaseMeta inf = null; // New class: SelectTableDialog int connr = wConnection.getSelectionIndex(); if ( connr >= 0 ) { inf = transMeta.getDatabase( connr ); } if ( inf != null ) { if ( log.isDebug() ) { logDebug( BaseMessages.getString( PKG, "GPLoadDialog.Log.LookingAtConnection" ) + inf.toString() ); } DatabaseExplorerDialog std = new DatabaseExplorerDialog( shell, SWT.NONE, inf, transMeta.getDatabases() ); std.setSelectedSchemaAndTable( wSchema.getText(), wTable.getText() ); if ( std.open() ) { schema.setText( Const.NVL( std.getSchemaName(), "" ) ); tableName.setText( Const.NVL( std.getTableName(), "" ) ); } } else { MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_ERROR ); mb.setMessage( BaseMessages.getString( PKG, "GPLoadDialog.InvalidConnection.DialogMessage" ) ); mb.setText( BaseMessages.getString( PKG, "GPLoadDialog.InvalidConnection.DialogTitle" ) ); mb.open(); } }
private void getTableName() { DatabaseMeta inf = null; // New class: SelectTableDialog int connr = wConnection.getSelectionIndex(); if ( connr >= 0 ) { inf = transMeta.getDatabase( connr ); } if ( inf != null ) { if ( log.isDebug() ) { logDebug( BaseMessages.getString( PKG, "MySQLBulkLoaderDialog.Log.LookingAtConnection" ) + inf.toString() ); } DatabaseExplorerDialog std = new DatabaseExplorerDialog( shell, SWT.NONE, inf, transMeta.getDatabases() ); std.setSelectedSchemaAndTable( wSchema.getText(), wTable.getText() ); if ( std.open() ) { wSchema.setText( Const.NVL( std.getSchemaName(), "" ) ); wTable.setText( Const.NVL( std.getTableName(), "" ) ); } } else { MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_ERROR ); mb.setMessage( BaseMessages.getString( PKG, "MySQLBulkLoaderDialog.InvalidConnection.DialogMessage" ) ); mb.setText( BaseMessages.getString( PKG, "MySQLBulkLoaderDialog.InvalidConnection.DialogTitle" ) ); mb.open(); } }
private void getTableName() { DatabaseMeta inf = null; // New class: SelectTableDialog int connr = wConnection.getSelectionIndex(); if ( connr >= 0 ) { inf = transMeta.getDatabase( connr ); } if ( inf != null ) { if ( log.isDebug() ) { logDebug( BaseMessages.getString( PKG, "InsertUpdateDialog.Log.LookingAtConnection" ) + inf.toString() ); } DatabaseExplorerDialog std = new DatabaseExplorerDialog( shell, SWT.NONE, inf, transMeta.getDatabases() ); std.setSelectedSchemaAndTable( wSchema.getText(), wTable.getText() ); if ( std.open() ) { wSchema.setText( Const.NVL( std.getSchemaName(), "" ) ); wTable.setText( Const.NVL( std.getTableName(), "" ) ); setTableFieldCombo(); } } else { MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_ERROR ); mb.setMessage( BaseMessages.getString( PKG, "InsertUpdateDialog.InvalidConnection.DialogMessage" ) ); mb.setText( BaseMessages.getString( PKG, "InsertUpdateDialog.InvalidConnection.DialogTitle" ) ); mb.open(); } }
protected void getTableName() { DatabaseMeta inf = null; // New class: SelectTableDialog int connr = -1; if ( wConnection != null && wConnection.getCComboWidget() != null ) { connr = wConnection.getCComboWidget().getSelectionIndex(); } if ( connr >= 0 ) { inf = transMeta.getDatabase( connr ); } if ( inf != null ) { if ( log.isDebug() ) { logDebug( BaseMessages.getString( PKG, "MonetDBBulkLoaderDialog.Log.LookingAtConnection" ) + inf.toString() ); } DatabaseExplorerDialog std = new DatabaseExplorerDialog( shell, SWT.NONE, inf, transMeta.getDatabases() ); std.setSelectedSchemaAndTable( wSchema.getText(), wTable.getText() ); if ( std.open() ) { wSchema.setText( Const.NVL( std.getSchemaName(), "" ) ); wTable.setText( Const.NVL( std.getTableName(), "" ) ); } } else { MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_ERROR ); mb.setMessage( BaseMessages.getString( PKG, "MonetDBBulkLoaderDialog.InvalidConnection.DialogMessage" ) ); mb.setText( BaseMessages.getString( PKG, "MonetDBBulkLoaderDialog.InvalidConnection.DialogTitle" ) ); mb.open(); } }
private void getTableName() { DatabaseMeta inf = null; // New class: SelectTableDialog int connr = wConnection.getSelectionIndex(); if ( connr >= 0 ) { inf = transMeta.getDatabase( connr ); } if ( inf != null ) { if ( log.isDebug() ) { logDebug( BaseMessages.getString( PKG, "SynchronizeAfterMergeDialog.Log.LookingAtConnection" ) + inf.toString() ); } DatabaseExplorerDialog std = new DatabaseExplorerDialog( shell, SWT.NONE, inf, transMeta.getDatabases() ); std.setSelectedSchemaAndTable( wSchema.getText(), wTable.getText() ); if ( std.open() ) { wSchema.setText( Const.NVL( std.getSchemaName(), "" ) ); wTable.setText( Const.NVL( std.getTableName(), "" ) ); wTable.setFocus(); setTableFieldCombo(); } } else { MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_ERROR ); mb.setMessage( BaseMessages.getString( PKG, "SynchronizeAfterMergeDialog.InvalidConnection.DialogMessage" ) ); mb.setText( BaseMessages.getString( PKG, "SynchronizeAfterMergeDialog.InvalidConnection.DialogTitle" ) ); mb.open(); } }