本文整理匯總了Java中org.pentaho.di.core.Const.sortStrings方法的典型用法代碼示例。如果您正苦於以下問題:Java Const.sortStrings方法的具體用法?Java Const.sortStrings怎麽用?Java Const.sortStrings使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.pentaho.di.core.Const
的用法示例。
在下文中一共展示了Const.sortStrings方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setComboBoxes
import org.pentaho.di.core.Const; //導入方法依賴的package包/類
/**
* Sets the input stream field names in the JSON field drop down, and the Stream field drop down in the field
* mapping table.
*/
private void setComboBoxes() {
// Something was changed in the row.
//
final Map<String, Integer> fields = new HashMap<>();
// Add the currentMeta fields...
fields.putAll( inputFields );
Set<String> keySet = fields.keySet();
List<String> entries = new ArrayList<>( keySet );
String[] fieldNames = entries.toArray( new String[entries.size()] );
Const.sortStrings( fieldNames );
colinf[0].setComboValues( fieldNames );
}
示例2: setComboBoxes
import org.pentaho.di.core.Const; //導入方法依賴的package包/類
protected void setComboBoxes() {
// Something was changed in the row.
//
final Map<String, Integer> fields = new HashMap<String, Integer>();
// Add the currentMeta fields...
fields.putAll( inputFields );
Set<String> keySet = fields.keySet();
List<String> entries = new ArrayList<String>( keySet );
String[] fieldNames = entries.toArray( new String[entries.size()] );
Const.sortStrings( fieldNames );
colinf[0].setComboValues( fieldNames );
// colinfHeaders[0].setComboValues(fieldNames);
}
示例3: setComboBoxes
import org.pentaho.di.core.Const; //導入方法依賴的package包/類
protected void setComboBoxes() {
// Something was changed in the row.
//
final Map<String, Integer> fields = new HashMap<String, Integer>();
// Add the currentMeta fields...
fields.putAll( inputFields );
Set<String> keySet = fields.keySet();
List<String> entries = new ArrayList<String>( keySet );
String[] fieldNames = entries.toArray( new String[entries.size()] );
Const.sortStrings( fieldNames );
colinf[0].setComboValues( fieldNames );
}
示例4: setStreamFieldCombo
import org.pentaho.di.core.Const; //導入方法依賴的package包/類
private void setStreamFieldCombo() {
Runnable fieldLoader = new Runnable() {
@Override
public void run() {
try {
StepMeta stepMeta = transMeta.findStep(stepname);
RowMetaInterface row = transMeta.getPrevStepFields(stepMeta);
if ((row != null) && (inputFields.size() == 0)) {
for (int i = 0; i < row.size(); i++) {
inputFields.put(row.getValueMeta(i).getName(), i);
}
}
} catch (KettleException e) {
logError(BaseMessages.getString(CassandraOutputDialog.PKG, "System.Dialog.GetFieldsFailed.Message"));
}
Set<String> keySet = inputFields.keySet();
List<String> entries = new ArrayList<>(keySet);
String[] fieldNames = entries.toArray(new String[entries.size()]);
Const.sortStrings(fieldNames);
if (!fieldsList.isDisposed()) {
ciFields[1].setComboValues(fieldNames);
}
}
};
this.shell.getDisplay().asyncExec(fieldLoader);
}
示例5: getSchemaNames
import org.pentaho.di.core.Const; //導入方法依賴的package包/類
/**
* Presents a dialog box to select a schema from the database. Then sets the selected schema in the dialog
*/
private void getSchemaNames() {
DatabaseMeta databaseMeta = transMeta.findDatabase( wConnection.getText() );
if ( databaseMeta != null ) {
Database database = new Database( loggingObject, databaseMeta );
try {
database.connect();
String[] schemas = database.getSchemas();
if ( null != schemas && schemas.length > 0 ) {
schemas = Const.sortStrings( schemas );
EnterSelectionDialog dialog =
new EnterSelectionDialog( shell, schemas, BaseMessages.getString(
PKG, "SnowflakeBulkLoader.Dialog.AvailableSchemas.Title", wConnection.getText() ), BaseMessages
.getString( PKG, "SnowflakeBulkLoader.Dialog.AvailableSchemas.Message", wConnection.getText() ) );
String d = dialog.open();
if ( d != null ) {
wSchema.setText( Const.NVL( d, "" ) );
setTableFieldCombo();
}
} else {
MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_ERROR );
mb.setMessage( BaseMessages.getString( PKG, "SnowflakeBulkLoader.Dialog.NoSchema.Error" ) );
mb.setText( BaseMessages.getString( PKG, "SnowflakeBulkLoader.Dialog.GetSchemas.Error" ) );
mb.open();
}
} catch ( Exception e ) {
new ErrorDialog( shell, BaseMessages.getString( PKG, "System.Dialog.Error.Title" ), BaseMessages
.getString( PKG, "SnowflakeBulkLoader.Dialog.ErrorGettingSchemas" ), e );
} finally {
database.disconnect();
}
}
}
示例6: setComboBoxes
import org.pentaho.di.core.Const; //導入方法依賴的package包/類
protected void setComboBoxes() {
final Map<String, Integer> fields = new HashMap<String, Integer>();
fields.putAll(inputFields);
Set<String> keySet = fields.keySet();
List<String> entries = new ArrayList<String>(keySet);
String[] fieldNames = entries.toArray(new String[entries.size()]);
Const.sortStrings(fieldNames);
columnInfos[0].setComboValues(fieldNames);
}