• 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

95.24
/party-catalog/src/main/java/org/fiware/tmforum/party/domain/organization/Organization.java
1
package org.fiware.tmforum.party.domain.organization;
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
import org.fiware.tmforum.common.domain.TimePeriod;
18

19
import java.net.URI;
20
import java.util.List;
21

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

26
        public static final String TYPE_ORGANIZATION = "organization";
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 = "isHeadOffice") }))
1✔
33
        @Setter(onMethod = @__({ @AttributeSetter(value = AttributeType.PROPERTY, targetName = "isHeadOffice") }))
1✔
34
        private Boolean isHeadOffice;
35

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

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

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

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

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

56
        @Getter(onMethod = @__({ @AttributeGetter(value = AttributeType.PROPERTY_LIST, targetName = "contactMedium") }))
1✔
57
        @Setter(onMethod = @__({
1✔
58
                        @AttributeSetter(value = AttributeType.PROPERTY_LIST, targetName = "contactMedium", targetClass = ContactMedium.class) }))
59
        private List<ContactMedium> contactMedium;
60

61
        @Getter(onMethod = @__({ @AttributeGetter(value = AttributeType.PROPERTY_LIST, targetName = "creditRating") }))
1✔
62
        @Setter(onMethod = @__({
1✔
63
                        @AttributeSetter(value = AttributeType.PROPERTY_LIST, targetName = "creditRating", targetClass = PartyCreditProfile.class) }))
64
        private List<PartyCreditProfile> creditRating;
65

66
        @Getter(onMethod = @__({ @AttributeGetter(value = AttributeType.PROPERTY, targetName = "existsDuring") }))
1✔
67
        @Setter(onMethod = @__({ @AttributeSetter(value = AttributeType.PROPERTY, targetName = "existsDuring") }))
1✔
68
        private TimePeriod existsDuring;
69

70
        @Getter(onMethod = @__({ @AttributeGetter(value = AttributeType.PROPERTY_LIST, targetName = "externalReference") }))
1✔
71
        @Setter(onMethod = @__({
1✔
72
                        @AttributeSetter(value = AttributeType.PROPERTY_LIST, targetName = "externalReference", targetClass = ExternalReference.class) }))
73
        private List<ExternalReference> externalReference;
74

75
        @Getter(onMethod = @__({
1✔
76
                        @AttributeGetter(value = AttributeType.RELATIONSHIP_LIST, targetName = "organizationChildRelationship") }))
77
        @Setter(onMethod = @__({
1✔
78
                        @AttributeSetter(value = AttributeType.RELATIONSHIP_LIST, targetName = "organizationChildRelationship", targetClass = OrganizationChildRelationship.class) }))
79
        private List<OrganizationChildRelationship> organizationChildRelationship;
80

81
        @Getter(onMethod = @__({
1✔
82
                        @AttributeGetter(value = AttributeType.RELATIONSHIP, targetName = "organizationParentRelationship") }))
83
        @Setter(onMethod = @__({
1✔
84
                        @AttributeSetter(value = AttributeType.RELATIONSHIP, targetName = "organizationParentRelationship", targetClass = OrganizationParentRelationship.class) }))
85
        private OrganizationParentRelationship organizationParentRelationship;
86

87
        @Getter(onMethod = @__({
1✔
88
                        @AttributeGetter(value = AttributeType.PROPERTY_LIST, targetName = "organizationIdentification") }))
89
        @Setter(onMethod = @__({
1✔
90
                        @AttributeSetter(value = AttributeType.PROPERTY_LIST, targetName = "organizationIdentification", targetClass = OrganizationIdentification.class) }))
91
        private List<OrganizationIdentification> organizationIdentification;
92

93
        @Getter(onMethod = @__({ @AttributeGetter(value = AttributeType.PROPERTY_LIST, targetName = "otherName") }))
1✔
94
        @Setter(onMethod = @__({
1✔
95
                        @AttributeSetter(value = AttributeType.PROPERTY_LIST, targetName = "otherName", targetClass = OtherOrganizationName.class) }))
96
        private List<OtherOrganizationName> otherName;
97

98
        @Getter(onMethod = @__({
1✔
99
                        @AttributeGetter(value = AttributeType.PROPERTY_LIST, targetName = "partyCharacteristic") }))
100
        @Setter(onMethod = @__({
1✔
101
                        @AttributeSetter(value = AttributeType.PROPERTY_LIST, targetName = "partyCharacteristic", targetClass = Characteristic.class) }))
102
        private List<Characteristic> partyCharacteristic;
103

104
        @Getter(onMethod = @__({ @AttributeGetter(value = AttributeType.RELATIONSHIP_LIST, targetName = "relatedParty") }))
1✔
105
        @Setter(onMethod = @__({
1✔
106
                        @AttributeSetter(value = AttributeType.RELATIONSHIP_LIST, targetName = "relatedParty", targetClass = RelatedParty.class, fromProperties = true) }))
107
        private List<RelatedParty> relatedParty;
108

109
        @Getter(onMethod = @__({ @AttributeGetter(value = AttributeType.PROPERTY, targetName = "status") }))
1✔
110
        @Setter(onMethod = @__({ @AttributeSetter(value = AttributeType.PROPERTY, targetName = "status") }))
1✔
111
        private OrganizationState status;
112

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

119
        public Organization(String id) {
120
                super(TYPE_ORGANIZATION, id);
1✔
121
        }
1✔
122

123
        @Override
124
        public String getEntityState() {
125
                return status != null ? status.getValue() : null;
×
126
        }
127
}
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