本文整理匯總了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));
}
示例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 ) );
}
示例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);
}
}
示例4: getResultRows
import org.pentaho.di.trans.steps.rules.Rules.Row; //導入依賴的package包/類
public List<Row> getResultRows() {
return resultList;
}
示例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 );
}
}