Browse Source

commit modif

placidenduwayo 2 years ago
parent
commit
4c2daff279

+ 6
- 11
address-microservice/src/main/java/fr/natan/addressmicroservice/entity/Address.java View File

@@ -1,10 +1,5 @@
1 1
 package fr.natan.addressmicroservice.entity;
2 2
 
3
-import lombok.AllArgsConstructor;
4
-import lombok.Data;
5
-import lombok.NoArgsConstructor;
6
-import lombok.ToString;
7
-
8 3
 import javax.persistence.Entity;
9 4
 import javax.persistence.GeneratedValue;
10 5
 import javax.persistence.GenerationType;
@@ -19,7 +14,7 @@ public class Address {
19 14
     private String streetName;
20 15
     private String pb;
21 16
     private String city;
22
-    private String residenceCountry;
17
+    private String country;
23 18
 
24 19
     public Address() {
25 20
     }
@@ -31,7 +26,7 @@ public class Address {
31 26
         this.streetName = streetName;
32 27
         this.pb = pb;
33 28
         this.city = city;
34
-        this.residenceCountry = residenceCountry;
29
+        this.country = residenceCountry;
35 30
     }
36 31
 
37 32
     public Long getAddressID() {
@@ -74,11 +69,11 @@ public class Address {
74 69
         this.city = city;
75 70
     }
76 71
 
77
-    public String getResidenceCountry() {
78
-        return residenceCountry;
72
+    public String getCountry() {
73
+        return country;
79 74
     }
80 75
 
81
-    public void setResidenceCountry(String residenceCountry) {
82
-        this.residenceCountry = residenceCountry;
76
+    public void setCountry(String country) {
77
+        this.country = country;
83 78
     }
84 79
 }

+ 2
- 2
address-microservice/src/main/java/fr/natan/addressmicroservice/service/service/AddressService.java View File

@@ -24,7 +24,7 @@ public class AddressService  implements AddressContract {
24 24
         address.setStreetName(address.getStreetName().strip());
25 25
         address.setPb(address.getPb().strip());
26 26
         address.setCity(address.getCity().strip());
27
-        address.setResidenceCountry(address.getResidenceCountry().strip());
27
+        address.setCountry(address.getCountry().strip());
28 28
         return address;
29 29
     }
30 30
 
@@ -34,7 +34,7 @@ public class AddressService  implements AddressContract {
34 34
                 || address.getStreetName().isEmpty()
35 35
                 || address.getPb().isEmpty()
36 36
                 || address.getCity().isEmpty()
37
-                || address.getResidenceCountry().isEmpty()
37
+                || address.getCountry().isEmpty()
38 38
         ){
39 39
             isInvalid=true;
40 40
         }

Powered by TurnKey Linux.