Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions fineract-rates/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,13 @@ dependencies {
'com.squareup.retrofit2:converter-gson',

'org.springdoc:springdoc-openapi-starter-webmvc-ui',
'org.mapstruct:mapstruct',

'io.github.resilience4j:resilience4j-spring-boot3',
'org.apache.httpcomponents:httpcore',
)
compileOnly 'com.github.spotbugs:spotbugs-annotations'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
annotationProcessor 'org.mapstruct:mapstruct-processor'
implementation ('org.springframework.boot:spring-boot-starter-data-jpa') {
exclude group: 'org.hibernate'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ public BigDecimal getInterestRateDiff() {
return this.interestRateDiff;
}

public Collection<FloatingRatePeriodData> getBaseLendingRatePeriods() {
return this.baseLendingRatePeriods;
}

public void resetInterestRateDiff() {
this.interestRateDiff = this.actualInterestRateDiff;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import org.apache.commons.lang3.builder.CompareToBuilder;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.fineract.infrastructure.core.data.EnumOptionData;

@Getter
public class FloatingRateData implements Comparable<FloatingRateData>, Serializable {
Expand All @@ -39,11 +38,9 @@ public class FloatingRateData implements Comparable<FloatingRateData>, Serializa
private final String modifiedBy;
private final OffsetDateTime modifiedOn;
private final List<FloatingRatePeriodData> ratePeriods;
private final List<EnumOptionData> interestRateFrequencyTypeOptions;

public FloatingRateData(Long id, String name, Boolean isBaseLendingRate, Boolean isActive, String createdBy, OffsetDateTime createdOn,
String modifiedBy, OffsetDateTime modifiedOn, List<FloatingRatePeriodData> ratePeriods,
List<EnumOptionData> interestRateFrequencyTypeOptions) {
String modifiedBy, OffsetDateTime modifiedOn, List<FloatingRatePeriodData> ratePeriods) {
this.id = id;
this.name = name;
this.isBaseLendingRate = isBaseLendingRate;
Expand All @@ -53,7 +50,6 @@ public FloatingRateData(Long id, String name, Boolean isBaseLendingRate, Boolean
this.modifiedBy = modifiedBy;
this.modifiedOn = modifiedOn;
this.ratePeriods = ratePeriods;
this.interestRateFrequencyTypeOptions = interestRateFrequencyTypeOptions;
}

@Override
Expand Down Expand Up @@ -98,8 +94,4 @@ public int hashCode() {
.append(this.isActive) //
.toHashCode();
}

public static FloatingRateData toTemplate(List<EnumOptionData> interestRateFrequencyTypeOptions) {
return new FloatingRateData(null, null, false, true, null, null, null, null, null, interestRateFrequencyTypeOptions);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ public boolean isDifferentialToBLR() {
return this.isDifferentialToBLR;
}

public boolean isIsDifferentialToBLR() {
return this.isDifferentialToBLR;
}

public void setLoanDifferentialInterestRate(BigDecimal loanDifferentialInterestRate) {
this.loanDifferentialInterestRate = loanDifferentialInterestRate;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ public FloatingRateRepositoryWrapper(final FloatingRateRepository floatingRateRe
this.floatingRateRepository = floatingRateRepository;
}

public FloatingRate retrieveBaseLendingRate() {
return this.floatingRateRepository.retrieveBaseLendingRate();
}

public FloatingRate findOneWithNotFoundDetection(final Long id) {
return this.floatingRateRepository.findById(id).orElseThrow(() -> new FloatingRateNotFoundException(id));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ public FloatingRateNotFoundException(final Long id) {
super("error.msg.floatingrate.id.invalid", "Floating Rate with identifier " + id + " does not exist", id);
}

public FloatingRateNotFoundException(final String globalisationMessageCode) {
super(globalisationMessageCode, "Floating Rate does not exist");
}

public FloatingRateNotFoundException(String globalisationMessageCode, EmptyResultDataAccessException e) {
super(globalisationMessageCode, "Floating Rate does not exist", e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ public interface FloatingRatesReadService {

FloatingRateData retrieveOne(Long floatingRateId);

List<FloatingRateData> retrieveAllActive();

FloatingRateData retrieveBaseLendingRate();

List<InterestRatePeriodData> retrieveInterestRatePeriods(Long productId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,6 @@ public List<FloatingRateData> retrieveAll() {
return this.jdbcTemplate.query(sql, rateMapper); // NOSONAR
}

@Override
public List<FloatingRateData> retrieveAllActive() {
FloatingRateRowMapper rateMapper = new FloatingRateRowMapper(false);
final String sql = "select " + rateMapper.schema() + " where rate.is_active = true ";
return this.jdbcTemplate.query(sql, rateMapper);// NOSONAR
}

@Override
public List<FloatingRateData> retrieveLookupActive() {
FloatingRateLookupMapper rateMapper = new FloatingRateLookupMapper();
Expand Down Expand Up @@ -131,8 +124,7 @@ public FloatingRateData mapRow(final ResultSet rs, @SuppressWarnings("unused") f
+ " where period.is_active = true and period.floating_rates_id = ? " + " order by period.from_date desc ";
ratePeriods = jdbcTemplate.query(sql, ratePeriodMapper, id); // NOSONAR
}
return new FloatingRateData(id, name, isBaseLendingRate, isActive, createdBy, createdOn, modifiedBy, modifiedOn, ratePeriods,
null);
return new FloatingRateData(id, name, isBaseLendingRate, isActive, createdBy, createdOn, modifiedBy, modifiedOn, ratePeriods);
}

public String schema() {
Expand Down Expand Up @@ -188,7 +180,7 @@ public FloatingRateData mapRow(final ResultSet rs, @SuppressWarnings("unused") f
final Long id = rs.getLong("id");
final String name = rs.getString("name");
final boolean isBaseLendingRate = rs.getBoolean("isBaseLendingRate");
return new FloatingRateData(id, name, isBaseLendingRate, true, null, null, null, null, null, null);
return new FloatingRateData(id, name, isBaseLendingRate, true, null, null, null, null, null);
}

public String schema() {
Expand Down
Loading