• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

wistefan / tmforum-api / #49

29 Sep 2023 06:20AM UTC coverage: 67.488% (-4.3%) from 71.815%
#49

push

web-flow
Notifications (#23)

* Squashed commits

* Added cache invalidation for entity deletion

* Updated error message

618 of 618 new or added lines in 86 files covered. (100.0%)

2794 of 4140 relevant lines covered (67.49%)

0.67 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

97.06
/party-catalog/src/main/java/org/fiware/tmforum/party/domain/individual/Individual.java
1
package org.fiware.tmforum.party.domain.individual;
2

3
import lombok.EqualsAndHashCode;
4
import lombok.Getter;
5
import lombok.Setter;
6
import org.fiware.tmforum.common.domain.EntityWithId;
7
import io.github.wistefan.mapping.annotations.AttributeGetter;
8
import io.github.wistefan.mapping.annotations.AttributeSetter;
9
import io.github.wistefan.mapping.annotations.AttributeType;
10
import io.github.wistefan.mapping.annotations.MappingEnabled;
11
import org.fiware.tmforum.party.domain.Characteristic;
12
import org.fiware.tmforum.common.domain.ContactMedium;
13
import org.fiware.tmforum.party.domain.ExternalReference;
14
import org.fiware.tmforum.party.domain.PartyCreditProfile;
15
import org.fiware.tmforum.common.domain.RelatedParty;
16
import org.fiware.tmforum.common.domain.TaxExemptionCertificate;
17

18
import java.net.URI;
19
import java.time.Instant;
20
import java.util.List;
21

22
@EqualsAndHashCode(callSuper = true)
×
23
@MappingEnabled(entityType = Individual.TYPE_INDIVIDUAL)
24
public class Individual extends EntityWithId {
25

26
        public static final String TYPE_INDIVIDUAL = "individual";
27

28
        @Getter(onMethod = @__({@AttributeGetter(value = AttributeType.PROPERTY, targetName = "href")}))
1✔
29
        @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.PROPERTY, targetName = "href")}))
1✔
30
        private URI href;
31

32
        @Getter(onMethod = @__({@AttributeGetter(value = AttributeType.PROPERTY, targetName = "aristocraticTitle")}))
1✔
33
        @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.PROPERTY, targetName = "aristocraticTitle")}))
1✔
34
        private String aristocraticTitle;
35

36
        @Getter(onMethod = @__({@AttributeGetter(value = AttributeType.PROPERTY, targetName = "birthDate")}))
1✔
37
        @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.PROPERTY, targetName = "birthDate")}))
1✔
38
        private Instant birthDate;
39

40
        @Getter(onMethod = @__({@AttributeGetter(value = AttributeType.PROPERTY, targetName = "deathDate")}))
1✔
41
        @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.PROPERTY, targetName = "deathDate")}))
1✔
42
        private Instant deathDate;
43

44
        @Getter(onMethod = @__({@AttributeGetter(value = AttributeType.PROPERTY, targetName = "countryOfBirth")}))
1✔
45
        @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.PROPERTY, targetName = "countryOfBirth")}))
1✔
46
        private String countryOfBirth;
47

48
        @Getter(onMethod = @__({@AttributeGetter(value = AttributeType.PROPERTY, targetName = "familyName")}))
1✔
49
        @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.PROPERTY, targetName = "familyName")}))
1✔
50
        private String familyName;
51

52
        @Getter(onMethod = @__({@AttributeGetter(value = AttributeType.PROPERTY, targetName = "familyNamePrefix")}))
1✔
53
        @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.PROPERTY, targetName = "familyNamePrefix")}))
1✔
54
        private String familyNamePrefix;
55

56
        @Getter(onMethod = @__({@AttributeGetter(value = AttributeType.PROPERTY, targetName = "formattedName")}))
1✔
57
        @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.PROPERTY, targetName = "formattedName")}))
1✔
58
        private String formattedName;
59

60
        @Getter(onMethod = @__({@AttributeGetter(value = AttributeType.PROPERTY, targetName = "fullName")}))
1✔
61
        @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.PROPERTY, targetName = "fullName")}))
1✔
62
        private String fullName;
63

64
        @Getter(onMethod = @__({@AttributeGetter(value = AttributeType.PROPERTY, targetName = "gender")}))
1✔
65
        @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.PROPERTY, targetName = "gender")}))
1✔
66
        private String gender;
67

68
        @Getter(onMethod = @__({@AttributeGetter(value = AttributeType.PROPERTY, targetName = "generation")}))
1✔
69
        @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.PROPERTY, targetName = "generation")}))
1✔
70
        private String generation;
71

72
        @Getter(onMethod = @__({@AttributeGetter(value = AttributeType.PROPERTY, targetName = "givenName")}))
1✔
73
        @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.PROPERTY, targetName = "givenName")}))
1✔
74
        private String givenName;
75

76
        @Getter(onMethod = @__({@AttributeGetter(value = AttributeType.PROPERTY, targetName = "legalName")}))
1✔
77
        @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.PROPERTY, targetName = "legalName")}))
1✔
78
        private String legalName;
79

80
        // property renamed to not clash with the well known ngsi-ld `location`
81
        @Getter(onMethod = @__({@AttributeGetter(value = AttributeType.PROPERTY, targetName = "individualLocation")}))
1✔
82
        @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.PROPERTY, targetName = "individualLocation")}))
1✔
83
        private String location;
84

85
        @Getter(onMethod = @__({@AttributeGetter(value = AttributeType.PROPERTY, targetName = "maritalStatus")}))
