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


Java FieldSet.readString方法代码示例

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


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

示例1: mapFieldSet

import org.springframework.batch.item.file.transform.FieldSet; //导入方法依赖的package包/类
@Override
public CompetitiveIntelligenceReports mapFieldSet(final FieldSet fieldSet) throws BindException {
    final String year = fieldSet.readString(YEAR);
    if (Strings.isNotBlank(year)) {
        final String[] yearSplit = year.split(" ");
        Assertions.assertThat(yearSplit).hasSize(2);
        curYear = Integer.parseInt(yearSplit[1]);
    }
    final String title = fieldSet.readString(TITLE);
    if (Strings.isBlank(title)) {
        return INVALID_ROW;
    }
    final String categoryStr = fieldSet.readString(CATEGORY);
    if (Strings.isNotBlank(categoryStr)) {
        curCategory = CompetitiveIntelligenceReportParserCategory.valueOfTitle(categoryStr);
    }
    parseCompanyLetters(fieldSet, title);
    parseAvg(fieldSet, title);
    return reports;
}
 
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:21,代码来源:CompetitiveIntelligenceReportParserMapper.java

示例2: updateCategoryAndTitle

import org.springframework.batch.item.file.transform.FieldSet; //导入方法依赖的package包/类
protected void updateCategoryAndTitle(final FieldSet fieldSet) {
    final String category1 = fieldSet.readString(CompanyOperatingReportParserMapper.CATEGORY1);
    if ("N.A. Market----------------".equals(category1)) {
        curRegion = CompanyRegion.NorthAmerica;
    } else if ("E-A Market----------------".equals(category1)) {
        curRegion = CompanyRegion.EuropeAfrica;
    } else if ("A-P Market----------------".equals(category1)) {
        curRegion = CompanyRegion.AsiaPacific;
        //
    } else if ("L.A. Market----------------".equals(category1)) {
        curRegion = CompanyRegion.LatinAmerica;
    }

    final String title1 = fieldSet.readString(CompanyOperatingReportParserMapper.TITLE1);
    if (Strings.isNotBlank(title1)) {
        curTitle1 = title1;
        curTitle2 = null;
    }
    final String title2 = fieldSet.readString(CompanyOperatingReportParserMapper.TITLE2);
    if (Strings.isNotBlank(title2)) {
        curTitle2 = title2;
    }
}
 
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:24,代码来源:InternetMarketPerformanceSubReportParser.java

示例3: updateCategoryAndTitle

import org.springframework.batch.item.file.transform.FieldSet; //导入方法依赖的package包/类
protected void updateCategoryAndTitle(final FieldSet fieldSet) {
    final String category1 = fieldSet.readString(CompanyOperatingReportParserMapper.CATEGORY1);
    if (Strings.isNotBlank(category1)) {
        curCategory1 = category1;
        curCategory2 = null;
        curTitle1 = null;
        curTitle2 = null;
    }
    final String category2 = fieldSet.readString(CompanyOperatingReportParserMapper.CATEGORY2);
    if (Strings.isNotBlank(category2)) {
        curCategory2 = category2;
        curTitle1 = null;
        curTitle2 = null;
    }
    final String title1 = fieldSet.readString(CompanyOperatingReportParserMapper.TITLE1);
    if (Strings.isNotBlank(title1)) {
        curTitle1 = title1;
        //
        curTitle2 = null;
    }
    final String title2 = fieldSet.readString(CompanyOperatingReportParserMapper.TITLE2);
    if (Strings.isNotBlank(title2)) {
        curTitle2 = title2;
    }
}
 
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:26,代码来源:CashFlowSubReportParser.java

示例4: mapFieldSet

import org.springframework.batch.item.file.transform.FieldSet; //导入方法依赖的package包/类
@Override
public T mapFieldSet(FieldSet fieldSet) throws BindException {
    T entity = null;
    Integer indexColumn = fileOption.getKeyColumn();
    String indexColumnName = fieldSet.getNames()[indexColumn];
    Function<String, T> finder = getEntityFinder(indexColumnName);

    if (finder == null) {
        throw new BindException(entityType, "finder '" + indexColumnName + "' not found.");
    }

    String indexColumnValue = fieldSet.readString(indexColumn);
    entity = finder.apply(indexColumnValue);

    if (entity == null) {
        entity = newEntitySupplier.get();
    }

    bindData(entity, fieldSet.getProperties());

    return entity;
}
 
开发者ID:imCodePartnerAB,项目名称:iVIS,代码行数:23,代码来源:EntityLoader.java

示例5: updateCategoryAndTitle

