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


Java ValueMetaNumber类代码示例

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


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


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