refactor: add lombok to closure module
This commit is contained in:
committed by
Arnold Gálovics
parent
d6f8ef8b74
commit
da920b1824
+2
-6
@@ -21,9 +21,7 @@ package org.apache.fineract.accounting.closure.data;
|
|||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import lombok.Getter;
|
import lombok.Data;
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import lombok.Setter;
|
|
||||||
import org.apache.fineract.organisation.office.data.OfficeData;
|
import org.apache.fineract.organisation.office.data.OfficeData;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -31,8 +29,7 @@ import org.apache.fineract.organisation.office.data.OfficeData;
|
|||||||
*
|
*
|
||||||
* Note: no getter/setters required as google-gson will produce json from fields of object.
|
* Note: no getter/setters required as google-gson will produce json from fields of object.
|
||||||
*/
|
*/
|
||||||
@RequiredArgsConstructor
|
@Data
|
||||||
@Getter
|
|
||||||
public class GLClosureData {
|
public class GLClosureData {
|
||||||
|
|
||||||
private final Long id;
|
private final Long id;
|
||||||
@@ -48,6 +45,5 @@ public class GLClosureData {
|
|||||||
private final String lastUpdatedByUsername;
|
private final String lastUpdatedByUsername;
|
||||||
private final String comments;
|
private final String comments;
|
||||||
|
|
||||||
@Setter
|
|
||||||
private Collection<OfficeData> allowedOffices = new ArrayList<>();
|
private Collection<OfficeData> allowedOffices = new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-12
@@ -27,6 +27,9 @@ import javax.persistence.JoinColumn;
|
|||||||
import javax.persistence.ManyToOne;
|
import javax.persistence.ManyToOne;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import javax.persistence.UniqueConstraint;
|
import javax.persistence.UniqueConstraint;
|
||||||
|
import lombok.AccessLevel;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.fineract.accounting.closure.api.GLClosureJsonInputParams;
|
import org.apache.fineract.accounting.closure.api.GLClosureJsonInputParams;
|
||||||
import org.apache.fineract.infrastructure.core.api.JsonCommand;
|
import org.apache.fineract.infrastructure.core.api.JsonCommand;
|
||||||
@@ -36,6 +39,8 @@ import org.apache.fineract.organisation.office.domain.Office;
|
|||||||
@Entity
|
@Entity
|
||||||
@Table(name = "acc_gl_closure", uniqueConstraints = {
|
@Table(name = "acc_gl_closure", uniqueConstraints = {
|
||||||
@UniqueConstraint(columnNames = { "office_id", "closing_date" }, name = "office_id_closing_date") })
|
@UniqueConstraint(columnNames = { "office_id", "closing_date" }, name = "office_id_closing_date") })
|
||||||
|
@NoArgsConstructor(access = AccessLevel.PROTECTED)
|
||||||
|
@Getter
|
||||||
public class GLClosure extends AbstractAuditableCustom {
|
public class GLClosure extends AbstractAuditableCustom {
|
||||||
|
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
@@ -51,10 +56,6 @@ public class GLClosure extends AbstractAuditableCustom {
|
|||||||
@Column(name = "comments", nullable = true, length = 500)
|
@Column(name = "comments", nullable = true, length = 500)
|
||||||
private String comments;
|
private String comments;
|
||||||
|
|
||||||
protected GLClosure() {
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
public GLClosure(final Office office, final LocalDate closingDate, final String comments) {
|
public GLClosure(final Office office, final LocalDate closingDate, final String comments) {
|
||||||
this.office = office;
|
this.office = office;
|
||||||
this.deleted = false;
|
this.deleted = false;
|
||||||
@@ -89,12 +90,4 @@ public class GLClosure extends AbstractAuditableCustom {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDate getClosingDate() {
|
|
||||||
return this.closingDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Office getOffice() {
|
|
||||||
return this.office;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user