@SuppressWarnings( { "rawtypes", "unchecked" } ) public void addDatabases( XulMenuList wConnection, Class<? extends DatabaseInterface> databaseType ) { List<String> databases = new ArrayList<String>(); for ( int i = 0; i < transMeta.nrDatabases(); i++ ) { DatabaseMeta ci = transMeta.getDatabase( i ); if ( databaseType == null || ci.getDatabaseInterface().getClass().equals( databaseType ) ) { databases.add( ci.getName() ); } } wConnection.setElements( databases ); }
/** * Adds the databases with the specified type to the Combo Box component. * * @param wConnection the Combo Box component * @param databaseType the database type */ public void addDatabases( CCombo wConnection, Class<? extends DatabaseInterface> databaseType ) { for ( int i = 0; i < transMeta.nrDatabases(); i++ ) { DatabaseMeta ci = transMeta.getDatabase( i ); if ( databaseType == null || ci.getDatabaseInterface().getClass().equals( databaseType ) ) { wConnection.add( ci.getName() ); } } }
public void addDatabases( ComboVar wConnection, Class<? extends DatabaseInterface> databaseType ) { for ( int i = 0; i < transMeta.nrDatabases(); i++ ) { DatabaseMeta ci = transMeta.getDatabase( i ); if ( databaseType == null || ci.getDatabaseInterface().getClass().equals( databaseType ) ) { wConnection.add( ci.getName() ); } } // Add the metaDBConnectionName if we have it // and it is already not added to the list in wConnection. if ( !Utils.isEmpty( input.getDbConnectionName() ) ) { String[] arrayDatabaseList = wConnection.getItems(); if ( arrayDatabaseList == null ) { List<String> databaseNameList = Arrays.asList(); if ( !databaseNameList.contains( input.getDbConnectionName() ) ) { wConnection.add( input.getDbConnectionName() ); } } } }
} else if ( transMeta.nrDatabases() == 1 ) { wConnection.setText( transMeta.getDatabase( 0 ).getName() );
/** * Copy information from the meta-data input to the dialog fields. */ public void getData() { if ( log.isDebug() ) { logDebug( BaseMessages.getString( PKG, "DynamicSQLRowDialog.Log.GettingKeyInfo" ) ); } wSQL.setText( Const.NVL( input.getSql(), "" ) ); wLimit.setText( "" + input.getRowLimit() ); wOuter.setSelection( input.isOuterJoin() ); wuseVars.setSelection( input.isVariableReplace() ); if ( input.getSQLFieldName() != null ) { wSQLFieldName.setText( input.getSQLFieldName() ); } wqueryOnlyOnChange.setSelection( input.isQueryOnlyOnChange() ); if ( input.getDatabaseMeta() != null ) { wConnection.setText( input.getDatabaseMeta().getName() ); } else if ( transMeta.nrDatabases() == 1 ) { wConnection.setText( transMeta.getDatabase( 0 ).getName() ); } wStepname.selectAll(); wStepname.setFocus(); }
this.wConnection.setText( this.meta.getConnectionName().getValue() ); } else { if ( this.transMeta.nrDatabases() == 1 ) { this.wConnection.setText( this.transMeta.getDatabase( 0 ).getName() );
/** * Copy information from the meta-data input to the dialog fields. */ public void getData() { logDebug( BaseMessages.getString( PKG, "AddSequenceDialog.Log.GettingKeyInfo" ) ); if ( input.getValuename() != null ) { wValuename.setText( input.getValuename() ); } wUseDatabase.setSelection( input.isDatabaseUsed() ); if ( input.getDatabase() != null ) { wConnection.setText( input.getDatabase().getName() ); } else if ( transMeta.nrDatabases() == 1 ) { wConnection.setText( transMeta.getDatabase( 0 ).getName() ); } if ( input.getSchemaName() != null ) { wSchema.setText( input.getSchemaName() ); } if ( input.getSequenceName() != null ) { wSeqname.setText( input.getSequenceName() ); } wUseCounter.setSelection( input.isCounterUsed() ); wCounterName.setText( Const.NVL( input.getCounterName(), "" ) ); wStartAt.setText( input.getStartAt() ); wIncrBy.setText( input.getIncrementBy() ); wMaxVal.setText( input.getMaxValue() ); enableFields(); wStepname.selectAll(); wStepname.setFocus(); }
/** * Copy information from the meta-data input to the dialog fields. */ public void getData() { logDebug( BaseMessages.getString( PKG, "DatabaseJoinDialog.Log.GettingKeyInfo" ) ); wSQL.setText( Const.NVL( input.getSql(), "" ) ); wLimit.setText( "" + input.getRowLimit() ); wOuter.setSelection( input.isOuterJoin() ); wuseVars.setSelection( input.isVariableReplace() ); if ( input.getParameterField() != null ) { for ( int i = 0; i < input.getParameterField().length; i++ ) { TableItem item = wParam.table.getItem( i ); if ( input.getParameterField()[i] != null ) { item.setText( 1, input.getParameterField()[i] ); } if ( input.getParameterType()[i] != 0 ) { item.setText( 2, ValueMetaFactory.getValueMetaName( input.getParameterType()[i] ) ); } } } if ( input.getDatabaseMeta() != null ) { wConnection.setText( input.getDatabaseMeta().getName() ); } else if ( transMeta.nrDatabases() == 1 ) { wConnection.setText( transMeta.getDatabase( 0 ).getName() ); } wParam.setRowNums(); wParam.optWidth( true ); wStepname.selectAll(); wStepname.setFocus(); }
/** * Copy information from the meta-data input to the dialog fields. */ public void getData() { if ( log.isDebug() ) { logDebug( BaseMessages.getString( PKG, "TableExistsDialog.Log.GettingKeyInfo" ) ); } if ( input.getDatabase() != null ) { wConnection.setText( input.getDatabase().getName() ); } else if ( transMeta.nrDatabases() == 1 ) { wConnection.setText( transMeta.getDatabase( 0 ).getName() ); } if ( input.getDynamicTablenameField() != null ) { wTableName.setText( input.getDynamicTablenameField() ); } if ( input.getSchemaname() != null ) { wSchemaname.setText( input.getSchemaname() ); } if ( input.getResultFieldName() != null ) { wResult.setText( input.getResultFieldName() ); } wStepname.selectAll(); wStepname.setFocus(); }
} else if ( transMeta.nrDatabases() == 1 ) { wConnection.setText( transMeta.getDatabase( 0 ).getName() );
} else if ( transMeta.nrDatabases() == 1 ) { wConnection.setText( transMeta.getDatabase( 0 ).getName() );
wConnection.setText( input.getDatabaseMeta().getName() ); } else { if ( transMeta.nrDatabases() == 1 ) { wConnection.setText( transMeta.getDatabase( 0 ).getName() );
} else if ( transMeta.nrDatabases() == 1 ) { wConnection.setText( transMeta.getDatabase( 0 ).getName() );
} else if ( transMeta.nrDatabases() == 1 ) { wConnection.setText( transMeta.getDatabase( 0 ).getName() );
} else if ( transMeta.nrDatabases() == 1 ) { wConnection.setText( transMeta.getDatabase( 0 ).getName() );
wConnection.setText( input.getDatabaseMeta().getName() ); } else { if ( transMeta.nrDatabases() == 1 ) { wConnection.setText( transMeta.getDatabase( 0 ).getName() );
wConnection.setText( input.getDatabaseMeta().getName() ); } else { if ( transMeta.nrDatabases() == 1 ) { wConnection.setText( transMeta.getDatabase( 0 ).getName() );
} else if ( transMeta.nrDatabases() == 1 ) { wConnection.setText( transMeta.getDatabase( 0 ).getName() );
} else if ( transMeta.nrDatabases() == 1 ) { wConnection.setText( transMeta.getDatabase( 0 ).getName() );
} else if ( transMeta.nrDatabases() == 1 ) { wConnection.setText( transMeta.getDatabase( 0 ).getName() );