Introduce Lombok to savings module: interoperation package (FINERACT-2056)
Introduce Lombok to savings module: interoperation package (FINERACT-2056)
This commit is contained in:
+4
-18
@@ -19,9 +19,13 @@
|
||||
package org.apache.fineract.interoperation.data;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import org.apache.fineract.interoperation.domain.InteropIdentifier;
|
||||
import org.apache.fineract.interoperation.domain.InteropIdentifierType;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public class InteropIdentifierData {
|
||||
|
||||
@NotNull
|
||||
@@ -32,28 +36,10 @@ public class InteropIdentifierData {
|
||||
|
||||
private final String subIdOrType;
|
||||
|
||||
public InteropIdentifierData(@NotNull InteropIdentifierType idType, @NotNull String idValue, String subIdOrType) {
|
||||
this.idType = idType;
|
||||
this.idValue = idValue;
|
||||
this.subIdOrType = subIdOrType;
|
||||
}
|
||||
|
||||
protected InteropIdentifierData(@NotNull InteropIdentifierType idType, @NotNull String idValue) {
|
||||
this(idType, idValue, null);
|
||||
}
|
||||
|
||||
public InteropIdentifierType getIdType() {
|
||||
return idType;
|
||||
}
|
||||
|
||||
public String getIdValue() {
|
||||
return idValue;
|
||||
}
|
||||
|
||||
public String getSubIdOrType() {
|
||||
return subIdOrType;
|
||||
}
|
||||
|
||||
public static InteropIdentifierData build(InteropIdentifier identifier) {
|
||||
return new InteropIdentifierData(identifier.getType(), identifier.getValue(), identifier.getSubType());
|
||||
}
|
||||
|
||||
+6
-50
@@ -29,11 +29,17 @@ import jakarta.persistence.UniqueConstraint;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Objects;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom;
|
||||
import org.apache.fineract.infrastructure.core.service.DateUtils;
|
||||
import org.apache.fineract.portfolio.savings.domain.SavingsAccount;
|
||||
|
||||
@Entity
|
||||
@Setter
|
||||
@Getter
|
||||
@NoArgsConstructor
|
||||
@Table(name = "interop_identifier", uniqueConstraints = {
|
||||
@UniqueConstraint(name = "uk_hathor_identifier_account", columnNames = { "account_id", "type" }),
|
||||
@UniqueConstraint(name = "uk_hathor_identifier_value", columnNames = { "type", "a_value", "sub_value_or_type" }) })
|
||||
@@ -65,8 +71,6 @@ public class InteropIdentifier extends AbstractPersistableCustom {
|
||||
@Column(name = "modified_on")
|
||||
private LocalDateTime modifiedOn;
|
||||
|
||||
protected InteropIdentifier() {}
|
||||
|
||||
public InteropIdentifier(@NotNull SavingsAccount account, @NotNull InteropIdentifierType type, @NotNull String value, String subType,
|
||||
@NotNull String createdBy) {
|
||||
this.account = account;
|
||||
@@ -81,54 +85,6 @@ public class InteropIdentifier extends AbstractPersistableCustom {
|
||||
this(account, type, null, null, createdBy);
|
||||
}
|
||||
|
||||
public SavingsAccount getAccount() {
|
||||
return account;
|
||||
}
|
||||
|
||||
public InteropIdentifierType getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getSubType() {
|
||||
return subType;
|
||||
}
|
||||
|
||||
public void setSubType(String subType) {
|
||||
this.subType = subType;
|
||||
}
|
||||
|
||||
public String getCreatedBy() {
|
||||
return createdBy;
|
||||
}
|
||||
|
||||
public LocalDateTime getCreatedOn() {
|
||||
return createdOn;
|
||||
}
|
||||
|
||||
public String geModifiedBy() {
|
||||
return modifiedBy;
|
||||
}
|
||||
|
||||
public void setModifiedBy(String modifiedBy) {
|
||||
this.modifiedBy = modifiedBy;
|
||||
}
|
||||
|
||||
public LocalDateTime getModifiedOn() {
|
||||
return modifiedOn;
|
||||
}
|
||||
|
||||
public void setModifiedOn(LocalDateTime modifiedOn) {
|
||||
this.modifiedOn = modifiedOn;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
|
||||
Reference in New Issue
Block a user