本文整理匯總了Java中org.pentaho.di.core.Const.NVL屬性的典型用法代碼示例。如果您正苦於以下問題:Java Const.NVL屬性的具體用法?Java Const.NVL怎麽用?Java Const.NVL使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類org.pentaho.di.core.Const
的用法示例。
在下文中一共展示了Const.NVL屬性的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: readRep
@Override
public void readRep(Repository rep, IMetaStore metastore, ObjectId id_step, List<DatabaseMeta> databases)
throws KettleException {
this.cassandraNodes = rep.getStepAttributeString(id_step, 0, CASSANDRA_NODES);
this.cassandraPort = rep.getStepAttributeString(id_step, 0, CASSANDRA_PORT);
this.username = rep.getStepAttributeString(id_step, 0, USERNAME);
this.password = rep.getStepAttributeString(id_step, 0, PASSWORD);
if (!Const.isEmpty(this.password)) {
this.password = Encr.decryptPasswordOptionallyEncrypted(this.password);
}
this.keyspace = rep.getStepAttributeString(id_step, 0, CASSANDRA_KEYSPACE);
this.SslEnabled = rep.getStepAttributeBoolean(id_step, 0, CASSANDRA_WITH_SSL);
this.trustStoreFilePath = rep.getStepAttributeString(id_step, 0, CASSANDRA_TRUSTSTORE_FILE_PATH);
this.trustStorePass = rep.getStepAttributeString(id_step, 0, CASSANDRA_TRUSTSTORE_PASS);
if (!Const.isEmpty(this.trustStorePass)) {
this.trustStorePass = Encr.decryptPasswordOptionallyEncrypted(this.trustStorePass);
}
this.columnfamily = rep.getStepAttributeString(id_step, 0, CASSANDRA_COLUMN_FAMILY);
this.syncMode = rep.getStepAttributeBoolean(id_step, 0, SYNC_ENABLED);
String batchSize = rep.getStepAttributeString(id_step, 0, BATCH_SIZE);
this.batchSize = (Const.isEmpty(batchSize) ? 1000 : Integer.valueOf(batchSize));
String sCompression = rep.getStepAttributeString(id_step, 0, QUERY_COMPRESSION);
this.compression = (Const.isEmpty(sCompression) ? ConnectionCompression.SNAPPY : ConnectionCompression.fromString(sCompression));
this.specifyFields = rep.getStepAttributeBoolean(id_step, 0, SPECIFY_FIELDS);
int nrCols = rep.countNrStepAttributes(id_step, COLUMN_NAME);
int nrStreams = rep.countNrStepAttributes(id_step, STREAM_NAME);
int nrRows = nrCols < nrStreams ? nrStreams : nrCols;
allocate(nrRows);
for (int idx = 0; idx < nrRows; idx++) {
this.cassandraFields[idx] = Const.NVL(rep.getStepAttributeString(id_step, idx, COLUMN_NAME), "");
this.streamFields[idx] = Const.NVL(rep.getStepAttributeString(id_step, idx, STREAM_NAME), "");
}
this.ttl = Const.toInt(rep.getStepAttributeString(id_step, 0, TTL), 0);
}
示例2: beforeClass
@BeforeClass public static void beforeClass() throws KettleException {
PluginRegistry.addPluginType( TwoWayPasswordEncoderPluginType.getInstance() );
PluginRegistry.addPluginType( ValueMetaPluginType.getInstance() );
PluginRegistry.init();
String
passwordEncoderPluginID =
Const.NVL( EnvUtil.getSystemProperty( Const.KETTLE_PASSWORD_ENCODER_PLUGIN ), "Kettle" );
Encr.init( passwordEncoderPluginID );
}
示例3: beforeClass
@BeforeClass public static void beforeClass() throws KettleException {
PluginRegistry.addPluginType( TwoWayPasswordEncoderPluginType.getInstance() );
PluginRegistry.addPluginType( ValueMetaPluginType.getInstance() );
PluginRegistry.init();
String passwordEncoderPluginID = Const.NVL( EnvUtil.getSystemProperty( Const.KETTLE_PASSWORD_ENCODER_PLUGIN ), "Kettle" );
Encr.init( passwordEncoderPluginID );
}
示例4: ok
private void ok() {
if (Const.isEmpty(this.stepnameText.getText())) {
return;
}
this.stepname = this.stepnameText.getText();
this.currentMeta.setCassandraNodes(this.hostText.getText());
this.currentMeta.setCassandraPort(this.portText.getText());
this.currentMeta.setUsername(this.userText.getText());
this.currentMeta.setPassword(this.passText.getText());
this.currentMeta.setKeyspace(this.keyspaceText.getText());
this.currentMeta.setColumnfamily(this.columnFamilyCombo.getText());
if (!this.originalMeta.equals(this.currentMeta)) {
this.currentMeta.setChanged();
this.changed = this.currentMeta.hasChanged();
}
this.currentMeta.setSslEnabled(this.sslenabledBut.getSelection());
this.currentMeta.setTrustStoreFilePath(this.truststorefileText.getText());
this.currentMeta.setTrustStorePass(this.truststorepassText.getText());
this.currentMeta.setSyncMode(this.syncModeEnabledBut.getSelection());
String batchSize = this.batchSizeText.getText();
this.currentMeta.setBatchSize(Const.isEmpty(batchSize) ? 0 : Integer.valueOf(batchSize));
this.currentMeta.setCompression(ConnectionCompression.fromString(this.wCompression.getText()));
this.currentMeta.setTtl(Const.toInt(this.ttlText.getText(), 0));
this.currentMeta.setSpecifyFields(this.specifyFieldsBut.getSelection());
int nrRows = this.fieldsList.nrNonEmpty();
this.currentMeta.allocate(nrRows);
String[] streamFields = this.currentMeta.getStreamFields();
String[] cassandraFields = this.currentMeta.getCassandraFields();
for (int i = 0; i < nrRows; i++) {
TableItem item = this.fieldsList.getNonEmpty(i);
cassandraFields[i] = Const.NVL(item.getText(1), "");
streamFields[i] = Const.NVL(item.getText(2), "");
}
dispose();
}