import org.springframework.batch.item.file.transform.FieldSet; //导入方法依赖的package包/类
protected void updateCategoryAndTitle(final FieldSet fieldSet) {
    final String category1 = fieldSet.readString(CompanyOperatingReportParserMapper.CATEGORY1);
    if (Strings.isNotBlank(category1)) {
        curCategory1 = category1;
        curCategory2 = null;
        curTitle2 = null;
    }
    final String category2 = fieldSet.readString(CompanyOperatingReportParserMapper.CATEGORY2);
    if (Strings.isNotBlank(category2)) {
        curCategory2 = category2;
        curTitle2 = null;
    }
    final String title2 = fieldSet.readString(CompanyOperatingReportParserMapper.TITLE2);
    if (Strings.isNotBlank(title2)) {
        curTitle2 = title2;
    }
}
 
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:18,代码来源:PrivateLabelBidsSubReportParser.java

示例6: mapFieldSet

import org.springframework.batch.item.file.transform.FieldSet; //导入方法依赖的package包/类
@Override
public CompanyOperatingReports mapFieldSet(final FieldSet fieldSet) throws BindException {
    final String subReport = fieldSet.readString(SUB_REPORT);
    if (Strings.isNotBlank(subReport)) {
        final CompanyOperatingReportParserSubReport newSubReport = CompanyOperatingReportParserSubReport
                .valueOfTitle(curSubReport, subReport);
        if (newSubReport != curSubReport) {
            curSubReport = newSubReport;
            curSubReportParser = curSubReport.newSubReportParser();
        }
    }

    if (Strings.isBlank(fieldSet.readString(SUB_REPORT)) && Strings.isBlank(fieldSet.readString(CATEGORY1))
            && Strings.isBlank(fieldSet.readString(CATEGORY2)) && Strings.isBlank(fieldSet.readString(TITLE1))
            && Strings.isBlank(fieldSet.readString(TITLE2)) || Strings.isBlank(fieldSet.readString(VALUE))) {
        return INVALID_ROW;
    }

    if (curSubReportParser != null) {
        curSubReportParser.parse(fieldSet, reports);
        return reports;
    } else {
        return INVALID_ROW;
    }
}
 
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:26,代码来源:CompanyOperatingReportParserMapper.java

示例7: updateCategoryAndTitle

import org.springframework.batch.item.file.transform.FieldSet; //导入方法依赖的package包/类
protected void updateCategoryAndTitle(final FieldSet fieldSet) {
    final String category1 = fieldSet.readString(CompanyOperatingReportParserMapper.CATEGORY1);
    if (Strings.isNotBlank(category1)) {
        curCategory1 = category1;
        curCategory2 = null;
        curTitle1 = null;
        curTitle2 = null;
    }
    final String category2 = fieldSet.readString(CompanyOperatingReportParserMapper.CATEGORY2);
    if (Strings.isNotBlank(category2)) {
        curCategory2 = category2;
        curTitle1 = null;
        curTitle2 = null;
    }
    final String title1 = fieldSet.readString(CompanyOperatingReportParserMapper.TITLE1);
    if (Strings.isNotBlank(title1)) {
        curTitle1 = title1;
        curTitle2 = null;
    }
    final String title2 = fieldSet.readString(CompanyOperatingReportParserMapper.TITLE2);
    if (Strings.isNotBlank(title2)) {
        curTitle2 = title2;
    }
}
 
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:25,代码来源:InternetMarketingExpensesSubReportParser.java

示例8: updateCategoryAndTitle

import org.springframework.batch.item.file.transform.FieldSet; //导入方法依赖的package包/类
protected void updateCategoryAndTitle(final FieldSet fieldSet) {
    final String category1 = fieldSet.readString(CompanyOperatingReportParserMapper.CATEGORY1);
    if (Strings.isNotBlank(category1)) {
        curCategory1 = category1;
        curTitle1 = null;
        curTitle2 = null;
    }
    final String title1 = fieldSet.readString(CompanyOperatingReportParserMapper.TITLE1);
    if (Strings.isNotBlank(title1)) {
        curTitle1 = title1;
        curTitle2 = null;
    }
    final String title2 = fieldSet.readString(CompanyOperatingReportParserMapper.TITLE2);
    if (Strings.isNotBlank(title2)) {
        curTitle2 = title2;
    }
}
 
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:18,代码来源:BankLoansSubReportParser.java

示例9: mapFieldSet

import org.springframework.batch.item.file.transform.FieldSet; //导入方法依赖的package包/类
@Override
public Product mapFieldSet(FieldSet fieldSet) throws BindException {
    String id = fieldSet.readString("id");
    Product product = null;
    if (id.startsWith("PRB")) {
        product = new BookProduct();
    } else if (id.startsWith("PRM")) {
        product = new MobilePhoneProduct();
    } else {
        product = new Product();
    }

    product.setId(id);
    product.setName(fieldSet.readString("name"));
    product.setDescription(fieldSet.readString("description"));
    product.setPrice(fieldSet.readFloat("price"));

    return product;
}
 
