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


Java RowGeneratorMeta.setNeverEnding方法代码示例

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


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

示例1: createPDI14676Transformation

import org.pentaho.di.trans.steps.rowgenerator.RowGeneratorMeta; //导入方法依赖的package包/类
private String createPDI14676Transformation() throws IOException, KettleException {
  // Setup Transformation
  String rowGenStepName = "Generate Rows";
  RowGeneratorMeta rowGenMeta = new RowGeneratorMeta();
  rowGenMeta.setRowLimit( String.valueOf( Integer.MAX_VALUE ) );
  rowGenMeta.setNeverEnding( true );
  rowGenMeta.setIntervalInMs( "0" );
  rowGenMeta.allocate( 0 );

  TransMeta tMeta = TransTestFactory.generateTestTransformation( new Variables(), rowGenMeta, rowGenStepName );
  
  // Remove the Injector step, as it's not needed for this transformation
  TransHopMeta hopToRemove = tMeta.findTransHop( tMeta.findStep( TransTestFactory.INJECTOR_STEPNAME ), tMeta.findStep( rowGenStepName ) );
  tMeta.removeTransHop( tMeta.indexOfTransHop( hopToRemove ) );
  tMeta.removeStep( tMeta.indexOfStep( tMeta.findStep( TransTestFactory.INJECTOR_STEPNAME ) ) );

  // Write transformation to temp file, for use within a job
  String transFilename = TestUtilities.createEmptyTempFile( this.getClass().getSimpleName() + "_PDI14676_", ".ktr" );
  FileObject transFile = TestUtils.getFileObject( transFilename );
  OutputStream outStream = transFile.getContent().getOutputStream();
  PrintWriter pw = new PrintWriter( outStream );
  pw.write( tMeta.getXML() );
  pw.close();
  outStream.close();
  return transFilename;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:27,代码来源:JobEntryTransIntIT.java

示例2: getInfo

import org.pentaho.di.trans.steps.rowgenerator.RowGeneratorMeta; //导入方法依赖的package包/类
private void getInfo( RowGeneratorMeta meta ) throws KettleException {
  meta.setRowLimit( wLimit.getText() );
  meta.setNeverEnding( wNeverEnding.getSelection() );
  meta.setIntervalInMs( wInterval.getText() );
  meta.setRowTimeField( wRowTimeField.getText() );
  meta.setLastTimeField( wLastTimeField.getText() );

  int nrfields = wFields.nrNonEmpty();

  meta.allocate( nrfields );

  //CHECKSTYLE:Indentation:OFF
  for ( int i = 0; i < nrfields; i++ ) {
    TableItem item = wFields.getNonEmpty( i );

    meta.getFieldName()[i] = item.getText( 1 );

    meta.getFieldFormat()[i] = item.getText( 3 );
    String slength = item.getText( 4 );
    String sprec = item.getText( 5 );
    meta.getCurrency()[i] = item.getText( 6 );
    meta.getDecimal()[i] = item.getText( 7 );
    meta.getGroup()[i] = item.getText( 8 );
    meta.isSetEmptyString()[i] =
      BaseMessages.getString( PKG, "System.Combo.Yes" ).equalsIgnoreCase( item.getText( 10 ) );

    meta.getValue()[i] = meta.isSetEmptyString()[i] ? "" : item.getText( 9 );
    meta.getFieldType()[i] = meta.isSetEmptyString()[i] ? "String" : item.getText( 2 );
    meta.getFieldLength()[i] = Const.toInt( slength, -1 );
    meta.getFieldPrecision()[i] = Const.toInt( sprec, -1 );
  }

  // Performs checks...
  /*
   * Commented out verification : if variables are used, this check is a pain!
   *
   * long longLimit = Const.toLong(transMeta.environmentSubstitute( wLimit.getText()), -1L ); if (longLimit<0) { throw
   * new KettleException( BaseMessages.getString(PKG, "RowGeneratorDialog.Wrong.RowLimit.Number") ); }
   */
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:41,代码来源:RowGeneratorDialog.java


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