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


Java StringUtil.EMPTY_STRING属性代码示例

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


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

示例1: replaceNull

public void replaceNull(Object[] row, ValueMetaInterface sourceValueMeta, 
		int i, String realReplaceByValue, String realconversionMask, boolean setEmptystring) throws Exception
{
	if(setEmptystring)
	{
		row[i]= StringUtil.EMPTY_STRING;
	}
	else
	{
		// DO CONVERSION OF THE DEFAULT VALUE ...
		// Entered by user
		ValueMetaInterface targetValueMeta = data.outputRowMeta.getValueMeta(i);
		if(!Const.isEmpty(realconversionMask)) sourceValueMeta.setConversionMask(realconversionMask);
		row[i] = targetValueMeta.convertData(sourceValueMeta, realReplaceByValue);
	}
}
 
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:16,代码来源:IfNull.java

示例2: getResolvedReplaceByString

private String getResolvedReplaceByString(int index, Object[] row)  throws KettleException {
  	
  	
  	if(data.setEmptyString[index]) {
  		// return empty string rather than null value
  		return StringUtil.EMPTY_STRING;
  	}
  	
  	//if there is something in the original replaceByString, then use it.
  	if (data.replaceFieldIndex[index] == -1) {
  		return data.replaceByString[index];
  	}
  	
return getInputRowMeta().getString(row, data.replaceFieldIndex[index]);
  }
 
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:15,代码来源:ReplaceString.java

示例3: getResolvedReplaceByString

private String getResolvedReplaceByString( int index, Object[] row ) throws KettleException {

    if ( data.setEmptyString[index] ) {
      // return empty string rather than null value
      return StringUtil.EMPTY_STRING;
    }

    // if there is something in the original replaceByString, then use it.
    if ( data.replaceFieldIndex[index] == -1 ) {
      return data.replaceByString[index];
    }

    return getInputRowMeta().getString( row, data.replaceFieldIndex[index] );
  }
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:14,代码来源:ReplaceString.java

示例4: replaceNull

public void replaceNull( Object[] row, ValueMetaInterface sourceValueMeta, int i, String realReplaceByValue,
  String realconversionMask, boolean setEmptystring ) throws Exception {
  if ( setEmptystring ) {
    row[i] = StringUtil.EMPTY_STRING;
  } else {
    // DO CONVERSION OF THE DEFAULT VALUE ...
    // Entered by user
    ValueMetaInterface targetValueMeta = data.outputRowMeta.getValueMeta( i );
    if ( !Utils.isEmpty( realconversionMask ) ) {
      sourceValueMeta.setConversionMask( realconversionMask );
    }
    row[i] = targetValueMeta.convertData( sourceValueMeta, realReplaceByValue );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:14,代码来源:IfNull.java

示例5: setDefault

@Override
public void setDefault() {
  startsWithHeader = true;
  ignoreEmptyRows = true;
  rowNumberField = StringUtil.EMPTY_STRING;
  sheetRowNumberField = StringUtil.EMPTY_STRING;
  isaddresult = true;
  int nrfiles = 0;
  int nrfields = 0;
  int nrsheets = 0;

  allocate( nrfiles, nrsheets, nrfields );

  rowLimit = 0L;

  strictTypes = false;
  errorIgnored = false;
  errorLineSkipped = false;
  warningFilesDestinationDirectory = null;
  warningFilesExtension = "warning";
  errorFilesDestinationDirectory = null;
  errorFilesExtension = "error";
  lineNumberFilesDestinationDirectory = null;
  lineNumberFilesExtension = "line";

  spreadSheetType = SpreadSheetType.JXL; // default.
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:27,代码来源:ExcelInputMeta.java

示例6: whenExportingResourcesWeGetFileObjectsOnlyFromFilesWithNotNullAndNotEmptyFileNames

@Test
public void whenExportingResourcesWeGetFileObjectsOnlyFromFilesWithNotNullAndNotEmptyFileNames() throws Exception {
  inputMeta.inputFiles = new BaseFileInputFiles();
  inputMeta.inputFiles.fileName = new String[] { FILE_NAME_NULL, FILE_NAME_EMPTY, FILE_NAME_VALID_PATH };
  inputMeta.inputFiles.fileMask =
    new String[] { StringUtil.EMPTY_STRING, StringUtil.EMPTY_STRING, StringUtil.EMPTY_STRING };

  inputMeta.exportResources( variableSpace, null, mock( ResourceNamingInterface.class ), null, null );

  verify( inputMeta ).getFileObject( FILE_NAME_VALID_PATH, variableSpace );
  verify( inputMeta, never() ).getFileObject( FILE_NAME_NULL, variableSpace );
  verify( inputMeta, never() ).getFileObject( FILE_NAME_EMPTY, variableSpace );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:13,代码来源:TextFileInputMetaTest.java


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