本文整理汇总了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);
}
}
示例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]);
}
示例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] );
}
示例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 );
}
}
示例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.
}
示例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 );
}