• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java ValueMetaNumber类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.pentaho.di.core.row.value.ValueMetaNumber的典型用法代码示例。如果您正苦于以下问题:Java ValueMetaNumber类的具体用法?Java ValueMetaNumber怎么用?Java ValueMetaNumber使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ValueMetaNumber类属于org.pentaho.di.core.row.value包,在下文中一共展示了ValueMetaNumber类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getValueMetaInterface

import org.pentaho.di.core.row.value.ValueMetaNumber; //导入依赖的package包/类
private ValueMetaInterface getValueMetaInterface( String fieldName, int fieldType ) {
  switch ( fieldType ) {
    case ValueMetaInterface.TYPE_INET:
      return new ValueMetaInternetAddress( fieldName );
    case ValueMetaInterface.TYPE_STRING:
      return new ValueMetaString( fieldName );
    case ValueMetaInterface.TYPE_INTEGER:
      return new ValueMetaInteger( fieldName );
    case ValueMetaInterface.TYPE_NUMBER:
      return new ValueMetaNumber( fieldName );
    case ValueMetaInterface.TYPE_BIGNUMBER:
      return new ValueMetaBigNumber( fieldName );
    case ValueMetaInterface.TYPE_TIMESTAMP:
      return new ValueMetaTimestamp( fieldName );
    case ValueMetaInterface.TYPE_DATE:
      return new ValueMetaDate( fieldName );
    case ValueMetaInterface.TYPE_BOOLEAN:
      return new ValueMetaBoolean( fieldName );
    case ValueMetaInterface.TYPE_BINARY:
      return new ValueMetaBinary( fieldName );
  }
  return null;
}
 
开发者ID:pentaho,项目名称:pentaho-hadoop-shims,代码行数:24,代码来源:PentahoOrcRecordWriter.java


示例2: createRowMetaInterface

