FINERACT-1912 Refactored Implementation of Savings Account Transaction Search

FINERACT-1912 Refactored Implementation of Savings Account Transaction Search

FINERACT-1912 Refactored Implementation of Savings Account Transaction Search

FINERACT-1912 Savings Account Transaction Advanced Search Support

FINERACT-1912 Savings Account Transaction Advanced Search Support

Support Pagination, Sorting and Filtering By transaction Type, Transaction Date and Amount

Supported Filtering for Amount and Date,
GTE, LTE, GT, LT
Supported Multiple Transaction Types Filtering
This commit is contained in:
Mkkor
2023-06-13 16:37:42 +02:00
committed by Arnold Gálovics
parent 25d7a9228a
commit 5d011077e7
17 changed files with 1340 additions and 2 deletions
@@ -275,6 +275,23 @@ public class DataValidatorBuilder {
return this;
}
public DataValidatorBuilder notExceedingListLengthOf(final Integer maxLength) {
if (this.value == null && this.ignoreNullValue) {
return this;
}
if (this.value instanceof List && ((List<?>) this.value).size() > maxLength) {
final StringBuilder validationErrorCode = new StringBuilder("validation.msg.").append(this.resource).append(".")
.append(this.parameter).append(".exceeds.max.length.allowed");
final StringBuilder defaultEnglishMessage = new StringBuilder("The parameter `").append(this.parameter)
.append("` exceeds allowed max length of ").append(maxLength).append(".");
final ApiParameterError error = ApiParameterError.parameterError(validationErrorCode.toString(),
defaultEnglishMessage.toString(), this.parameter);
this.dataValidationErrors.add(error);
}
return this;
}
public DataValidatorBuilder inMinMaxRange(final Integer min, final Integer max) {
if (this.value == null && this.ignoreNullValue) {
return this;
@@ -0,0 +1,31 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.infrastructure.core.data;
import lombok.AllArgsConstructor;
import lombok.Getter;
@AllArgsConstructor
@Getter
public enum RangeOperator {
GTE(">="), LTE("<="), GT(">"), LT("<");
private final String symbol;
}