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


Java ValueMetaString.setStorageType方法代码示例

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


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

示例1: mockDataRowSet

import org.pentaho.di.core.row.value.ValueMetaString; //导入方法依赖的package包/类
private RowSet mockDataRowSet( boolean binary ) {
  final int storageType = binary ? ValueMetaInterface.STORAGE_TYPE_BINARY_STRING : ValueMetaInterface.STORAGE_TYPE_NORMAL;
  Object[][] data = { { "Name1", "1" }, { "Name2", "2" } };

  if ( binary ) {
    convertDataToBinary( data );
  }

  RowSet dataRowSet = smh.getMockInputRowSet( data );

  RowMeta dataRowMeta = new RowMeta();
  ValueMetaString valueMeta = new ValueMetaString( "Name" );
  valueMeta.setStorageType( storageType );
  valueMeta.setStorageMetadata( new ValueMetaString() );
  dataRowMeta.addValueMeta( valueMeta );
  ValueMetaString idMeta = new ValueMetaString( "Id" );
  idMeta.setStorageType( storageType );
  idMeta.setStorageMetadata( new ValueMetaString() );
  dataRowMeta.addValueMeta( idMeta );

  doReturn( dataRowMeta ).when( dataRowSet ).getRowMeta();

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

示例2: mockInputRowSet

import org.pentaho.di.core.row.value.ValueMetaString; //导入方法依赖的package包/类
private RowSet mockInputRowSet() {
  ValueMetaString valueMeta = new ValueMetaString( "Value" );
  valueMeta.setStorageType( ValueMetaInterface.STORAGE_TYPE_BINARY_STRING );
  valueMeta.setStorageMetadata( new ValueMetaString( "Value" ) );

  RowMeta inputRowMeta = new RowMeta();
  inputRowMeta.addValueMeta( valueMeta );

  RowSet inputRowSet = smh.getMockInputRowSet( new Object[][] { { " Value ".getBytes() } } );
  doReturn( inputRowMeta ).when( inputRowSet ).getRowMeta();

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

示例3: mockInputRowMeta

import org.pentaho.di.core.row.value.ValueMetaString; //导入方法依赖的package包/类
private RowMeta mockInputRowMeta() {
  RowMeta inputRowMeta = new RowMeta();
  ValueMetaString nameMeta = new ValueMetaString( "name" );
  nameMeta.setStorageType( ValueMetaInterface.STORAGE_TYPE_BINARY_STRING );
  nameMeta.setStorageMetadata( new ValueMetaString( "name" ) );
  inputRowMeta.addValueMeta( nameMeta );
  ValueMetaString idMeta = new ValueMetaString( "id" );
  idMeta.setStorageType( ValueMetaInterface.STORAGE_TYPE_BINARY_STRING );
  idMeta.setStorageMetadata( new ValueMetaString( "id" ) );
  inputRowMeta.addValueMeta( idMeta );

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

示例4: mockLookupRowSet

import org.pentaho.di.core.row.value.ValueMetaString; //导入方法依赖的package包/类
private RowSet mockLookupRowSet( boolean binary ) {
  final int storageType = binary ? ValueMetaInterface.STORAGE_TYPE_BINARY_STRING : ValueMetaInterface.STORAGE_TYPE_NORMAL;
  Object[][] data = { { "Value1", "1" }, { "Value2", "2" } };

  if ( binary ) {
    convertDataToBinary( data );
  }

  RowSet lookupRowSet =
    smh.getMockInputRowSet( data );
  doReturn( "Lookup" ).when( lookupRowSet ).getOriginStepName();
  doReturn( "StreamLookup" ).when( lookupRowSet ).getDestinationStepName();

  RowMeta lookupRowMeta = new RowMeta();
  ValueMetaString valueMeta = new ValueMetaString( "Value" );
  valueMeta.setStorageType( storageType );
  valueMeta.setStorageMetadata( new ValueMetaString() );
  lookupRowMeta.addValueMeta( valueMeta );
  ValueMetaString idMeta = new ValueMetaString( "Id" );
  idMeta.setStorageType( storageType );
  idMeta.setStorageMetadata( new ValueMetaString() );
  lookupRowMeta.addValueMeta( idMeta );

  doReturn( lookupRowMeta ).when( lookupRowSet ).getRowMeta();

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


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