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

Java ValueMetaDate类代码示例

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

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



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

示例1: getValueMetaInterface

import org.pentaho.di.core.row.value.ValueMetaDate; //导入依赖的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.ValueMetaDate; //导入依赖的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: createRowMetaInterface

import org.pentaho.di.core.row.value.ValueMetaDate; //导入依赖的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


示例4: createRowMetaInterface

import org.pentaho.di.core.row.value.ValueMetaDate; //导入依赖的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


示例5: insertLogEntry

import org.pentaho.di.core.row.value.ValueMetaDate; //导入依赖的package包/类
public synchronized ObjectId insertLogEntry( String description ) throws KettleException {
  ObjectId id = connectionDelegate.getNextLogID();

  RowMetaAndData table = new RowMetaAndData();
  table.addValue( new ValueMetaInteger(
    KettleDatabaseRepository.FIELD_REPOSITORY_LOG_ID_REPOSITORY_LOG ), id );
  table.addValue( new ValueMetaString(
    KettleDatabaseRepository.FIELD_REPOSITORY_LOG_REP_VERSION ), getVersion() );
  table.addValue( new ValueMetaDate(
    KettleDatabaseRepository.FIELD_REPOSITORY_LOG_LOG_DATE ), new Date() );
  table.addValue(
    new ValueMetaString( KettleDatabaseRepository.FIELD_REPOSITORY_LOG_LOG_USER ),
    getUserInfo() != null ? getUserInfo().getLogin() : "admin" );
  table.addValue(
    new ValueMetaString(
      KettleDatabaseRepository.FIELD_REPOSITORY_LOG_OPERATION_DESC ),
    description );

  connectionDelegate.insertTableRow( KettleDatabaseRepository.TABLE_R_REPOSITORY_LOG, table );

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


示例6: testEmptyValues

import org.pentaho.di.core.row.value.ValueMetaDate; //导入依赖的package包/类
@Test
public void testEmptyValues() throws Exception {
  RowMeta rowsMetaEmpty = new RowMeta();

  rowsMetaEmpty.addValueMeta( new ValueMetaString( "str" ) );
  rowsMetaEmpty.addValueMeta( new ValueMetaBoolean( "bool" ) );
  rowsMetaEmpty.addValueMeta( new ValueMetaInteger( "int" ) );
  rowsMetaEmpty.addValueMeta( new ValueMetaNumber( "num" ) );
  rowsMetaEmpty.addValueMeta( new ValueMetaBigNumber( "bignum" ) );
  rowsMetaEmpty.addValueMeta( new ValueMetaBinary( "bin" ) );
  rowsMetaEmpty.addValueMeta( new ValueMetaDate( "date" ) );
  rowsMetaEmpty.addValueMeta( new ValueMetaTimestamp( "timestamp" ) );
  rowsMetaEmpty.addValueMeta( new ValueMetaInternetAddress( "inet" ) );
  row = new RowMetaAndData( rowsMetaEmpty, null, null, null, null, null, null, null, null, null );
  assertTrue( row.isEmptyValue( "str" ) );
  assertTrue( row.isEmptyValue( "bool" ) );
  assertTrue( row.isEmptyValue( "int" ) );
  assertTrue( row.isEmptyValue( "num" ) );
  assertTrue( row.isEmptyValue( "bignum" ) );
  assertTrue( row.isEmptyValue( "bin" ) );
  assertTrue( row.isEmptyValue( "date" ) );
  assertTrue( row.isEmptyValue( "timestamp" ) );
  assertTrue( row.isEmptyValue( "inet" ) );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:25,代码来源:RowMetaAndDataTest.java


示例7: executeAndCheck

import org.pentaho.di.core.row.value.ValueMetaDate; //导入依赖的package包/类
private void executeAndCheck( String locale, String expectedWeekNumber ) throws Exception {
  RowMeta inputRowMeta = new RowMeta();
  inputRowMeta.addValueMeta( new ValueMetaDate( "field" ) );
  step.setInputRowMeta( inputRowMeta );

  SelectValuesMeta stepMeta = new SelectValuesMeta();
  stepMeta.allocate( 1, 0, 1 );
  stepMeta.getSelectFields()[0] = new SelectField();
  stepMeta.getSelectFields()[0].setName( "field" );
  stepMeta.getMeta()[ 0 ] =
    new SelectMetadataChange( stepMeta, "field", null, ValueMetaInterface.TYPE_STRING, -2, -2,
      ValueMetaInterface.STORAGE_TYPE_NORMAL, "ww", false, locale, null, false, null, null, null );

  SelectValuesData stepData = new SelectValuesData();
  stepData.select = true;
  stepData.metadata = true;
  stepData.firstselect = true;
  stepData.firstmetadata = true;

  List<Object[]> execute = TransTestingUtil.execute( step, stepMeta, stepData, 1, true );
  TransTestingUtil.assertResult( execute, Collections.singletonList( new Object[] { expectedWeekNumber } ) );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:23,代码来源:SelectValues_LocaleHandling_Test.java


示例8: createRowMetaInterface

import org.pentaho.di.core.row.value.ValueMetaDate; //导入依赖的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


示例9: getFieldsWithSubject_WithFormat

import org.pentaho.di.core.row.value.ValueMetaDate; //导入依赖的package包/类
@Test
public void getFieldsWithSubject_WithFormat() {
  ValueMetaDate valueMeta = new ValueMetaDate();
  valueMeta.setConversionMask( "yyyy-MM-dd" );
  valueMeta.setName( "date" );

  doReturn( valueMeta ).when( rowMeta ).searchValueMeta( "date" );

  groupByMeta.setSubjectField( new String[] { "date" } );
  groupByMeta.setGroupField( new String[] {} );
  groupByMeta.setAggregateField( new String[] { "maxDate" } );
  groupByMeta.setAggregateType( new int[] { TYPE_GROUP_MAX } );

  groupByMeta.getFields( rowMeta, "Group by", mockInfo, mockNextStep, mockSpace, null, mockIMetaStore );

  verify( rowMeta, times( 1 ) ).clear();
  verify( rowMeta, times( 1 ) ).addRowMeta( any() );
  assertEquals( "yyyy-MM-dd", rowMeta.searchValueMeta( "maxDate" ).getConversionMask() );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:20,代码来源:GroupByMetaGetFieldsTest.java


示例10: getFieldsWithSubject_NoFormat

import org.pentaho.di.core.row.value.ValueMetaDate; //导入依赖的package包/类
@Test
public void getFieldsWithSubject_NoFormat() {
  ValueMetaDate valueMeta = new ValueMetaDate();
  valueMeta.setName( "date" );

  doReturn( valueMeta ).when( rowMeta ).searchValueMeta( "date" );

  groupByMeta.setSubjectField( new String[] { "date" } );
  groupByMeta.setGroupField( new String[] {} );
  groupByMeta.setAggregateField( new String[] { "minDate" } );
  groupByMeta.setAggregateType( new int[] { TYPE_GROUP_MIN } );

  groupByMeta.getFields( rowMeta, "Group by", mockInfo, mockNextStep, mockSpace, null, mockIMetaStore );

  verify( rowMeta, times( 1 ) ).clear();
  verify( rowMeta, times( 1 ) ).addRowMeta( any() );
  assertEquals( null, rowMeta.searchValueMeta( "minDate" ).getConversionMask() );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:19,代码来源:GroupByMetaGetFieldsTest.java


示例11: setup

import org.pentaho.di.core.row.value.ValueMetaDate; //导入依赖的package包/类
@Before
public void setup() throws KettlePluginException {
  mockSpace = mock( VariableSpace.class );
  doReturn("N" ).when( mockSpace ).getVariable( any(), anyString() );

  rowMeta = spy( new RowMeta() );
  memoryGroupByMeta = spy( new MemoryGroupByMeta() );

  mockStatic( ValueMetaFactory.class );
  when( ValueMetaFactory.createValueMeta( anyInt() ) ).thenCallRealMethod();
  when( ValueMetaFactory.createValueMeta( anyString(), anyInt() ) ).thenCallRealMethod();
  when( ValueMetaFactory.createValueMeta( "maxDate", 3, -1, -1 ) ).thenReturn( new ValueMetaDate( "maxDate" ) );
  when( ValueMetaFactory.createValueMeta( "minDate", 3, -1, -1 ) ).thenReturn( new ValueMetaDate( "minDate" ) );
  when( ValueMetaFactory.createValueMeta( "countDate", 5, -1, -1 ) ).thenReturn( new ValueMetaInteger( "countDate" ) );
  when( ValueMetaFactory.getValueMetaName( 3 ) ).thenReturn( "Date" );
  when( ValueMetaFactory.getValueMetaName( 5 ) ).thenReturn( "Integer" );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:18,代码来源:MemoryGroupByMetaGetFieldsTest.java


示例12: getFieldsWithSubject_WithFormat

import org.pentaho.di.core.row.value.ValueMetaDate; //导入依赖的package包/类
@Test
public void getFieldsWithSubject_WithFormat() {
  ValueMetaDate valueMeta = new ValueMetaDate();
  valueMeta.setConversionMask( "yyyy-MM-dd" );
  valueMeta.setName( "date" );

  doReturn( valueMeta ).when( rowMeta ).searchValueMeta( "date" );

  memoryGroupByMeta.setSubjectField( new String[] { "date" } );
  memoryGroupByMeta.setGroupField( new String[] {} );
  memoryGroupByMeta.setAggregateField( new String[] { "maxDate" } );
  memoryGroupByMeta.setAggregateType( new int[] { TYPE_GROUP_MAX } );

  memoryGroupByMeta.getFields( rowMeta, "Memory Group by", mockInfo, mockNextStep, mockSpace, null, mockIMetaStore );

  verify( rowMeta, times( 1 ) ).clear();
  verify( rowMeta, times( 1 ) ).addRowMeta( any() );
  assertEquals( "yyyy-MM-dd", rowMeta.searchValueMeta( "maxDate" ).getConversionMask() );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:20,代码来源:MemoryGroupByMetaGetFieldsTest.java


示例13: getFieldsWithSubject_NoFormat

import org.pentaho.di.core.row.value.ValueMetaDate; //导入依赖的package包/类
@Test
public void getFieldsWithSubject_NoFormat() {
  ValueMetaDate valueMeta = new ValueMetaDate();
  valueMeta.setName( "date" );

  doReturn( valueMeta ).when( rowMeta ).searchValueMeta( "date" );

  memoryGroupByMeta.setSubjectField( new String[] { "date" } );
  memoryGroupByMeta.setGroupField( new String[] {} );
  memoryGroupByMeta.setAggregateField( new String[] { "minDate" } );
  memoryGroupByMeta.setAggregateType( new int[] { TYPE_GROUP_MIN } );

  memoryGroupByMeta.getFields( rowMeta, "Group by", mockInfo, mockNextStep, mockSpace, null, mockIMetaStore );

  verify( rowMeta, times( 1 ) ).clear();
  verify( rowMeta, times( 1 ) ).addRowMeta( any() );
  assertEquals( null, rowMeta.searchValueMeta( "minDate" ).getConversionMask() );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:19,代码来源:MemoryGroupByMetaGetFieldsTest.java


示例14: getFieldsWithoutSubject

import org.pentaho.di.core.row.value.ValueMetaDate; //导入依赖的package包/类
@Test
public void getFieldsWithoutSubject() {
  ValueMetaDate valueMeta = new ValueMetaDate();
  valueMeta.setName( "date" );

  doReturn( valueMeta ).when( rowMeta ).searchValueMeta( "date" );

  memoryGroupByMeta.setSubjectField( new String[] { null } );
  memoryGroupByMeta.setGroupField( new String[] { "date" } );
  memoryGroupByMeta.setAggregateField( new String[] { "countDate" } );
  memoryGroupByMeta.setAggregateType( new int[] { TYPE_GROUP_COUNT_ANY } );

  memoryGroupByMeta.getFields( rowMeta, "Group by", mockInfo, mockNextStep, mockSpace, null, mockIMetaStore );

  verify( rowMeta, times( 1 ) ).clear();
  verify( rowMeta, times( 1 ) ).addRowMeta( any() );
  assertNotNull( rowMeta.searchValueMeta( "countDate" ) );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:19,代码来源:MemoryGroupByMetaGetFieldsTest.java


示例15: getInputRowMeta2

import org.pentaho.di.core.row.value.ValueMetaDate; //导入依赖的package包/类
private RowMeta getInputRowMeta2() {
  RowMeta inputRowMeta = new RowMeta();
  ValueMetaDate vmd1 = new ValueMetaDate( "value1" );
  vmd1.setConversionMask( "yyyyMMdd" );
  inputRowMeta.addValueMeta( vmd1 );
  ValueMetaDate vmd2 = new ValueMetaDate( "value2" );
  vmd2.setConversionMask( "yyyy/MM/dd HH:mm:ss.SSS" );
  inputRowMeta.addValueMeta( vmd2 );
  ValueMetaDate vmd3 = new ValueMetaDate( "value3" );
  vmd3.setConversionMask( "yyyyMMdd" );
  inputRowMeta.addValueMeta( vmd3 );
  ValueMetaDate vmd4 = new ValueMetaDate( "value4" );
  vmd4.setConversionMask( "yyyy/MM/dd HH:mm:ss.SSS" );
  inputRowMeta.addValueMeta( vmd4 );

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


示例16: getWikiInputRowMetaAndData

import org.pentaho.di.core.row.value.ValueMetaDate; //导入依赖的package包/类
private List<RowMetaAndData> getWikiInputRowMetaAndData() {
  List<RowMetaAndData> list = new ArrayList<>();
  Object[] row = new Object[7];
  RowMetaInterface rm = new RowMeta();
  rm.addValueMeta( new ValueMetaDate( "DATE" ) );
  row[0] = new Date( 103, 01, 01 );
  rm.addValueMeta( new ValueMetaInteger( "PR1_NR" ) );
  row[1] = 5;
  rm.addValueMeta( new ValueMetaInteger( "PR_SL" ) );
  row[2] = 100;
  rm.addValueMeta( new ValueMetaInteger( "PR2_NR" ) );
  row[3] = 10;
  rm.addValueMeta( new ValueMetaInteger( "PR2_SL" ) );
  row[4] = 250;
  rm.addValueMeta( new ValueMetaInteger( "PR3_NR" ) );
  row[5] = 4;
  rm.addValueMeta( new ValueMetaInteger( "PR3_SL" ) );
  row[6] = 150;
  list.add( new RowMetaAndData( rm, row ) );
  return list;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:22,代码来源:NormaliserTest.java


示例17: ValueMetaAndData

import org.pentaho.di.core.row.value.ValueMetaDate; //导入依赖的package包/类
public ValueMetaAndData( String valueName, Object valueData ) throws KettleValueException {
  this.valueData = valueData;
  if ( valueData instanceof String ) {
    this.valueMeta = new ValueMetaString( valueName );
  } else if ( valueData instanceof Double ) {
    this.valueMeta = new ValueMetaNumber( valueName );
  } else if ( valueData instanceof Long ) {
    this.valueMeta = new ValueMetaInteger( valueName );
  } else if ( valueData instanceof Date ) {
    this.valueMeta = new ValueMetaDate( valueName, ValueMetaInterface.TYPE_DATE );
  } else if ( valueData instanceof BigDecimal ) {
    this.valueMeta = new ValueMetaBigNumber( valueName );
  } else if ( valueData instanceof Boolean ) {
    this.valueMeta = new ValueMetaBoolean( valueName );
  } else if ( valueData instanceof byte[] ) {
    this.valueMeta = new ValueMetaBinary( valueName );
  } else {
    this.valueMeta = new ValueMetaSerializable( valueName );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:21,代码来源:ValueMetaAndData.java


示例18: populateMetaAndData

import org.pentaho.di.core.row.value.ValueMetaDate; //导入依赖的package包/类
private static void populateMetaAndData( int i, Object[] rowString10, RowMetaInterface metaString10,
  Object[] rowMixed10, RowMetaInterface metaMixed10 ) {
  rowString10[i] = StringUtil.generateRandomString( 20, "", "", false );
  ValueMetaInterface meta = new ValueMetaString( "String" + ( i + 1 ), 20, 0 );
  metaString10.addValueMeta( meta );

  rowMixed10[i * 5 + 0] = StringUtil.generateRandomString( 20, "", "", false );
  ValueMetaInterface meta0 = new ValueMetaString( "String" + ( i * 5 + 1 ), 20, 0 );
  metaMixed10.addValueMeta( meta0 );

  rowMixed10[i * 5 + 1] = new Date();
  ValueMetaInterface meta1 = new ValueMetaDate( "String" + ( i * 5 + 1 ) );
  metaMixed10.addValueMeta( meta1 );

  rowMixed10[i * 5 + 2] = new Double( Math.random() * 1000000 );
  ValueMetaInterface meta2 = new ValueMetaNumber( "String" + ( i * 5 + 1 ), 12, 4 );
  metaMixed10.addValueMeta( meta2 );

  rowMixed10[i * 5 + 3] = new Long( (long) ( Math.random() * 1000000 ) );
  ValueMetaInterface meta3 = new ValueMetaInteger( "String" + ( i * 5 + 1 ), 8, 0 );
  metaMixed10.addValueMeta( meta3 );

  rowMixed10[i * 5 + 4] = Boolean.valueOf( Math.random() > 0.5 ? true : false );
  ValueMetaInterface meta4 = new ValueMetaBoolean( "String" + ( i * 5 + 1 ) );
  metaMixed10.addValueMeta( meta4 );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:27,代码来源:SpeedTest.java


示例19: testRowMetaInitializingFromXmlNode

import org.pentaho.di.core.row.value.ValueMetaDate; //导入依赖的package包/类
@Test
public void testRowMetaInitializingFromXmlNode() throws Exception {
  String testXmlNode = null;
  try ( InputStream in = RowMetaTest.class.getResourceAsStream( "rowMetaNode.xml" ) ) {
    testXmlNode = IOUtils.toString( in );
  }
  Document xmlDoc = XMLHandler.loadXMLString( testXmlNode );
  RowMeta rowMeta = spy( new RowMeta( xmlDoc.getFirstChild() ) );
  assertEquals( 2, rowMeta.getValueMetaList().size() );
  ValueMetaInterface valueMeta = rowMeta.getValueMeta( 0 );
  assertTrue( valueMeta instanceof ValueMetaDate );
  assertEquals( "testDate", valueMeta.getName() );
  assertNull( valueMeta.getConversionMask() );
  valueMeta = rowMeta.getValueMeta( 1 );
  assertTrue( valueMeta instanceof ValueMetaTimestamp );
  assertEquals( "testTimestamp", valueMeta.getName() );
  assertEquals( "yyyy/MM/dd HH:mm:ss.000000000", valueMeta.getConversionMask() );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:19,代码来源:RowMetaTest.java


示例20: createTestRowMetaIndexedStringConversion1

import org.pentaho.di.core.row.value.ValueMetaDate; //导入依赖的package包/类
private RowMetaInterface createTestRowMetaIndexedStringConversion1( String[] colors, Date[] dates ) {
  RowMetaInterface rowMeta = new RowMeta();

  // A string object, indexed.
  ValueMetaInterface meta1 = new ValueMetaString( "stringValue", 30, 0 );
  meta1.setIndex( colors );
  meta1.setStorageType( ValueMetaInterface.STORAGE_TYPE_INDEXED );
  rowMeta.addValueMeta( meta1 );

  ValueMetaInterface meta2 = new ValueMetaDate( "dateValue" );
  meta2.setIndex( dates );
  meta2.setStorageType( ValueMetaInterface.STORAGE_TYPE_INDEXED );
  rowMeta.addValueMeta( meta2 );

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



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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