refactor: add lombok to FinancialActivityAccount module

This commit is contained in:
Hemant Gupta
2022-07-25 11:31:07 +02:00
committed by Arnold Gálovics
parent a555fe63bc
commit 4dada53f8d
3 changed files with 9 additions and 21 deletions
@@ -20,21 +20,18 @@ package org.apache.fineract.accounting.financialactivityaccount.data;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import lombok.Getter; import lombok.Data;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.Setter;
import org.apache.fineract.accounting.glaccount.data.GLAccountData; import org.apache.fineract.accounting.glaccount.data.GLAccountData;
@RequiredArgsConstructor @RequiredArgsConstructor
@Getter @Data
public class FinancialActivityAccountData { public class FinancialActivityAccountData {
private final Long id; private final Long id;
private final FinancialActivityData financialActivityData; private final FinancialActivityData financialActivityData;
private final GLAccountData glAccountData; private final GLAccountData glAccountData;
@Setter
private Map<String, List<GLAccountData>> glAccountOptions; private Map<String, List<GLAccountData>> glAccountOptions;
@Setter
private List<FinancialActivityData> financialActivityOptions; private List<FinancialActivityData> financialActivityOptions;
public FinancialActivityAccountData() { public FinancialActivityAccountData() {
@@ -18,12 +18,10 @@
*/ */
package org.apache.fineract.accounting.financialactivityaccount.data; package org.apache.fineract.accounting.financialactivityaccount.data;
import lombok.Getter; import lombok.Data;
import lombok.RequiredArgsConstructor;
import org.apache.fineract.accounting.glaccount.domain.GLAccountType; import org.apache.fineract.accounting.glaccount.domain.GLAccountType;
@RequiredArgsConstructor @Data
@Getter
public class FinancialActivityData { public class FinancialActivityData {
private final Integer id; private final Integer id;
@@ -24,11 +24,16 @@ import javax.persistence.FetchType;
import javax.persistence.JoinColumn; import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne; import javax.persistence.ManyToOne;
import javax.persistence.Table; import javax.persistence.Table;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.NoArgsConstructor;
import org.apache.fineract.accounting.glaccount.domain.GLAccount; import org.apache.fineract.accounting.glaccount.domain.GLAccount;
import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom;
@Entity @Entity
@Table(name = "acc_gl_financial_activity_account") @Table(name = "acc_gl_financial_activity_account")
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@Getter
public class FinancialActivityAccount extends AbstractPersistableCustom { public class FinancialActivityAccount extends AbstractPersistableCustom {
@ManyToOne(fetch = FetchType.EAGER) @ManyToOne(fetch = FetchType.EAGER)
@@ -42,23 +47,11 @@ public class FinancialActivityAccount extends AbstractPersistableCustom {
return new FinancialActivityAccount(glAccount, financialAccountType); return new FinancialActivityAccount(glAccount, financialAccountType);
} }
protected FinancialActivityAccount() {
//
}
private FinancialActivityAccount(final GLAccount glAccount, final int financialAccountType) { private FinancialActivityAccount(final GLAccount glAccount, final int financialAccountType) {
this.glAccount = glAccount; this.glAccount = glAccount;
this.financialActivityType = financialAccountType; this.financialActivityType = financialAccountType;
} }
public GLAccount getGlAccount() {
return this.glAccount;
}
public Integer getFinancialActivityType() {
return this.financialActivityType;
}
public void updateGlAccount(final GLAccount glAccount) { public void updateGlAccount(final GLAccount glAccount) {
this.glAccount = glAccount; this.glAccount = glAccount;
} }