本文整理汇总了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 );
}
}