fineract-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From my...@apache.org
Subject [fineract-cn-payroll] 20/27: only allow one account per config and allocation
Date Mon, 22 Jan 2018 15:29:36 GMT
This is an automated email from the ASF dual-hosted git repository.

myrle pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-payroll.git

commit d59dc5c81b2a096f3f7f10cebe772b4af77126e9
Author: mgeiss <mgeiss@mifos.org>
AuthorDate: Wed Sep 20 13:58:20 2017 +0200

    only allow one account per config and allocation
---
 .../io/mifos/payroll/api/v1/domain/PayrollAllocation.java | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/api/src/main/java/io/mifos/payroll/api/v1/domain/PayrollAllocation.java b/api/src/main/java/io/mifos/payroll/api/v1/domain/PayrollAllocation.java
index 3a4d42c..ad606f4 100644
--- a/api/src/main/java/io/mifos/payroll/api/v1/domain/PayrollAllocation.java
+++ b/api/src/main/java/io/mifos/payroll/api/v1/domain/PayrollAllocation.java
@@ -59,4 +59,19 @@ public class PayrollAllocation {
   public void setProportional(final Boolean proportional) {
     this.proportional = proportional;
   }
+
+  @Override
+  public boolean equals(final Object o) {
+    if (this == o) return true;
+    if (o == null || getClass() != o.getClass()) return false;
+
+    final PayrollAllocation that = (PayrollAllocation) o;
+
+    return accountNumber != null ? accountNumber.equals(that.accountNumber) : that.accountNumber
== null;
+  }
+
+  @Override
+  public int hashCode() {
+    return accountNumber != null ? accountNumber.hashCode() : 0;
+  }
 }

-- 
To stop receiving notification emails like this one, please contact
myrle@apache.org.

Mime
View raw message