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


Java StepMetaInterface.getTableFields方法代碼示例

本文整理匯總了Java中org.pentaho.di.trans.step.StepMetaInterface.getTableFields方法的典型用法代碼示例。如果您正苦於以下問題:Java StepMetaInterface.getTableFields方法的具體用法?Java StepMetaInterface.getTableFields怎麽用?Java StepMetaInterface.getTableFields使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.pentaho.di.trans.step.StepMetaInterface的用法示例。


在下文中一共展示了StepMetaInterface.getTableFields方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: analyseImpact

import org.pentaho.di.trans.step.StepMetaInterface; //導入方法依賴的package包/類
/**
 * This procedure determines the impact of the different steps in a transformation on databases, tables and field.
 *
 * @param impact An ArrayList of DatabaseImpact objects.
 *
 */
public void analyseImpact(List<DatabaseImpact> impact, ProgressMonitorListener monitor) throws KettleStepException
{
    if (monitor != null)
    {
        monitor.beginTask(Messages.getString("TransMeta.Monitor.DeterminingImpactTask.Title"), nrSteps()); //$NON-NLS-1$
    }
    boolean stop = false;
    for (int i = 0; i < nrSteps() && !stop; i++)
    {
        if (monitor != null) monitor.subTask(Messages.getString("TransMeta.Monitor.LookingAtStepTask.Title") + (i + 1) + "/" + nrSteps()); //$NON-NLS-1$ //$NON-NLS-2$
        StepMeta stepMeta = getStep(i);

        RowMetaInterface prev = getPrevStepFields(stepMeta);
        StepMetaInterface stepint = stepMeta.getStepMetaInterface();
        RowMetaInterface inform = null;
        StepMeta[] lu = getInfoStep(stepMeta);
        if (lu != null)
        {
            inform = getStepFields(lu);
        }
        else
        {
            inform = stepint.getTableFields();
        }

        stepint.analyseImpact(impact, this, stepMeta, prev, null, null, inform);

        if (monitor != null)
        {
            monitor.worked(1);
            stop = monitor.isCanceled();
        }
    }

    if (monitor != null) monitor.done();
}
 
開發者ID:icholy,項目名稱:geokettle-2.0,代碼行數:43,代碼來源:TransMeta.java

示例2: getThisStepFields

import org.pentaho.di.trans.step.StepMetaInterface; //導入方法依賴的package包/類
/**
 * Returns the fields that are emitted by a step
 *
 * @param stepMeta : The StepMeta object that's being queried
 * @param nextStep : if non-null this is the next step that's call back to ask what's being sent
 * @param row : A row containing the input fields or an empty row if no input is required.
 *
 * @return A Row containing the output fields.
 */
public RowMetaInterface getThisStepFields(StepMeta stepMeta, StepMeta nextStep, RowMetaInterface row, ProgressMonitorListener monitor) throws KettleStepException
{
    // Then this one.
	if(log.isDebug()) log.logDebug(BaseMessages.getString(PKG, "TransMeta.Log.GettingFieldsFromStep",stepMeta.getName(), stepMeta.getStepID())); //$NON-NLS-1$ //$NON-NLS-2$
    String name = stepMeta.getName();

    if (monitor != null)
    {
        monitor.subTask(BaseMessages.getString(PKG, "TransMeta.Monitor.GettingFieldsFromStepTask.Title", name )); //$NON-NLS-1$ //$NON-NLS-2$
    }

    StepMetaInterface stepint = stepMeta.getStepMetaInterface();
    RowMetaInterface inform[] = null;
    StepMeta[] lu = getInfoStep(stepMeta);
    if (Const.isEmpty(lu))
    {
        inform = new RowMetaInterface[] { stepint.getTableFields(), };
    }
    else
    {
        inform = new RowMetaInterface[lu.length];
        for (int i=0;i<lu.length;i++) inform[i] = getStepFields(lu[i]);
    }

    setRepositoryOnMappingSteps();
    
    // Go get the fields...
    //
    stepint.getFields(row, name, inform, nextStep, this);

    return row;
}
 
