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


Java RowGeneratorMeta.getFieldLength方法代码示例

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


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

示例1: generateTestTransformation

import org.pentaho.di.trans.steps.rowgenerator.RowGeneratorMeta; //导入方法依赖的package包/类
public static Trans generateTestTransformation()
{
    RowGeneratorMeta A = new RowGeneratorMeta();
    A.allocate(3);
    A.setRowLimit("100000000");

    A.getFieldName()[0]   = "ID"; 
    A.getFieldType()[0]   = ValueMeta.getTypeDesc(ValueMetaInterface.TYPE_INTEGER);
    A.getFieldLength()[0] = 7; 
    A.getValue()[0]       = "1234"; 
    
    A.getFieldName()[1]   = "Name"; 
    A.getFieldType()[1]   = ValueMeta.getTypeDesc(ValueMetaInterface.TYPE_STRING);
    A.getFieldLength()[1] = 35; 
    A.getValue()[1]       = "Some name"; 

    A.getFieldName()[2]   = "Last updated"; 
    A.getFieldType()[2]   = ValueMeta.getTypeDesc(ValueMetaInterface.TYPE_DATE);
    A.getFieldFormat()[2] = "yyyy/MM/dd"; 
    A.getValue()[2]       = "2006/11/13"; 

    TransMeta transMeta = TransPreviewFactory.generatePreviewTransformation(null, A, "A");
    transMeta.setName("Row generator test");
    transMeta.setSizeRowset(2500);
    transMeta.setFeedbackSize(50000);
    transMeta.setUsingThreadPriorityManagment(false);

    return new Trans(transMeta);
    
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:31,代码来源:Carte.java

示例2: getInfo

import org.pentaho.di.trans.steps.rowgenerator.RowGeneratorMeta; //导入方法依赖的package包/类
private void getInfo(RowGeneratorMeta meta) throws KettleException
{
    meta.setRowLimit( wLimit.getText() );
    
    int nrfields = wFields.nrNonEmpty();

    meta.allocate(nrfields);

    for (int i=0;i<nrfields;i++)
    {
        TableItem item = wFields.getNonEmpty(i);
        
        meta.getFieldName()[i]   = item.getText(1);
        meta.getFieldType()[i]   = item.getText(2);
        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.getValue()[i]       = item.getText(9);
        
        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( Messages.getString("RowGeneratorDialog.Wrong.RowLimit.Number") );
    }
    */
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:38,代码来源:RowGeneratorDialog.java

示例3: getInfo

import org.pentaho.di.trans.steps.rowgenerator.RowGeneratorMeta; //导入方法依赖的package包/类
private void getInfo(RowGeneratorMeta meta) throws KettleException
{
    meta.setRowLimit( wLimit.getText() );
    
    int nrfields = wFields.nrNonEmpty();

    meta.allocate(nrfields);

    for (int i=0;i<nrfields;i++)
    {
        TableItem item = wFields.getNonEmpty(i);
        
        meta.getFieldName()[i]   = item.getText(1);
        meta.getFieldType()[i]   = item.getText(2);
        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.getValue()[i]       = item.getText(9);
        
        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:yintaoxue,项目名称:read-open-source-code,代码行数:38,代码来源:RowGeneratorDialog.java

示例4: generateTestTransformation

import org.pentaho.di.trans.steps.rowgenerator.RowGeneratorMeta; //导入方法依赖的package包/类
public static Trans generateTestTransformation() {
  RowGeneratorMeta A = new RowGeneratorMeta();
  A.allocate(3);
  A.setRowLimit("10000000");

  A.getFieldName()[0] = "ID";
  A.getFieldType()[0] = ValueMeta.getTypeDesc(ValueMetaInterface.TYPE_INTEGER);
  A.getFieldLength()[0] = 7;
  A.getValue()[0] = "1234";

  A.getFieldName()[1] = "Name";
  A.getFieldType()[1] = ValueMeta.getTypeDesc(ValueMetaInterface.TYPE_STRING);
  A.getFieldLength()[1] = 35;
  A.getValue()[1] = "Some name";

  A.getFieldName()[2] = "Last updated";
  A.getFieldType()[2] = ValueMeta.getTypeDesc(ValueMetaInterface.TYPE_DATE);
  A.getFieldFormat()[2] = "yyyy/MM/dd";
  A.getValue()[2] = "2010/02/09";

  TransMeta transMeta = TransPreviewFactory.generatePreviewTransformation(null, A, "A");
  transMeta.setName("CarteUnitTest");
  transMeta.setSizeRowset(2500);
  transMeta.setFeedbackSize(50000);
  transMeta.setUsingThreadPriorityManagment(false);

  return new Trans(transMeta);
}
 
开发者ID:bsspirit,项目名称:kettle-4.4.0-stable,代码行数:29,代码来源:CarteTest.java

示例5: generateTestTransformation

import org.pentaho.di.trans.steps.rowgenerator.RowGeneratorMeta; //导入方法依赖的package包/类
public static Trans generateTestTransformation()
{
    RowGeneratorMeta A = new RowGeneratorMeta();
    A.allocate(3);
    A.setRowLimit("100000000");

    A.getFieldName()[0]   = "ID"; 
    A.getFieldType()[0]   = ValueMeta.getTypeDesc(ValueMetaInterface.TYPE_INTEGER);
    A.getFieldLength()[0] = 7; 
    A.getValue()[0]       = "1234"; 
    
    A.getFieldName()[1]   = "Name"; 
    A.getFieldType()[1]   = ValueMeta.getTypeDesc(ValueMetaInterface.TYPE_STRING);
    A.getFieldLength()[1] = 35; 
    A.getValue()[1]       = "Some name"; 

    A.getFieldName()[2]   = "Last updated"; 
    A.getFieldType()[2]   = ValueMeta.getTypeDesc(ValueMetaInterface.TYPE_DATE);
    A.getFieldFormat()[2] = "yyyy/MM/dd"; 
    A.getValue()[2]       = "2006/11/13"; 

    TransMeta transMeta = TransPreviewFactory.generatePreviewTransformation(null, A, "A");
    transMeta.setName("Row generator test");
    transMeta.setSizeRowset(2500);
    transMeta.setFeedbackSize(50000);
    transMeta.setUsingThreadPriorityManagment(false);

    return new Trans(transMeta);
}
 
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:30,代码来源:Carte.java

示例6: getInfo

import org.pentaho.di.trans.steps.rowgenerator.RowGeneratorMeta; //导入方法依赖的package包/类
private void getInfo(RowGeneratorMeta meta) throws KettleException
{
    meta.setRowLimit( wLimit.getText() );
    
    int nrfields = wFields.nrNonEmpty();

    meta.allocate(nrfields);

    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:jjeb,项目名称:kettle-trunk,代码行数:40,代码来源:RowGeneratorDialog.java

示例7: generateTestTransformation

import org.pentaho.di.trans.steps.rowgenerator.RowGeneratorMeta; //导入方法依赖的package包/类
public static Trans generateTestTransformation() {
  RowGeneratorMeta A = new RowGeneratorMeta();
  A.allocate( 3 );
  A.setRowLimit( "10000000" );

  A.getFieldName()[0] = "ID";
  A.getFieldType()[0] = ValueMetaFactory.getValueMetaName( ValueMetaInterface.TYPE_INTEGER );
  A.getFieldLength()[0] = 7;
  A.getValue()[0] = "1234";

  A.getFieldName()[1] = "Name";
  A.getFieldType()[1] = ValueMetaFactory.getValueMetaName( ValueMetaInterface.TYPE_STRING );
  A.getFieldLength()[1] = 35;
  A.getValue()[1] = "Some name";

  A.getFieldName()[2] = "Last updated";
  A.getFieldType()[2] = ValueMetaFactory.getValueMetaName( ValueMetaInterface.TYPE_DATE );
  A.getFieldFormat()[2] = "yyyy/MM/dd";
  A.getValue()[2] = "2010/02/09";

  TransMeta transMeta = TransPreviewFactory.generatePreviewTransformation( null, A, "A" );
  transMeta.setName( "CarteUnitTest" );
  transMeta.setSizeRowset( 2500 );
  transMeta.setFeedbackSize( 50000 );
  transMeta.setUsingThreadPriorityManagment( false );

  return new Trans( transMeta );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:29,代码来源:CarteIT.java

示例8: 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.getFieldLength方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。