import org.pentaho.di.core.row.value.ValueMetaNumber; //导入依赖的package包/类
public RowMetaInterface createRowMetaInterface() {
  RowMetaInterface rm = new RowMeta();

  ValueMetaInterface[] valuesMeta =
  {
    new ValueMetaString( "string" ),
    new ValueMetaInteger( "integer" ),
    new ValueMetaNumber( "number" ),
    new ValueMetaBigNumber( "bigdecimal" ),
    new ValueMetaDate( "date" ),
    new ValueMetaBinary( "binary" ),
    new ValueMetaBoolean( "bool" ),
    new ValueMetaTimestamp( "timestamp" ),
    new ValueMetaInternetAddress( "inetaddress" ), };

  for ( int i = 0; i < valuesMeta.length; i++ ) {
    rm.addValueMeta( valuesMeta[i] );
  }

  return rm;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:22,代码来源:JaninoStepIT.java


示例3: createResultRowMetaInterface

import org.pentaho.di.core.row.value.ValueMetaNumber; //导入依赖的package包/类
public RowMetaInterface createResultRowMetaInterface() {
  RowMetaInterface rm = new RowMeta();

  ValueMetaInterface[] valuesMeta =
  {
    new ValueMetaString( "field1" ), new ValueMetaInteger( "field2" ),
    new ValueMetaNumber( "field3" ), new ValueMetaBoolean( "field5" ),
    new ValueMetaBigNumber( "field6" ),
    new ValueMetaBoolean( "result" ), };

  for ( int i = 0; i < valuesMeta.length; i++ ) {
    rm.addValueMeta( valuesMeta[i] );
  }

  return rm;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:17,代码来源:DetectLastRowStepIT.java


示例4: createRowMetaInterface4

import org.pentaho.di.core.row.value.ValueMetaNumber; //导入依赖的package包/类
public RowMetaInterface createRowMetaInterface4() {
  RowMetaInterface rm = new RowMeta();

  ValueMetaInterface[] valuesMeta =
    {
      new ValueMetaInteger( "int_in" ),
      new ValueMetaNumber( "number_in" ),
      new ValueMetaString( "string_in" ), new ValueMetaInteger( "long1" ),
      new ValueMetaNumber( "number1" ), new ValueMetaString( "string1" ),
      new ValueMetaInteger( "long2" ), new ValueMetaNumber( "number2" ),
      new ValueMetaString( "string2" ), };

  for ( int i = 0; i < valuesMeta.length; i++ ) {
    rm.addValueMeta( valuesMeta[ i ] );
  }

  return rm;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:19,代码来源:JavaScriptSpecialIT.java


示例5: createRowMetaInterface

import org.pentaho.di.core.row.value.ValueMetaNumber; //导入依赖的package包/类
public RowMetaInterface createRowMetaInterface() {
  RowMetaInterface rm = new RowMeta();

  ValueMetaInterface[] valuesMeta =
  {
    new ValueMetaString( "field1" ), new ValueMetaInteger( "field2" ),
    new ValueMetaNumber( "field3" ), new ValueMetaDate( "field4" ),
    new ValueMetaBoolean( "field5" ),
    new ValueMetaBigNumber( "field6" ),
    new ValueMetaBigNumber( "field7" ) };

  for ( int i = 0; i < valuesMeta.length; i++ ) {
    rm.addValueMeta( valuesMeta[i] );
  }

  return rm;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:18,代码来源:BlockingStepIT.java


示例6: testIsBlank_EmptyStringIsNotNull

import org.pentaho.di.core.row.value.ValueMetaNumber; //导入依赖的package包/类
@Test
public void testIsBlank_EmptyStringIsNotNull() throws KettleException {
  FieldAccessorUtl.ensureEmptyStringIsNotNull( true );

  final String fIsBlank = "ISBLANK([" + KEY_ARG + "])";

  assertBooleanFormula( fIsBlank, buildRowMeta( new ValueMetaString( KEY_ARG ) ), new Object[] { "1" }, false );
  assertBooleanFormula( fIsBlank, buildRowMeta( new ValueMetaString( KEY_ARG ) ), new Object[] { "a" }, false );
  assertBooleanFormula( fIsBlank, buildRowMeta( new ValueMetaString( KEY_ARG ) ), new Object[] { null }, true );
  assertBooleanFormula( fIsBlank, buildRowMeta( new ValueMetaString( KEY_ARG ) ), new Object[] { "" }, false );
  assertBooleanFormula( fIsBlank, buildRowMeta( new ValueMetaString( KEY_ARG ) ), new Object[] { "   " }, false );

  assertBooleanFormula( fIsBlank, buildRowMeta( new ValueMetaNumber( KEY_ARG ) ), new Object[] { 1 }, false );
  assertBooleanFormula( fIsBlank, buildRowMeta( new ValueMetaNumber( KEY_ARG ) ), new Object[] { 0 }, false );
  assertBooleanFormula( fIsBlank, buildRowMeta( new ValueMetaNumber( KEY_ARG ) ), new Object[] { -1.0 }, false );
  assertBooleanFormula( fIsBlank, buildRowMeta( new ValueMetaNumber( KEY_ARG ) ), new Object[] { null }, true );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:18,代码来源:Formula2IT.java


示例7: testIsBlank_EmptyStringIsNull

import org.pentaho.di.core.row.value.ValueMetaNumber; //导入依赖的package包/类
@Test
public void testIsBlank_EmptyStringIsNull() throws KettleException {
  FieldAccessorUtl.ensureEmptyStringIsNotNull( false );

  final String fIsBlank = "ISBLANK([" + KEY_ARG + "])";
  assertBooleanFormula( fIsBlank, buildRowMeta( new ValueMetaString( KEY_ARG ) ), new Object[] { "1" }, false );
  assertBooleanFormula( fIsBlank, buildRowMeta( new ValueMetaString( KEY_ARG ) ), new Object[] { "a" }, false );
  assertBooleanFormula( fIsBlank, buildRowMeta( new ValueMetaString( KEY_ARG ) ), new Object[] { null }, true );
  // assertBooleanFormula( fIsBlank, buildRowMeta( new ValueMetaString( KEY_ARG ) ), new Object[] { "" }, true ); //
  // TODO: Is it correct?
  assertBooleanFormula( fIsBlank, buildRowMeta( new ValueMetaString( KEY_ARG ) ), new Object[] { "" }, false ); //
  // TODO: Is it correct?
  assertBooleanFormula( fIsBlank, buildRowMeta( new ValueMetaString( KEY_ARG ) ), new Object[] { "   " }, false );

  assertBooleanFormula( fIsBlank, buildRowMeta( new ValueMetaNumber( KEY_ARG ) ), new Object[] { 1 }, false );
  assertBooleanFormula( fIsBlank, buildRowMeta( new ValueMetaNumber( KEY_ARG ) ), new Object[] { 0 }, false );
  assertBooleanFormula( fIsBlank, buildRowMeta( new ValueMetaNumber( KEY_ARG ) ), new Object[] { -1.0 }, false );
  assertBooleanFormula( fIsBlank, buildRowMeta( new ValueMetaNumber( KEY_ARG ) ), new Object[] { null }, true );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:20,代码来源:Formula2IT.java


示例8: testIsText_EmptyStringIsNotNull

import org.pentaho.di.core.row.value.ValueMetaNumber; //导入依赖的package包/类
@Test
public void testIsText_EmptyStringIsNotNull() throws KettleException {
  FieldAccessorUtl.ensureEmptyStringIsNotNull( true );

  final String fIsText = "ISTEXT([" + KEY_ARG + "])";

  assertBooleanFormula( fIsText, buildRowMeta( new ValueMetaString( KEY_ARG ) ), new Object[] { "1" }, true );
  assertBooleanFormula( fIsText, buildRowMeta( new ValueMetaString( KEY_ARG ) ), new Object[] { "a" }, true );
  assertBooleanFormula( fIsText, buildRowMeta( new ValueMetaString( KEY_ARG ) ), new Object[] { null }, false );
  assertBooleanFormula( fIsText, buildRowMeta( new ValueMetaString( KEY_ARG ) ), new Object[] { "" }, true );
  assertBooleanFormula( fIsText, buildRowMeta( new ValueMetaString( KEY_ARG ) ), new Object[] { "   " }, true );

  assertBooleanFormula( fIsText, buildRowMeta( new ValueMetaNumber( KEY_ARG ) ), new Object[] { 1 }, false );
  assertBooleanFormula( fIsText, buildRowMeta( new ValueMetaNumber( KEY_ARG ) ), new Object[] { 0 }, false );
  assertBooleanFormula( fIsText, buildRowMeta( new ValueMetaNumber( KEY_ARG ) ), new Object[] { -1.0 }, false );
  assertBooleanFormula( fIsText, buildRowMeta( new ValueMetaNumber( KEY_ARG ) ), new Object[] { null }, false );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:18,代码来源:Formula2IT.java


示例9: testIsText_EmptyStringIsNull

import org.pentaho.di.core.row.value.ValueMetaNumber; //导入依赖的package包/类
@Test
public void testIsText_EmptyStringIsNull() throws KettleException {
  FieldAccessorUtl.ensureEmptyStringIsNotNull( false );

  final String fIsText = "ISTEXT([" + KEY_ARG + "])";

  assertBooleanFormula( fIsText, buildRowMeta( new ValueMetaString( KEY_ARG ) ), new Object[] { "1" }, true );
  assertBooleanFormula( fIsText, buildRowMeta( new ValueMetaString( KEY_ARG ) ), new Object[] { "a" }, true );
  assertBooleanFormula( fIsText, buildRowMeta( new ValueMetaString( KEY_ARG ) ), new Object[] { null }, false );
  // assertBooleanFormula( fIsText, buildRowMeta( new ValueMetaString( KEY_ARG ) ), new Object[] { "" }, false ); //
  // TODO: Is it correct?
  assertBooleanFormula( fIsText, buildRowMeta( new ValueMetaString( KEY_ARG ) ), new Object[] { "" }, true ); //
  // TODO: Is it correct?
  assertBooleanFormula( fIsText, buildRowMeta( new ValueMetaString( KEY_ARG ) ), new Object[] { "   " }, true );
  assertBooleanFormula( fIsText, buildRowMeta( new ValueMetaNumber( KEY_ARG ) ), new Object[] { 1 }, false );
  assertBooleanFormula( fIsText, buildRowMeta( new ValueMetaNumber( KEY_ARG ) ), new Object[] { 0 }, false );
  assertBooleanFormula( fIsText, buildRowMeta( new ValueMetaNumber( KEY_ARG ) ), new Object[] { -1.0 }, false );
  assertBooleanFormula( fIsText, buildRowMeta( new ValueMetaNumber( KEY_ARG ) ), new Object[] { null }, false );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:20,代码来源:Formula2IT.java


示例10: testIsNonText_EmptyStringIsNotNull

import org.pentaho.di.core.row.value.ValueMetaNumber; //导入依赖的package包/类
@Test
public void testIsNonText_EmptyStringIsNotNull() throws KettleException {
  FieldAccessorUtl.ensureEmptyStringIsNotNull( true );

  final String fIsText = "ISNONTEXT([" + KEY_ARG + "])";

  assertBooleanFormula( fIsText, buildRowMeta( new ValueMetaString( KEY_ARG ) ), new Object[] { "1" }, false );
  assertBooleanFormula( fIsText, buildRowMeta( new ValueMetaString( KEY_ARG ) ), new Object[] { "a" }, false );
  assertBooleanFormula( fIsText, buildRowMeta( new ValueMetaString( KEY_ARG ) ), new Object[] { null }, true );
  assertBooleanFormula( fIsText, buildRowMeta( new ValueMetaString( KEY_ARG ) ), new Object[] { "" }, false );
  assertBooleanFormula( fIsText, buildRowMeta( new ValueMetaString( KEY_ARG ) ), new Object[] { "   " }, false );

  assertBooleanFormula( fIsText, buildRowMeta( new ValueMetaNumber( KEY_ARG ) ), new Object[] { 1 }, true );
  assertBooleanFormula( fIsText, buildRowMeta( new ValueMetaNumber( KEY_ARG ) ), new Object[] { 0 }, true );
  assertBooleanFormula( fIsText, buildRowMeta( new ValueMetaNumber( KEY_ARG ) ), new Object[] { -1.0 }, true );
  assertBooleanFormula( fIsText, buildRowMeta( new ValueMetaNumber( KEY_ARG ) ), new Object[] { null }, true );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:18,代码来源:Formula2IT.java


示例11: testIsNonText_EmptyStringIsNull

import org.pentaho.di.core.row.value.ValueMetaNumber; //导入依赖的package包/类
@Test
public void testIsNonText_EmptyStringIsNull() throws KettleException {
  FieldAccessorUtl.ensureEmptyStringIsNotNull( false );

  final String fIsText = "ISNONTEXT([" + KEY_ARG + "])";

  assertBooleanFormula( fIsText, buildRowMeta( new ValueMetaString( KEY_ARG ) ), new Object[] { "1" }, false );
  assertBooleanFormula( fIsText, buildRowMeta( new ValueMetaString( KEY_ARG ) ), new Object[] { "a" }, false );
  assertBooleanFormula( fIsText, buildRowMeta( new ValueMetaString( KEY_ARG ) ), new Object[] { null }, true );
  // assertBooleanFormula( fIsText, buildRowMeta( new ValueMetaString( KEY_ARG ) ), new Object[] { "" }, true ); //
  // TODO: Is it correct?
  assertBooleanFormula( fIsText, buildRowMeta( new ValueMetaString( KEY_ARG ) ), new Object[] { "" }, false ); //
  // TODO: Is it correct?
  assertBooleanFormula( fIsText, buildRowMeta( new ValueMetaString( KEY_ARG ) ), new Object[] { "   " }, false );
  assertBooleanFormula( fIsText, buildRowMeta( new ValueMetaNumber( KEY_ARG ) ), new Object[] { 1 }, true );
  assertBooleanFormula( fIsText, buildRowMeta( new ValueMetaNumber( KEY_ARG ) ), new Object[] { 0 }, true );
  assertBooleanFormula( fIsText, buildRowMeta( new ValueMetaNumber( KEY_ARG ) ), new Object[] { -1.0 }, true );
  assertBooleanFormula( fIsText, buildRowMeta( new ValueMetaNumber( KEY_ARG ) ), new Object[] { null }, true );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:20,代码来源:Formula2IT.java


示例12: getTestRowMetaAndData

import org.pentaho.di.core.row.value.ValueMetaNumber; //导入依赖的package包/类
List<RowMetaAndData> getTestRowMetaAndData( int count, Integer[] nulls ) {
  List<RowMetaAndData> list = new ArrayList<RowMetaAndData>();
  RowMetaInterface rm = new RowMeta();
  rm.addValueMeta( new ValueMetaString( KEY1 ) );
  rm.addValueMeta( new ValueMetaInteger( KEY2 ) );
  rm.addValueMeta( new ValueMetaNumber( KEY3 ) );
  rm.addValueMeta( new ValueMetaBigNumber( KEY4 ) );

  Object[] row = new Object[4];
  List<Integer> nullsList = Arrays.asList( nulls );

  for ( int i = 0; i < count; i++ ) {
    if ( nullsList.contains( i ) ) {
      for ( int j = 0; j < row.length; j++ ) {
        row[j] = null;
      }
    } else {
      row[0] = "";
      row[1] = 1L;
      row[2] = 2.0;
      row[3] = new BigDecimal( 3 );
    }
    list.add( new RowMetaAndData( rm, row ) );
  }
  return list;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:27,代码来源:GroupByIntIT.java


示例13: createRowMetaInterface

import org.pentaho.di.core.row.value.ValueMetaNumber; //导入依赖的package包/类
public RowMetaInterface createRowMetaInterface() {
  RowMetaInterface rm = new RowMeta();

  ValueMetaInterface[] valuesMeta =
  {
    new ValueMetaString( "field1" ), new ValueMetaInteger( "field2" ),
    new ValueMetaNumber( "field3" ), new ValueMetaDate( "field4" ),
    new ValueMetaBoolean( "field5" ),
    new ValueMetaBigNumber( "field6" ),
    new ValueMetaBigNumber( "field7" ), };

  for ( int i = 0; i < valuesMeta.length; i++ ) {
    rm.addValueMeta( valuesMeta[i] );
  }

  return rm;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:18,代码来源:TransSingleThreadIT.java


示例14: insertJobEntryAttribute

import org.pentaho.di.core.row.value.ValueMetaNumber; //导入依赖的package包/类
public synchronized ObjectId insertJobEntryAttribute( ObjectId id_job, ObjectId id_jobentry, long nr,
  String code, double value_num, String value_str ) throws KettleException {
  ObjectId id = getNextJobEntryAttributeID();

  RowMetaAndData table = new RowMetaAndData();

  //CHECKSTYLE:LineLength:OFF
  table.addValue( new ValueMetaInteger( KettleDatabaseRepository.FIELD_JOBENTRY_ATTRIBUTE_ID_JOBENTRY_ATTRIBUTE ), id );
  table.addValue( new ValueMetaInteger( KettleDatabaseRepository.FIELD_JOBENTRY_ATTRIBUTE_ID_JOB ), id_job );
  table.addValue( new ValueMetaInteger( KettleDatabaseRepository.FIELD_JOBENTRY_ATTRIBUTE_ID_JOBENTRY ), id_jobentry );
  table.addValue( new ValueMetaInteger( KettleDatabaseRepository.FIELD_JOBENTRY_ATTRIBUTE_NR ), new Long( nr ) );
  table.addValue( new ValueMetaString( KettleDatabaseRepository.FIELD_JOBENTRY_ATTRIBUTE_CODE ), code );
  table.addValue( new ValueMetaNumber( KettleDatabaseRepository.FIELD_JOBENTRY_ATTRIBUTE_VALUE_NUM ), new Double( value_num ) );
  table.addValue( new ValueMetaString( KettleDatabaseRepository.FIELD_JOBENTRY_ATTRIBUTE_VALUE_STR ), value_str );

  database.prepareInsert( table.getRowMeta(), KettleDatabaseRepository.TABLE_R_JOBENTRY_ATTRIBUTE );
  database.setValuesInsert( table );
  database.insertRow();
  database.closeInsert();

  return id;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:23,代码来源:KettleDatabaseRepositoryConnectionDelegate.java


示例15: createRowMetaInterface

import org.pentaho.di.core.row.value.ValueMetaNumber; //导入依赖的package包/类
private static RowMetaInterface createRowMetaInterface() {
  RowMetaInterface rm = new RowMeta();

  ValueMetaInterface[] valuesMeta =
  {
    new ValueMetaString( "field1" ), new ValueMetaInteger( "field2" ),
    new ValueMetaNumber( "field3" ), new ValueMetaDate( "field4" ),
    new ValueMetaBoolean( "field5" ),
    new ValueMetaBigNumber( "field6" ),
    new ValueMetaBigNumber( "field7" ) };

  for ( ValueMetaInterface aValuesMeta : valuesMeta ) {
    rm.addValueMeta( aValuesMeta );
  }

  return rm;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:18,代码来源:BlockingStep_PDI_11344_Test.java


示例16: createRowMeta

import org.pentaho.di.core.row.value.ValueMetaNumber; //导入依赖的package包/类
/**
 * Create meta information for rows that are passed to Excel Writer step
 *
 * @return
 * @throws KettleException
 */
private RowMetaInterface createRowMeta() throws KettleException {
  RowMetaInterface rm = new RowMeta();
  try {
    ValueMetaInterface[] valuesMeta = {
      new ValueMetaInteger( "col 1" ),
      new ValueMetaNumber( "col 2" ),
      new ValueMetaBigNumber( "col 3" ),
      new ValueMetaNumber( "col 4" )
    };
    for ( int i = 0; i < valuesMeta.length; i++ ) {
      rm.addValueMeta( valuesMeta[i] );
    }
  } catch ( Exception ex ) {
    return null;
  }
  return rm;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:24,代码来源:ExcelWriterStep_StyleFormatTest.java


示例17: testHexOutput_md5

import org.pentaho.di.core.row.value.ValueMetaNumber; //导入依赖的package包/类
@Test
public void testHexOutput_md5() throws Exception {
  MockRowListener results = executeHexTest( 2, false, "xyz", new ValueMetaString( "test" ), false );
  assertEquals( 1, results.getWritten().size() );
  assertEquals( "d16fb36f0911f878998c136191af705e", results.getWritten().get( 0 )[1] );

  results = executeHexTest( 2, false, 10.8, new ValueMetaNumber( "test" ), false );
  assertEquals( 1, results.getWritten().size() );
  assertEquals( "372df98e33ac1bf6b26d225361ba7eb5", results.getWritten().get( 0 )[1] );

  results = executeHexTest( 2, false, 10.82, new ValueMetaNumber( "test" ), false );
  assertEquals( 1, results.getWritten().size() );
  assertEquals( "68b142f87143c917f29d178aa1715957", results.getWritten().get( 0 )[1] );

  byte[] input = IOUtils.toByteArray( getFile( "/org/pentaho/di/trans/steps/loadfileinput/files/pentaho_splash.png" ).getContent().getInputStream() );
  results = executeHexTest( 2, false, input, new ValueMetaBinary( "test" ), false );
  assertEquals( 1, results.getWritten().size() );
  assertEquals( "8d808ff9051fdbfd8050f762daddf813", results.getWritten().get( 0 )[1] );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:20,代码来源:CheckSumTest.java


示例18: testHexOutput_md5_compatibilityMode

import org.pentaho.di.core.row.value.ValueMetaNumber; //导入依赖的package包/类
@Test
public void testHexOutput_md5_compatibilityMode() throws Exception {
  MockRowListener results = executeHexTest( 2, true, "xyz", new ValueMetaString( "test" ), false );
  assertEquals( 1, results.getWritten().size() );
  assertEquals( "FD6FFD6F0911FD78FDFD1361FDFD705E", results.getWritten().get( 0 )[1] );

  results = executeHexTest( 2, true, 10.8, new ValueMetaNumber( "test" ), false );
  assertEquals( 1, results.getWritten().size() );
  assertEquals( "372DFDFD33FD1BFDFD6D225361FD7EFD", results.getWritten().get( 0 )[1] );

  results = executeHexTest( 2, true, 10.82, new ValueMetaNumber( "test" ), false );
  assertEquals( 1, results.getWritten().size() );
  assertEquals( "68FD42FD7143FD17FD17FDFD715957", results.getWritten().get( 0 )[1] );

  byte[] input = IOUtils.toByteArray( getFile( "/org/pentaho/di/trans/steps/loadfileinput/files/pentaho_splash.png" ).getContent().getInputStream() );
  results = executeHexTest( 2, true, input, new ValueMetaBinary( "test" ), false );
  assertEquals( 1, results.getWritten().size() );
  assertEquals( "FDFDFDFD051FFDFDFD50FD62FDFDFD13", results.getWritten().get( 0 )[1] );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:20,代码来源:CheckSumTest.java


示例19: testHexOutput_sha1

import org.pentaho.di.core.row.value.ValueMetaNumber; //导入依赖的package包/类
@Test
public void testHexOutput_sha1() throws Exception {
  MockRowListener results = executeHexTest( 3, false, "xyz", new ValueMetaString( "test" ), false );
  assertEquals( 1, results.getWritten().size() );
  assertEquals( "66b27417d37e024c46526c2f6d358a754fc552f3", results.getWritten().get( 0 )[1] );

  results = executeHexTest( 3, false, 10.8, new ValueMetaNumber( "test" ), false );
  assertEquals( 1, results.getWritten().size() );
  assertEquals( "78aef53da0b8d7a80656c80aa35ad6d410b7f068", results.getWritten().get( 0 )[1] );

  results = executeHexTest( 3, false, 10.82, new ValueMetaNumber( "test" ), false );
  assertEquals( 1, results.getWritten().size() );
  assertEquals( "749f3d4c2db67c9f3186563a72ef5da9461f0496", results.getWritten().get( 0 )[1] );

  byte[] input = IOUtils.toByteArray( getFile( "/org/pentaho/di/trans/steps/loadfileinput/files/pentaho_splash.png" ).getContent().getInputStream() );
  results = executeHexTest( 3, false, input, new ValueMetaBinary( "test" ), false );
  assertEquals( 1, results.getWritten().size() );
  assertEquals( "e67d0b5b60663b8a5e0df1d23b44de673738315a", results.getWritten().get( 0 )[1] );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:20,代码来源:CheckSumTest.java


示例20: testHexOutput_sha1_compatibilityMode

import org.pentaho.di.core.row.value.ValueMetaNumber; //导入依赖的package包/类
@Test
public void testHexOutput_sha1_compatibilityMode() throws Exception {
  MockRowListener results = executeHexTest( 3, true, "xyz", new ValueMetaString( "test" ), false );
  assertEquals( 1, results.getWritten().size() );
  assertEquals( "66FD7417FD7E024C46526C2F6D35FD754FFD52FD", results.getWritten().get( 0 )[1] );

  results = executeHexTest( 3, true, 10.8, new ValueMetaNumber( "test" ), false );
  assertEquals( 1, results.getWritten().size() );
  assertEquals( "78FDFD3DFDFDE80656FD0AFD5AFDFD10FDFD68", results.getWritten().get( 0 )[1] );

  results = executeHexTest( 3, true, 10.82, new ValueMetaNumber( "test" ), false );
  assertEquals( 1, results.getWritten().size() );
  assertEquals( "74FD3D4C2DFD7CFD31FD563A72FD5DFD461F04FD", results.getWritten().get( 0 )[1] );

  byte[] input = IOUtils.toByteArray( getFile( "/org/pentaho/di/trans/steps/loadfileinput/files/pentaho_splash.png" ).getContent().getInputStream() );
  results = executeHexTest( 3, true, input, new ValueMetaBinary( "test" ), false );
  assertEquals( 1, results.getWritten().size() );
  assertEquals( "FD7D0B5B60663BFD5E0DFDFD3B44FD673738315A", results.getWritten().get( 0 )[1] );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:20,代码来源:CheckSumTest.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Version类代码示例发布时间:2022-05-22
下一篇:
Java ParticleGroupDef类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap