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