开发者ID:debop,项目名称:spring-batch-experiments,代码行数:20,代码来源:ProductFieldSetMapper.java

示例10: readInteger

import org.springframework.batch.item.file.transform.FieldSet; //导入方法依赖的package包/类
private static Integer readInteger(final FieldSet fieldSet, final int fieldCounter, final boolean castFromDouble) {
    final String rawValue = fieldSet.readString(fieldCounter);

    if (StringUtils.isNotBlank(rawValue)) {
        if (castFromDouble) {
            return Double.valueOf(rawValue).intValue();
        }
        return Integer.valueOf(rawValue);
    }

    return null;
}
 
开发者ID:suomenriistakeskus,项目名称:oma-riista-web,代码行数:13,代码来源:LHHuntingClubLineFieldMapper.java

示例11: readInteger

import org.springframework.batch.item.file.transform.FieldSet; //导入方法依赖的package包/类
private static Integer readInteger(FieldSet fieldSet, int fieldCounter) {
    String rawValue = fieldSet.readString(fieldCounter);

    if (StringUtils.isNotBlank(rawValue)) {
        return Integer.parseInt(rawValue);
    }

    return null;
}
 
开发者ID:suomenriistakeskus,项目名称:oma-riista-web,代码行数:10,代码来源:InnofactorImportFileFieldSetMapper.java

示例12: readLocalDate

import org.springframework.batch.item.file.transform.FieldSet; //导入方法依赖的package包/类
private static LocalDate readLocalDate(FieldSet fieldSet, int fieldCounter) {
    String rawValue = fieldSet.readString(fieldCounter);

    if (StringUtils.isNotBlank(rawValue)) {
        return DATE_TIME_FORMATTER.parseLocalDate(rawValue);
    }

    return null;
}
 
开发者ID:suomenriistakeskus,项目名称:oma-riista-web,代码行数:10,代码来源:InnofactorImportFileFieldSetMapper.java

示例13: updateCategoryAndTitle

import org.springframework.batch.item.file.transform.FieldSet; //导入方法依赖的package包/类
protected void updateCategoryAndTitle(final FieldSet fieldSet) {
    final String category1 = fieldSet.readString(CompanyOperatingReportParserMapper.CATEGORY1);
    if ("N.A.------------".equals(category1)) {
        curRegion = CompanyRegion.NorthAmerica;
    } else if ("E-A------------".equals(category1)) {
        curRegion = CompanyRegion.EuropeAfrica;
    } else if ("A-P------------".equals(category1)) {
        curRegion = CompanyRegion.AsiaPacific;
    } else if ("L.A.------------".equals(category1)) {
        curRegion = CompanyRegion.LatinAmerica;
    }

    final String category2 = fieldSet.readString(CompanyOperatingReportParserMapper.CATEGORY2);
    if (Strings.isNotBlank(category2)) {
        curCategory2 = category2;
        curTitle1 = null;
        curTitle2 = null;
    }
    final String title1 = fieldSet.readString(CompanyOperatingReportParserMapper.TITLE1);
    if (Strings.isNotBlank(title1)) {
        curTitle1 = title1;
        curTitle2 = null;
    }
    final String title2 = fieldSet.readString(CompanyOperatingReportParserMapper.TITLE2);
    if (Strings.isNotBlank(title2)) {
        curTitle2 = title2;
    }
}
 
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:29,代码来源:PrivateLabelOperationsSubReportParser.java

示例14: mapFieldSet

import org.springframework.batch.item.file.transform.FieldSet; //导入方法依赖的package包/类
@Override
public String[] mapFieldSet(FieldSet fieldSet) throws BindException {
	
	List<String> record = new ArrayList<String>();
	
	for(String db : dbNames){
		String value = (properties.getProperty(db) != null) ? fieldSet.readString(properties.getProperty(db)) : "";
		value = (value.length() > 0) ? mapValue(db, value) : null; // if value is empty string then assign null
		record.add(value);
	}
	return record.toArray(new String[0]);
}
 
开发者ID:MIABIS,项目名称:miabis-converter,代码行数:13,代码来源:TitleAwareFieldSetMapper.java

示例15: updateCategoryAndTitle

import org.springframework.batch.item.file.transform.FieldSet; //导入方法依赖的package包/类
protected void updateCategoryAndTitle(final FieldSet fieldSet) {
    final String category2 = fieldSet.readString(CompanyOperatingReportParserMapper.CATEGORY2);
    if (Strings.isNotBlank(category2)) {
        curCategory2 = category2;
        curTitle2 = null;
    }
    final String title2 = fieldSet.readString(CompanyOperatingReportParserMapper.TITLE2);
    if (Strings.isNotBlank(title2)) {
        curTitle2 = title2;
    }
}
 
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:12,代码来源:CelebrityEndorsementsSubReportParser.java


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