本文整理汇总了Java中org.pentaho.di.trans.steps.rowgenerator.RowGeneratorMeta.setFieldPrecision方法的典型用法代码示例。如果您正苦于以下问题:Java RowGeneratorMeta.setFieldPrecision方法的具体用法?Java RowGeneratorMeta.setFieldPrecision怎么用?Java RowGeneratorMeta.setFieldPrecision使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.trans.steps.rowgenerator.RowGeneratorMeta
的用法示例。
在下文中一共展示了RowGeneratorMeta.setFieldPrecision方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createRowGeneratorStep
import org.pentaho.di.trans.steps.rowgenerator.RowGeneratorMeta; //导入方法依赖的package包/类
/**
* Creates a row generator step for this class..
*
* @param name
* @param registry
* @return
*/
private StepMeta createRowGeneratorStep(String name, PluginRegistry registry) {
// Default the name if it is empty
String testFileOutputName = (Const.isEmpty(name)?"generate rows":name);
// create the RowGenerator and Step Meta
RowGeneratorMeta rowGeneratorMeta = new RowGeneratorMeta();
String rowGeneratorPid = registry.getPluginId(StepPluginType.class, rowGeneratorMeta);
StepMeta generateRowsStep = new StepMeta(rowGeneratorPid, testFileOutputName, rowGeneratorMeta);
// Set the field names, types and values
rowGeneratorMeta.setFieldName(new String[]{"Id", "State", "City"});
rowGeneratorMeta.setFieldType(new String[]{"Integer", "String", "String"});
rowGeneratorMeta.setValue(new String[]{"1", "Florida", "Orlando"});
rowGeneratorMeta.setFieldLength(new int[]{-1, -1, -1});
rowGeneratorMeta.setFieldPrecision(new int[]{-1, -1, -1});
rowGeneratorMeta.setGroup(new String[]{"", "", ""});
rowGeneratorMeta.setDecimal(new String[]{"", "", ""});
rowGeneratorMeta.setFieldFormat(new String[]{"", "", ""});
rowGeneratorMeta.setRowLimit("10");
// return the step meta
return generateRowsStep;
}
示例2: createRowGeneratorStep
import org.pentaho.di.trans.steps.rowgenerator.RowGeneratorMeta; //导入方法依赖的package包/类
/**
* Creates a row generator step for this class..
*
* @param name
* @param registry
* @return
*/
private StepMeta createRowGeneratorStep(String name, PluginRegistry registry) {
// Default the name if it is empty
String testFileOutputName = (Const.isEmpty(name)?"generate rows":name);
// create the RowGenerator and Step Meta
RowGeneratorMeta rowGeneratorMeta = new RowGeneratorMeta();
String rowGeneratorPid = registry.getPluginId(StepPluginType.class, rowGeneratorMeta);
StepMeta generateRowsStep = new StepMeta(rowGeneratorPid, testFileOutputName, rowGeneratorMeta);
// Set the field names, types and values
rowGeneratorMeta.setFieldName(new String[]{"Id", "State", "City"});
rowGeneratorMeta.setFieldType(new String[]{"Integer", "String", "String"});
rowGeneratorMeta.setValue(new String[]{"1", "Orlando", "Florida"});
rowGeneratorMeta.setFieldLength(new int[]{-1, -1, -1});
rowGeneratorMeta.setFieldPrecision(new int[]{-1, -1, -1});
rowGeneratorMeta.setGroup(new String[]{"", "", ""});
rowGeneratorMeta.setDecimal(new String[]{"", "", ""});
rowGeneratorMeta.setCurrency(new String[]{"", "", ""});
rowGeneratorMeta.setFieldFormat(new String[]{"", "", ""});
rowGeneratorMeta.setRowLimit("10");
// return the step meta
return generateRowsStep;
}
示例3: createRowGeneratorStep
import org.pentaho.di.trans.steps.rowgenerator.RowGeneratorMeta; //导入方法依赖的package包/类
/**
* Creates a row generator step for this class..
*
* @param name
* @param registry
* @return
*/
private StepMeta createRowGeneratorStep(String name, PluginRegistry registry) {
// Default the name if it is empty
String testFileOutputName = (Const.isEmpty(name)?"generate rows":name);
// create the RowGenerator and Step Meta
RowGeneratorMeta rowGeneratorMeta = new RowGeneratorMeta();
String rowGeneratorPid = registry.getPluginId(StepPluginType.class, rowGeneratorMeta);
StepMeta generateRowsStep = new StepMeta(rowGeneratorPid, testFileOutputName, rowGeneratorMeta);
// Set the field names, types and values
rowGeneratorMeta.setFieldName(new String[]{"Id", "State", "City"});
rowGeneratorMeta.setFieldType(new String[]{"Integer", "String", "String"});
rowGeneratorMeta.setValue(new String[]{"1", "Florida", "Orlando"});
rowGeneratorMeta.setFieldLength(new int[]{-1, -1, -1});
rowGeneratorMeta.setFieldPrecision(new int[]{-1, -1, -1});
rowGeneratorMeta.setGroup(new String[]{"", "", ""});
rowGeneratorMeta.setDecimal(new String[]{"", "", ""});
rowGeneratorMeta.setCurrency(new String[]{"", "", ""});
rowGeneratorMeta.setFieldFormat(new String[]{"", "", ""});
rowGeneratorMeta.setRowLimit("10");
// return the step meta
return generateRowsStep;
}
示例4: createRowGeneratorStep
import org.pentaho.di.trans.steps.rowgenerator.RowGeneratorMeta; //导入方法依赖的package包/类
/**
* Creates a row generator step for this class..
*
* @param name
* @param registry
* @return
*/
private StepMeta createRowGeneratorStep( String name, PluginRegistry registry ) {
// Default the name if it is empty
String testFileOutputName = ( Utils.isEmpty( name ) ? "generate rows" : name );
// create the RowGenerator and Step Meta
RowGeneratorMeta rowGeneratorMeta = new RowGeneratorMeta();
String rowGeneratorPid = registry.getPluginId( StepPluginType.class, rowGeneratorMeta );
StepMeta generateRowsStep = new StepMeta( rowGeneratorPid, testFileOutputName, rowGeneratorMeta );
// Set the field names, types and values
rowGeneratorMeta.setFieldName( new String[] { "Id", "State", "City" } );
rowGeneratorMeta.setFieldType( new String[] { "Integer", "String", "String" } );
rowGeneratorMeta.setValue( new String[] { "1", "Orlando", "Florida" } );
rowGeneratorMeta.setFieldLength( new int[] { -1, -1, -1 } );
rowGeneratorMeta.setFieldPrecision( new int[] { -1, -1, -1 } );
rowGeneratorMeta.setGroup( new String[] { "", "", "" } );
rowGeneratorMeta.setDecimal( new String[] { "", "", "" } );
rowGeneratorMeta.setCurrency( new String[] { "", "", "" } );
rowGeneratorMeta.setFieldFormat( new String[] { "", "", "" } );
rowGeneratorMeta.setRowLimit( "10" );
// return the step meta
return generateRowsStep;
}
示例5: createRowGeneratorStep
import org.pentaho.di.trans.steps.rowgenerator.RowGeneratorMeta; //导入方法依赖的package包/类
/**
* Creates a row generator step for this class..
*
* @param name
* @param registry
* @return
*/
private StepMeta createRowGeneratorStep( String name, PluginRegistry registry ) {
// Default the name if it is empty
String testFileOutputName = ( Utils.isEmpty( name ) ? "generate rows" : name );
// create the RowGenerator and Step Meta
RowGeneratorMeta rowGeneratorMeta = new RowGeneratorMeta();
String rowGeneratorPid = registry.getPluginId( StepPluginType.class, rowGeneratorMeta );
StepMeta generateRowsStep = new StepMeta( rowGeneratorPid, testFileOutputName, rowGeneratorMeta );
// Set the field names, types and values
rowGeneratorMeta.setFieldName( new String[] { "Id", "State", "City" } );
rowGeneratorMeta.setFieldType( new String[] { "Integer", "String", "String" } );
rowGeneratorMeta.setValue( new String[] { "1", "Florida", "Orlando" } );
rowGeneratorMeta.setFieldLength( new int[] { -1, -1, -1 } );
rowGeneratorMeta.setFieldPrecision( new int[] { -1, -1, -1 } );
rowGeneratorMeta.setGroup( new String[] { "", "", "" } );
rowGeneratorMeta.setDecimal( new String[] { "", "", "" } );
rowGeneratorMeta.setCurrency( new String[] { "", "", "" } );
rowGeneratorMeta.setFieldFormat( new String[] { "", "", "" } );
rowGeneratorMeta.setRowLimit( "10" );
// return the step meta
return generateRowsStep;
}
示例6: 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;
}
示例7: 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;
}
示例8: 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;
}
示例9: 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 ) );
}