1✔
86
        @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.PROPERTY, targetName = "maritalStatus")}))
1✔
87
        private String maritalStatus;
88

89
        @Getter(onMethod = @__({@AttributeGetter(value = AttributeType.PROPERTY, targetName = "middleName")}))
1✔
90
        @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.PROPERTY, targetName = "middleName")}))
1✔
91
        private String middleName;
92

93
        @Getter(onMethod = @__({@AttributeGetter(value = AttributeType.PROPERTY, targetName = "nationality")}))
1✔
94
        @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.PROPERTY, targetName = "nationality")}))
1✔
95
        private String nationality;
96

97
        @Getter(onMethod = @__({@AttributeGetter(value = AttributeType.PROPERTY, targetName = "placeOfBirth")}))
1✔
98
        @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.PROPERTY, targetName = "placeOfBirth")}))
1✔
99
        private String placeOfBirth;
100

101
        @Getter(onMethod = @__({@AttributeGetter(value = AttributeType.PROPERTY, targetName = "preferredGivenName")}))
1✔
102
        @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.PROPERTY, targetName = "preferredGivenName")}))
1✔
103
        private String preferredGivenName;
104

105
        @Getter(onMethod = @__({@AttributeGetter(value = AttributeType.PROPERTY, targetName = "title")}))
1✔
106
        @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.PROPERTY, targetName = "title")}))
1✔
107
        private String title;
108

109
        @Getter(onMethod = @__({@AttributeGetter(value = AttributeType.PROPERTY_LIST, targetName = "contactMedium")}))
1✔
110
        @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.PROPERTY_LIST, targetName = "contactMedium", targetClass = ContactMedium.class)}))
1✔
111
        private List<ContactMedium> contactMedium;
112

113
        @Getter(onMethod = @__({@AttributeGetter(value = AttributeType.PROPERTY_LIST, targetName = "creditRating")}))
1✔
114
        @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.PROPERTY_LIST, targetName = "creditRating", targetClass = PartyCreditProfile.class)}))
1✔
115
        private List<PartyCreditProfile> creditRating;
116

117
        @Getter(onMethod = @__({@AttributeGetter(value = AttributeType.PROPERTY_LIST, targetName = "disability")}))
1✔
118
        @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.PROPERTY_LIST, targetName = "disability", targetClass = Disability.class)}))
1✔
119
        private List<Disability> disability;
120

121
        @Getter(onMethod = @__({@AttributeGetter(value = AttributeType.PROPERTY_LIST, targetName = "externalReference")}))
1✔
122
        @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.PROPERTY_LIST, targetName = "externalReference", targetClass = ExternalReference.class)}))
1✔
123
        private List<ExternalReference> externalReference;
124

125
        @Getter(onMethod = @__({@AttributeGetter(value = AttributeType.PROPERTY_LIST, targetName = "individualIdentification")}))
1✔
126
        @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.PROPERTY_LIST, targetName = "individualIdentification", targetClass = IndividualIdentification.class)}))
1✔
127
        private List<IndividualIdentification> individualIdentification;
128

129
        @Getter(onMethod = @__({@AttributeGetter(value = AttributeType.PROPERTY_LIST, targetName = "languageAbility")}))
1✔
130
        @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.PROPERTY_LIST, targetName = "languageAbility", targetClass = LanguageAbility.class)}))
1✔
131
        private List<LanguageAbility> languageAbility;
132

133
        @Getter(onMethod = @__({@AttributeGetter(value = AttributeType.PROPERTY_LIST, targetName = "otherName")}))
1✔
134
        @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.PROPERTY_LIST, targetName = "otherName", targetClass = OtherIndividualName.class)}))
1✔
135
        private List<OtherIndividualName> otherName;
136

137
        @Getter(onMethod = @__({@AttributeGetter(value = AttributeType.PROPERTY_LIST, targetName = "partyCharacteristic")}))
1✔
138
        @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.PROPERTY_LIST, targetName = "partyCharacteristic", targetClass = Characteristic.class)}))
1✔
139
        private List<Characteristic> partyCharacteristic;
140

141
        @Getter(onMethod = @__({@AttributeGetter(value = AttributeType.RELATIONSHIP_LIST, targetName = "relatedParty")}))
1✔
142
        @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.RELATIONSHIP_LIST, targetName = "relatedParty", targetClass = RelatedParty.class, fromProperties = true)}))
1✔
143
        private List<RelatedParty> relatedParty;
144

145
        @Getter(onMethod = @__({@AttributeGetter(value = AttributeType.PROPERTY_LIST, targetName = "skill")}))
1✔
146
        @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.PROPERTY_LIST, targetName = "skill", targetClass = Skill.class)}))
1✔
147
        private List<Skill> skill;
148

149
        @Getter(onMethod = @__({@AttributeGetter(value = AttributeType.PROPERTY, targetName = "status")}))
1✔
150
        @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.PROPERTY, targetName = "status")}))
1✔
151
        private IndividualState status;
152

153
        @Getter(onMethod = @__({@AttributeGetter(value = AttributeType.PROPERTY_LIST, targetName = "taxExemptionCertificate")}))
1✔
154
        @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.PROPERTY_LIST, targetName = "taxExemptionCertificate", targetClass = TaxExemptionCertificate.class)}))
1✔
155
        private List<TaxExemptionCertificate> taxExemptionCertificate;
156

157
        public Individual(String id) {
158
                super(TYPE_INDIVIDUAL, id);
1✔
159
        }
1✔
160

161
        @Override
162
        public String getEntityState() {
163
                return status != null ? status.getValue() : null;
×
164
        }
165
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc