本文整理汇总了Java中org.pentaho.di.trans.steps.rowgenerator.RowGeneratorMeta.setDefault方法的典型用法代码示例。如果您正苦于以下问题:Java RowGeneratorMeta.setDefault方法的具体用法?Java RowGeneratorMeta.setDefault怎么用?Java RowGeneratorMeta.setDefault使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.trans.steps.rowgenerator.RowGeneratorMeta
的用法示例。
在下文中一共展示了RowGeneratorMeta.setDefault方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: buildRowGeneratorStep
import org.pentaho.di.trans.steps.rowgenerator.RowGeneratorMeta; //导入方法依赖的package包/类
/**
* Builds a {@link RowGenerator} Step with a single String field.
*
* @param registry Plugin Registry.
* @param stepName Name to use for step
* @return {@link StepMeta} for a Row Generator step.
*/
private StepMeta buildRowGeneratorStep(PluginRegistry registry, String stepName) {
RowGeneratorMeta rm = new RowGeneratorMeta();
// Set the information of the row generator.
String rowGeneratorPid = registry.getPluginId(StepPluginType.class, rm);
StepMeta rowGeneratorStep = new StepMeta(rowGeneratorPid, stepName, rm);
String fieldName[] = { "string" }; //$NON-NLS-1$
String type[] = { "String" }; //$NON-NLS-1$
String value[] = { "string_value" }; //$NON-NLS-1$
String fieldFormat[] = { "" }; //$NON-NLS-1$
String group[] = { "" }; //$NON-NLS-1$
String decimal[] = { "" }; //$NON-NLS-1$
int intDummies[] = { -1, -1, -1 };
rm.setDefault();
rm.setFieldName(fieldName);
rm.setFieldType(type);
rm.setValue(value);
rm.setFieldLength(intDummies);
rm.setFieldPrecision(intDummies);
rm.setRowLimit("1"); //$NON-NLS-1$
rm.setFieldFormat(fieldFormat);
rm.setGroup(group);
rm.setDecimal(decimal);
return rowGeneratorStep;
}
示例2: buildRowGeneratorStep
import org.pentaho.di.trans.steps.rowgenerator.RowGeneratorMeta; //导入方法依赖的package包/类
/**
* Builds a {@link RowGenerator} Step with a single String field.
*
* @param registry Plugin Registry.
* @param stepName Name to use for step
* @return {@link StepMeta} for a Row Generator step.
*/
private StepMeta buildRowGeneratorStep(PluginRegistry registry, String stepName) {
RowGeneratorMeta rm = new RowGeneratorMeta();
// Set the information of the row generator.
String rowGeneratorPid = registry.getPluginId(StepPluginType.class, rm);
StepMeta rowGeneratorStep = new StepMeta(rowGeneratorPid, stepName, rm);
String fieldName[] = { "string" }; //$NON-NLS-1$
String type[] = { "String" }; //$NON-NLS-1$
String value[] = { "string_value" }; //$NON-NLS-1$
String fieldFormat[] = { "" }; //$NON-NLS-1$
String group[] = { "" }; //$NON-NLS-1$
String decimal[] = { "" }; //$NON-NLS-1$
String currency[] = { "", };
int intDummies[] = { -1, -1, -1 };
boolean setEmptystring[] = { false, false, false};
rm.setDefault();
rm.setFieldName(fieldName);
rm.setFieldType(type);
rm.setValue(value);
rm.setFieldLength(intDummies);
rm.setFieldPrecision(intDummies);
rm.setRowLimit("1"); //$NON-NLS-1$
rm.setFieldFormat(fieldFormat);
rm.setGroup(group);
rm.setDecimal(decimal);
rm.setCurrency(currency);
rm.setEmptyString(setEmptystring);
return rowGeneratorStep;
}
示例3: buildRowGeneratorStep
import org.pentaho.di.trans.steps.rowgenerator.RowGeneratorMeta; //导入方法依赖的package包/类
/**
* Builds a {@link org.pentaho.di.trans.steps.rowgenerator.RowGenerator} Step
* with a single String field.
*
* @param registry
* Plugin Registry.
* @param stepName
* Name to use for step
* @return {@link StepMeta} for a Row Generator step.
*/
private StepMeta buildRowGeneratorStep( PluginRegistry registry, String stepName ) {
RowGeneratorMeta rm = new RowGeneratorMeta();
// Set the information of the row generator.
String rowGeneratorPid = registry.getPluginId( StepPluginType.class, rm );
StepMeta rowGeneratorStep = new StepMeta( rowGeneratorPid, stepName, rm );
String[] fieldName = { "string" };
String[] type = { "String" };
String[] value = { "string_value" };
String[] fieldFormat = { "" };
String[] group = { "" };
String[] decimal = { "" };
String[] currency = { "", };
int[] intDummies = { -1, -1, -1 };
boolean[] setEmptystring = { false, false, false };
rm.setDefault();
rm.setFieldName( fieldName );
rm.setFieldType( type );
rm.setValue( value );
rm.setFieldLength( intDummies );
rm.setFieldPrecision( intDummies );
rm.setRowLimit( "1" );
rm.setFieldFormat( fieldFormat );
rm.setGroup( group );
rm.setDecimal( decimal );
rm.setCurrency( currency );
rm.setEmptyString( setEmptystring );
return rowGeneratorStep;
}
示例4: createRowGenerator
import org.pentaho.di.trans.steps.rowgenerator.RowGeneratorMeta; //导入方法依赖的package包/类
void createRowGenerator(
TransMeta transMeta, PluginRegistry registry,
String stepName, String[] values,
StepMeta mergeRowsStep, MergeRowsMeta mergeRowsMeta,
int index
) {
RowGeneratorMeta rowGeneratorMeta = new RowGeneratorMeta();
String rowGeneratorPid = registry.getPluginId( StepPluginType.class, rowGeneratorMeta );
StepMeta rowGeneratorStep = new StepMeta( rowGeneratorPid, stepName, rowGeneratorMeta );
transMeta.addStep( rowGeneratorStep );
rowGeneratorMeta.setDefault();
rowGeneratorMeta.setFieldName( fieldName );
rowGeneratorMeta.setFieldType( type );
rowGeneratorMeta.setFieldLength( intDummies );
rowGeneratorMeta.setFieldPrecision( intDummies );
rowGeneratorMeta.setRowLimit( "1" );
rowGeneratorMeta.setFieldFormat( fieldFormat );
rowGeneratorMeta.setGroup( group );
rowGeneratorMeta.setDecimal( decimal );
rowGeneratorMeta.setCurrency( currency );
rowGeneratorMeta.setEmptyString( setEmptystring );
rowGeneratorMeta.setValue( values );
TransHopMeta hi1 = new TransHopMeta( rowGeneratorStep, mergeRowsStep );
transMeta.addTransHop( hi1 );
List<StreamInterface> infoStreams = mergeRowsMeta.getStepIOMeta().getInfoStreams();
StreamInterface infoStream = infoStreams.get( index );
infoStream.setStepMeta( transMeta.findStep( stepName ) );
}