開發者ID:yintaoxue,項目名稱:read-open-source-code,代碼行數:42,代碼來源:TransMeta.java

示例3: analyseImpact

import org.pentaho.di.trans.step.StepMetaInterface; //導入方法依賴的package包/類
/**
 * This procedure determines the impact of the different steps in a transformation on databases, tables and field.
 *
 * @param impact An ArrayList of DatabaseImpact objects.
 *
 */
public void analyseImpact(List<DatabaseImpact> impact, ProgressMonitorListener monitor) throws KettleStepException
{
    if (monitor != null)
    {
        monitor.beginTask(BaseMessages.getString(PKG, "TransMeta.Monitor.DeterminingImpactTask.Title"), nrSteps()); //$NON-NLS-1$
    }
    boolean stop = false;
    for (int i = 0; i < nrSteps() && !stop; i++)
    {
        if (monitor != null) monitor.subTask(BaseMessages.getString(PKG, "TransMeta.Monitor.LookingAtStepTask.Title") + (i + 1) + "/" + nrSteps()); //$NON-NLS-1$ //$NON-NLS-2$
        StepMeta stepMeta = getStep(i);

        RowMetaInterface prev = getPrevStepFields(stepMeta);
        StepMetaInterface stepint = stepMeta.getStepMetaInterface();
        RowMetaInterface inform = null;
        StepMeta[] lu = getInfoStep(stepMeta);
        if (lu != null)
        {
            inform = getStepFields(lu);
        }
        else
        {
            inform = stepint.getTableFields();
        }

        stepint.analyseImpact(impact, this, stepMeta, prev, null, null, inform);

        if (monitor != null)
        {
            monitor.worked(1);
            stop = monitor.isCanceled();
        }
    }

    if (monitor != null) monitor.done();
}
 
開發者ID:yintaoxue,項目名稱:read-open-source-code,代碼行數:43,代碼來源:TransMeta.java

示例4: getThisStepFields

import org.pentaho.di.trans.step.StepMetaInterface; //導入方法依賴的package包/類
/**
 * Returns the fields that are emitted by a step
 *
 * @param stepMeta : The StepMeta object that's being queried
 * @param nextStep : if non-null this is the next step that's call back to ask what's being sent
 * @param row : A row containing the input fields or an empty row if no input is required.
 *
 * @return A Row containing the output fields.
 */
public RowMetaInterface getThisStepFields(StepMeta stepMeta, StepMeta nextStep, RowMetaInterface row, ProgressMonitorListener monitor) throws KettleStepException
{
    // Then this one.
	if(log.isDebug()) log.logDebug(toString(), Messages.getString("TransMeta.Log.GettingFieldsFromStep",stepMeta.getName(), stepMeta.getStepID())); //$NON-NLS-1$ //$NON-NLS-2$
    String name = stepMeta.getName();

    if (monitor != null)
    {
        monitor.subTask(Messages.getString("TransMeta.Monitor.GettingFieldsFromStepTask.Title", name )); //$NON-NLS-1$ //$NON-NLS-2$
    }

    StepMetaInterface stepint = stepMeta.getStepMetaInterface();
    RowMetaInterface inform[] = null;
    StepMeta[] lu = getInfoStep(stepMeta);
    if (Const.isEmpty(lu))
    {
        inform = new RowMetaInterface[] { stepint.getTableFields(), };
    }
    else
    {
        inform = new RowMetaInterface[lu.length];
        for (int i=0;i<lu.length;i++) inform[i] = getStepFields(lu[i]);
    }

    // Set the Repository object on the Mapping step
    // That way the mapping step can determine the output fields for repository hosted mappings...
    // This is the exception to the rule so we don't pass this through the getFields() method.
    //
    for (StepMeta step : steps)
    {
    	if (step.getStepMetaInterface() instanceof MappingMeta) 
    	{
    		((MappingMeta)step.getStepMetaInterface()).setRepository(repository);
    	}
    }
    
    // Go get the fields...
    //
    stepint.getFields(row, name, inform, nextStep, this);

    return row;
}
 
開發者ID:icholy,項目名稱:geokettle-2.0,代碼行數:52,代碼來源:TransMeta.java


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