当前位置: 首页>>代码示例>>Java>>正文


Java Result.setRows方法代码示例

本文整理汇总了Java中org.pentaho.di.core.Result.setRows方法的典型用法代码示例。如果您正苦于以下问题:Java Result.setRows方法的具体用法?Java Result.setRows怎么用?Java Result.setRows使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.pentaho.di.core.Result的用法示例。


在下文中一共展示了Result.setRows方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: execute

import org.pentaho.di.core.Result; //导入方法依赖的package包/类
/**
 * Execute a job with previous results passed in.<br>
 * <br>
 * Execute called by JobEntryJob: don't clear the jobEntryResults.
 * @param nr The job entry number
 * @param result the result of the previous execution
 * @return Result of the job execution
 * @throws KettleJobException
 */
public Result execute(int nr, Result result) throws KettleException
{
	finished=false;
       
       // Where do we start?
       JobEntryCopy startpoint;

       // Perhaps there is already a list of input rows available?
       if (getSourceRows()!=null)
       {
           result.setRows(getSourceRows());
       }
       
       startpoint = jobMeta.findJobEntry(JobMeta.STRING_SPECIAL_START, 0, false);
       if (startpoint == null) 
       {
           throw new KettleJobException(Messages.getString("Job.Log.CounldNotFindStartingPoint"));
       }

	Result res =  execute(nr, result, startpoint, null, Messages.getString("Job.Reason.StartOfJobentry"));

	// Tell the world that we've finished processing this job...
	//
	fireJobListeners();
	
	return res;
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:37,代码来源:Job.java

示例2: getResult

import org.pentaho.di.core.Result; //导入方法依赖的package包/类
public Result getResult()
{
	if (steps==null) return null;

	Result result = new Result();

	for (int i=0;i<steps.size();i++)
	{
		StepMetaDataCombi sid = steps.get(i);
		BaseStep rt = (BaseStep)sid.step;

		result.setNrErrors(result.getNrErrors()+sid.step.getErrors());
		result.getResultFiles().putAll(rt.getResultFiles());

		if (transMeta.getReadStep()    !=null && rt.getStepname().equals(transMeta.getReadStep().getName()))     result.setNrLinesRead(result.getNrLinesRead()+ rt.getLinesRead());
		if (transMeta.getInputStep()   !=null && rt.getStepname().equals(transMeta.getInputStep().getName()))    result.setNrLinesInput(result.getNrLinesInput() + rt.getLinesInput());
		if (transMeta.getWriteStep()   !=null && rt.getStepname().equals(transMeta.getWriteStep().getName()))    result.setNrLinesWritten(result.getNrLinesWritten()+rt.getLinesWritten());
		if (transMeta.getOutputStep()  !=null && rt.getStepname().equals(transMeta.getOutputStep().getName()))   result.setNrLinesOutput(result.getNrLinesOutput()+rt.getLinesOutput());
		if (transMeta.getUpdateStep()  !=null && rt.getStepname().equals(transMeta.getUpdateStep().getName()))   result.setNrLinesUpdated(result.getNrLinesUpdated()+rt.getLinesUpdated());
           if (transMeta.getRejectedStep()!=null && rt.getStepname().equals(transMeta.getRejectedStep().getName())) result.setNrLinesRejected(result.getNrLinesRejected()+rt.getLinesRejected());
	}

	result.setRows( transMeta.getResultRows() );
	result.setStopped( isStopped() );

	return result;
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:28,代码来源:Trans.java

示例3: execute

import org.pentaho.di.core.Result; //导入方法依赖的package包/类
/**
 * Execute a job with previous results passed in.<br>
 * <br>
 * Execute called by JobEntryJob: don't clear the jobEntryResults.
 * @param nr The job entry number
 * @param result the result of the previous execution
 * @return Result of the job execution
 * @throws KettleJobException
 */
public Result execute(int nr, Result result) throws KettleException
{
	finished.set(false);
       active.set(true);
       initialized.set(true);

       // Where do we start?
       JobEntryCopy startpoint;

       // Perhaps there is already a list of input rows available?
       if (getSourceRows()!=null)
       {
           result.setRows(getSourceRows());
       }
       
       startpoint = jobMeta.findJobEntry(JobMeta.STRING_SPECIAL_START, 0, false);
       if (startpoint == null) 
       {
           throw new KettleJobException(BaseMessages.getString(PKG, "Job.Log.CounldNotFindStartingPoint"));
       }


	Result res =  execute(nr, result, startpoint, null, BaseMessages.getString(PKG, "Job.Reason.StartOfJobentry"));
	
       active.set(false);
       
	return res;
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:38,代码来源:Job.java

示例4: getResult

import org.pentaho.di.core.Result; //导入方法依赖的package包/类
public Result getResult()
{
	if (steps==null) return null;

	Result result = new Result();
	result.setNrErrors(errors.longValue());
	TransLogTable transLogTable = transMeta.getTransLogTable();

	for (int i=0;i<steps.size();i++)
	{
		StepMetaDataCombi sid = steps.get(i);
		StepInterface step = sid.step;

		result.setNrErrors(result.getNrErrors()+sid.step.getErrors());
		result.getResultFiles().putAll(step.getResultFiles());
		
		if (step.getStepname().equals(transLogTable.getSubjectString(TransLogTable.ID.LINES_READ))) result.setNrLinesRead(result.getNrLinesRead()+ step.getLinesRead());
		if (step.getStepname().equals(transLogTable.getSubjectString(TransLogTable.ID.LINES_INPUT))) result.setNrLinesInput(result.getNrLinesInput() + step.getLinesInput());
		if (step.getStepname().equals(transLogTable.getSubjectString(TransLogTable.ID.LINES_WRITTEN))) result.setNrLinesWritten(result.getNrLinesWritten()+step.getLinesWritten());
		if (step.getStepname().equals(transLogTable.getSubjectString(TransLogTable.ID.LINES_OUTPUT))) result.setNrLinesOutput(result.getNrLinesOutput()+step.getLinesOutput());
		if (step.getStepname().equals(transLogTable.getSubjectString(TransLogTable.ID.LINES_UPDATED))) result.setNrLinesUpdated(result.getNrLinesUpdated()+step.getLinesUpdated());
		if (step.getStepname().equals(transLogTable.getSubjectString(TransLogTable.ID.LINES_REJECTED))) result.setNrLinesRejected(result.getNrLinesRejected()+step.getLinesRejected());
	}

	result.setRows( transMeta.getResultRows() );
	result.setStopped( isStopped() );
	result.setLogChannelId(log.getLogChannelId());

	return result;
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:31,代码来源:Trans.java


注:本文中的org.pentaho.di.core.Result.setRows方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。