Skip to content
Permalink
Browse files
LicenseFormat and clean up dead code
  • Loading branch information
Awasum Yannick committed Sep 29, 2017
1 parent 2408d21 commit c35f4b963e317d78306e1b20a245ff4172ba608d
Showing 6 changed files with 5 additions and 299 deletions.
@@ -41,9 +41,7 @@ public class BalanceSheetReportSpecification implements ReportSpecification {
private static final String TYPE = "Type";
private static final String IDENTIFIER = "Identifier";
private static final String NAME = "Name";
private static final String HOLDER = "Holder";
private static final String BALANCE = "Balance";
private static final String STATE = "State";

private final Logger logger;

@@ -123,9 +121,7 @@ private void initializeMapping() {
this.accountingColumnMapping.put(TYPE, "acc.a_type");
this.accountingColumnMapping.put(IDENTIFIER, "acc.identifier");
this.accountingColumnMapping.put(NAME, "acc.a_name");
this.accountingColumnMapping.put(HOLDER, "acc.holders");
this.accountingColumnMapping.put(BALANCE, "acc.balance");
this.accountingColumnMapping.put(STATE, "acc.a_state");

this.allColumnMapping.putAll(accountingColumnMapping);
}

This file was deleted.

@@ -41,9 +41,7 @@ public class IncomeStatementReportSpecification implements ReportSpecification {
private static final String TYPE = "Type";
private static final String IDENTIFIER = "Identifier";
private static final String NAME = "Name";
private static final String HOLDER = "Holder";
private static final String BALANCE = "Balance";
private static final String STATE = "State";

private final Logger logger;

@@ -123,9 +121,7 @@ private void initializeMapping() {
this.accountColumnMapping.put(TYPE, "acc.a_type");
this.accountColumnMapping.put(IDENTIFIER, "acc.identifier");
this.accountColumnMapping.put(NAME, "acc.a_name");
this.accountColumnMapping.put(HOLDER, "acc.holders");
this.accountColumnMapping.put(BALANCE, "acc.balance");
this.accountColumnMapping.put(STATE, "acc.a_state");

this.allColumnMapping.putAll(accountColumnMapping);
}
@@ -290,16 +286,11 @@ private List<DisplayableField> buildDisplayableFields() {
DisplayableFieldBuilder.create(TYPE, Type.TEXT).mandatory().build(),
DisplayableFieldBuilder.create(IDENTIFIER, Type.TEXT).mandatory().build(),
DisplayableFieldBuilder.create(NAME, Type.TEXT).mandatory().build(),
//DisplayableFieldBuilder.create(HOLDER, Type.TEXT).build(),
DisplayableFieldBuilder.create(BALANCE, Type.TEXT).mandatory().build()
// DisplayableFieldBuilder.create(STATE, Type.TEXT).mandatory().build()
);
}

private List<QueryParameter> buildQueryParameters() {
return Arrays.asList(
// QueryParameterBuilder.create(DATE_RANGE, Type.DATE).operator(QueryParameter.Operator.BETWEEN).build(),
//QueryParameterBuilder.create(STATE, Type.TEXT).operator(QueryParameter.Operator.IN).build()
);
return Arrays.asList();
}
}
@@ -274,10 +274,7 @@ private List<DisplayableField> buildDisplayableFields() {
}

private List<QueryParameter> buildQueryParameters() {
return Arrays.asList(
//QueryParameterBuilder.create(DATE_RANGE, Type.DATE).operator(QueryParameter.Operator.BETWEEN).build()
//QueryParameterBuilder.create(LOAN_STATE, Type.TEXT).operator(QueryParameter.Operator.IN).build()
);
return Arrays.asList();
}

private String buildCustomerQuery(final ReportRequest reportRequest, int pageIndex, int size){
@@ -84,7 +84,7 @@ public ReportPage generateReport(ReportRequest reportRequest, int pageIndex, int

final Query tellerQuery = this.entityManager.createNativeQuery(this.buildTellerQuery(reportRequest, pageIndex, size));
final List<?> tellerResultList = tellerQuery.getResultList();
reportPage.setRows(this.buildRows(reportRequest, tellerResultList));
reportPage.setRows(this.buildRows(tellerResultList));

reportPage.setHasMore(
!this.entityManager.createNativeQuery(this.buildTellerQuery(reportRequest, pageIndex + 1, size))
@@ -140,7 +140,7 @@ private Header createHeader(List<DisplayableField> displayableFields) {
return header;
}

private List<Row> buildRows(ReportRequest reportRequest, List<?> tellerResultList) {
private List<Row> buildRows(final List<?> tellerResultList) {
final ArrayList<Row> rows = new ArrayList<>();
tellerResultList.forEach(result -> {
final Row row = new Row();
@@ -154,7 +154,7 @@ private Header createHeader(final List<DisplayableField> displayableFields) {
}


private List<Row> buildRows(ReportRequest reportRequest, List<?> tellerResultList) {
private List<Row> buildRows(final ReportRequest reportRequest, final List<?> tellerResultList) {
final ArrayList<Row> rows = new ArrayList<>();

tellerResultList.forEach(result -> {

0 comments on commit c35f4b9

Please sign in to comment.