From 65aad2179068f101e5081f620a83d37224770417 Mon Sep 17 00:00:00 2001 From: kkholmatov Date: Mon, 27 Mar 2023 14:48:26 +0500 Subject: [PATCH] - lombok dependency added to build.gradle - @Setter/@Getter/@NoArgConstructor annotations implemented to Tenant.java --- build.gradle | 2 ++ .../messagegateway/tenants/domain/Tenant.java | 30 +++---------------- 2 files changed, 6 insertions(+), 26 deletions(-) diff --git a/build.gradle b/build.gradle index f741db3f..28f0d85c 100644 --- a/build.gradle +++ b/build.gradle @@ -66,6 +66,8 @@ dependencies { implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.6.0' implementation 'org.json:json:20210307' testImplementation("org.springframework.boot:spring-boot-starter-test") + compileOnly 'org.projectlombok:lombok:1.18.24' + annotationProcessor 'org.projectlombok:lombok:1.18.24' } wrapper { diff --git a/src/main/java/org/fineract/messagegateway/tenants/domain/Tenant.java b/src/main/java/org/fineract/messagegateway/tenants/domain/Tenant.java index 3b28955c..e3e9a298 100644 --- a/src/main/java/org/fineract/messagegateway/tenants/domain/Tenant.java +++ b/src/main/java/org/fineract/messagegateway/tenants/domain/Tenant.java @@ -22,10 +22,14 @@ import javax.persistence.Entity; import javax.persistence.Table; +import lombok.*; import org.fineract.messagegateway.sms.domain.AbstractPersistableCustom; @Entity @Table(name="m_tenants") +@Getter +@Setter +@NoArgsConstructor(access = AccessLevel.PROTECTED) public class Tenant extends AbstractPersistableCustom { @Column(name = "tenant_id", nullable = false) @@ -37,35 +41,9 @@ public class Tenant extends AbstractPersistableCustom { @Column(name = "description", nullable = true) private String description ; - protected Tenant() { } - public Tenant(final String tenantId, final String tenantAppKey, final String description) { this.tenantId = tenantId ; this.tenantAppKey = tenantAppKey ; this.description = description ; } - - public String getTenantId() { - return tenantId; - } - - public void setTenantId(String tenantId) { - this.tenantId = tenantId; - } - - public String getTenantAppKey() { - return tenantAppKey; - } - - public void setTenantAppKey(String tenantAppKey) { - this.tenantAppKey = tenantAppKey; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } }