• 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

93.33
/customer-management/src/main/java/org/fiware/tmforum/customermanagement/domain/Customer.java
1
package org.fiware.tmforum.customermanagement.domain;
2

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

17
import java.net.URI;
18
import java.util.List;
19

20
@EqualsAndHashCode(callSuper = true)
×
21
@MappingEnabled(entityType = Customer.TYPE_CUSTOMER)
22
public class Customer extends EntityWithId {
23

24
    public static final String TYPE_CUSTOMER = "customer";
25

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

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

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

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

42
    @Getter(onMethod = @__({@AttributeGetter(value = AttributeType.RELATIONSHIP_LIST, targetName = "account", embedProperty = true)}))
1✔
43
    @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.RELATIONSHIP_LIST, targetName = "account", targetClass = AccountRef.class, fromProperties = true)}))
1✔
44
    private List<AccountRef> account;
45

46
    @Getter(onMethod = @__({@AttributeGetter(value = AttributeType.RELATIONSHIP_LIST, targetName = "agreement", embedProperty = true)}))
1✔
47
    @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.RELATIONSHIP_LIST, targetName = "agreement", targetClass = AgreementRef.class, fromProperties = true)}))
1✔
48
    private List<AgreementRef> agreement;
49

50
    @Getter(onMethod = @__({@AttributeGetter(value = AttributeType.PROPERTY_LIST, targetName = "characteristics")}))
1✔
51
    @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.PROPERTY_LIST, targetName = "characteristics", targetClass = Characteristic.class)}))
1✔
52
    private List<Characteristic> characteristic;
53

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

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

62
    @Getter(onMethod = @__({@AttributeGetter(value = AttributeType.RELATIONSHIP, targetName = "engagedParty")}))
1✔
63
    @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.RELATIONSHIP, targetName = "engagedParty", targetClass = RelatedParty.class)}))
1✔
64
    private RelatedParty engagedParty;
65

66
    @Getter(onMethod = @__({@AttributeGetter(value = AttributeType.RELATIONSHIP_LIST, targetName = "paymentMethod", embedProperty = true)}))
1✔
67
    @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.RELATIONSHIP_LIST, targetName = "paymentMethod", targetClass = PaymentMethodRef.class, fromProperties = true)}))
1✔
68
    private List<PaymentMethodRef> paymentMethod;
69

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

74
    @Getter(onMethod = @__({@AttributeGetter(value = AttributeType.PROPERTY, targetName = "validFor")}))
1✔
75
    @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.PROPERTY, targetName = "validFor", targetClass = TimePeriod.class)}))
1✔
76
    private TimePeriod validFor;
77

78
    public Customer(String id) {
79
        super(TYPE_CUSTOMER, id);
1✔
80
    }
1✔
81

82
    @Override
83
    public String getEntityState() {
84
        return status;
×
85
    }
86
}
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