當前位置: 首頁>>代碼示例>>Java>>正文


Java Const.NVL屬性代碼示例

本文整理匯總了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);
}
 
開發者ID:bcolas,項目名稱:pentaho-cassandra-plugin,代碼行數:40,代碼來源:CassandraOutputMeta.java

示例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 );
}
 
開發者ID:pentaho-labs,項目名稱:pentaho-mqtt-plugin,代碼行數:9,代碼來源:MQTTSubscriberMetaTest.java

示例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 );
}
 
開發者ID:pentaho-labs,項目名稱:pentaho-mqtt-plugin,代碼行數:7,代碼來源:MQTTPublisherMetaTest.java

示例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();
}
 
開發者ID:bcolas,項目名稱:pentaho-cassandra-plugin,代碼行數:41,代碼來源:CassandraOutputDialog.java


注:本文中的org.pentaho.di.core.Const.NVL屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。