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


Java Row類代碼示例

本文整理匯總了Java中org.pentaho.di.trans.steps.rules.Rules.Row的典型用法代碼示例。如果您正苦於以下問題:Java Row類的具體用法?Java Row怎麽用?Java Row使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Row類屬於org.pentaho.di.trans.steps.rules.Rules包,在下文中一共展示了Row類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: loadRow

import org.pentaho.di.trans.steps.rules.Rules.Row; //導入依賴的package包/類
public void loadRow(Object[] r) throws Exception {
  // Store rows for processing
  Map<String, Object> columns = new Hashtable<String, Object>();
  for(String field : inputRowMeta.getFieldNames()) {
    columns.put(field, r[inputRowMeta.indexOfValue(field)]);
  }
  
  rowList.add(new Row(columns, true));
}
 
開發者ID:jjeb,項目名稱:kettle-trunk,代碼行數:10,代碼來源:RulesAccumulatorData.java

示例2: loadRow

import org.pentaho.di.trans.steps.rules.Rules.Row; //導入依賴的package包/類
public void loadRow( Object[] r ) throws Exception {
  // Store rows for processing
  Map<String, Object> columns = new Hashtable<String, Object>();
  for ( String field : inputRowMeta.getFieldNames() ) {
    columns.put( field, r[inputRowMeta.indexOfValue( field )] );
  }

  rowList.add( new Row( columns, true ) );
}
 
開發者ID:pentaho,項目名稱:pentaho-kettle,代碼行數:10,代碼來源:RulesAccumulatorData.java

示例3: processRow

import org.pentaho.di.trans.steps.rules.Rules.Row; //導入依賴的package包/類
public boolean processRow(StepMetaInterface smi, StepDataInterface sdi) throws KettleException {
  try {
    meta = (RulesAccumulatorMeta) smi;
    data = (RulesAccumulatorData) sdi;

    Object[] r = getRow(); // get row, set busy!

    if (r == null) // no more input to be expected...
    {
      data.execute();

      Object[] outputRow;

      String[] expectedResults = meta.getExpectedResultList();

      for (Row resultRow : data.getResultRows()) {
        outputRow = new Object[expectedResults.length];
        for (String columnName : expectedResults) {
          outputRow[data.getOutputRowMeta().indexOfValue(columnName)] = resultRow.getColumn().get(columnName);
        }
        putRow(data.getOutputRowMeta(), outputRow);
      }

      data.shutdown();
      setOutputDone();
      return false;
    }

    if (first) {
      if (!runtimeInit()) {
        return false;
      }

      first = false;
    }

    // Store the row for processing
    data.loadRow(r);

    return true;
  } catch (Exception e) {
    throw new KettleException(e);
  }
}
 
開發者ID:jjeb,項目名稱:kettle-trunk,代碼行數:45,代碼來源:RulesAccumulator.java

示例4: getResultRows

import org.pentaho.di.trans.steps.rules.Rules.Row; //導入依賴的package包/類
public List<Row> getResultRows() {
  return resultList;
}
 
開發者ID:jjeb,項目名稱:kettle-trunk,代碼行數:4,代碼來源:RulesAccumulatorData.java

示例5: processRow

import org.pentaho.di.trans.steps.rules.Rules.Row; //導入依賴的package包/類
public boolean processRow( StepMetaInterface smi, StepDataInterface sdi ) throws KettleException {
  try {
    meta = (RulesAccumulatorMeta) smi;
    data = (RulesAccumulatorData) sdi;

    Object[] r = getRow(); // get row, set busy!

    if ( r == null ) { // no more input to be expected...

      data.execute();

      Object[] outputRow;

      String[] expectedResults = meta.getExpectedResultList();

      for ( Row resultRow : data.getResultRows() ) {
        outputRow = new Object[expectedResults.length];
        for ( String columnName : expectedResults ) {
          outputRow[data.getOutputRowMeta().indexOfValue( columnName )] = resultRow.getColumn().get( columnName );
        }
        putRow( data.getOutputRowMeta(), outputRow );
      }

      data.shutdown();
      setOutputDone();
      return false;
    }

    if ( first ) {
      if ( !runtimeInit() ) {
        return false;
      }

      first = false;
    }

    // Store the row for processing
    data.loadRow( r );

    return true;
  } catch ( Exception e ) {
    throw new KettleException( e );
  }
}
 
開發者ID:pentaho,項目名稱:pentaho-kettle,代碼行數:45,代碼來源:RulesAccumulator.java


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