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.Map;
import lombok.Getter;
import lombok.Data;
import lombok.RequiredArgsConstructor;
import lombok.Setter;
import org.apache.fineract.accounting.glaccount.data.GLAccountData;
@RequiredArgsConstructor
@Getter
@Data
public class FinancialActivityAccountData {
private final Long id;
private final FinancialActivityData financialActivityData;
private final GLAccountData glAccountData;
@Setter
private Map<String, List<GLAccountData>> glAccountOptions;
@Setter
private List<FinancialActivityData> financialActivityOptions;
public FinancialActivityAccountData() {
@@ -18,12 +18,10 @@
*/
package org.apache.fineract.accounting.financialactivityaccount.data;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.Data;
import org.apache.fineract.accounting.glaccount.domain.GLAccountType;
@RequiredArgsConstructor
@Getter
@Data
public class FinancialActivityData {
private final Integer id;
@@ -24,11 +24,16 @@ import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
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.infrastructure.core.domain.AbstractPersistableCustom;
@Entity
@Table(name = "acc_gl_financial_activity_account")
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@Getter
public class FinancialActivityAccount extends AbstractPersistableCustom {
@ManyToOne(fetch = FetchType.EAGER)
@@ -42,23 +47,11 @@ public class FinancialActivityAccount extends AbstractPersistableCustom {
return new FinancialActivityAccount(glAccount, financialAccountType);
}
protected FinancialActivityAccount() {
//
}
private FinancialActivityAccount(final GLAccount glAccount, final int financialAccountType) {
this.glAccount = glAccount;
this.financialActivityType = financialAccountType;
}
public GLAccount getGlAccount() {
return this.glAccount;
}
public Integer getFinancialActivityType() {
return this.financialActivityType;
}
public void updateGlAccount(final GLAccount glAccount) {
this.glAccount = glAccount;
}