• 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

90.0
/resource-function-activation/src/main/java/org/fiware/tmforum/resourcefunction/domain/Scale.java
1
package org.fiware.tmforum.resourcefunction.domain;
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.resource.ScheduleRef;
12

13
import java.net.URI;
14
import java.util.List;
15

16
@EqualsAndHashCode(callSuper = true)
×
17
@MappingEnabled(entityType = Scale.TYPE_SCALE)
18
public class Scale extends EntityWithId {
19

20
    public static final String TYPE_SCALE = "scale";
21

22
    @Getter(onMethod = @__({@AttributeGetter(value = AttributeType.PROPERTY, targetName = "href")}))
1✔
23
    @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.PROPERTY, targetName = "href")}))
1✔
24
    private URI href;
25

26
    @Getter(onMethod = @__({@AttributeGetter(value = AttributeType.PROPERTY, targetName = "aspectId")}))
1✔
27
    @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.PROPERTY, targetName = "aspectId")}))
1✔
28
    private String aspectId;
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 = "numberOfSteps")}))
1✔
35
    @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.PROPERTY, targetName = "numberOfSteps")}))
1✔
36
    private Integer numberOfSteps;
37

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

42
    @Getter(onMethod = @__({@AttributeGetter(value = AttributeType.RELATIONSHIP, targetName = "resourceFunction")}))
1✔
43
    @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.RELATIONSHIP, targetName = "resourceFunction", targetClass = ResourceFunctionRef.class)}))
1✔
44
    private ResourceFunctionRef resourceFunction;
45

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

50
    @Getter(onMethod = @__({@AttributeGetter(value = AttributeType.PROPERTY, targetName = "state")}))
1✔
51
    @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.PROPERTY, targetName = "state")}))
1✔
52
    private TaskState state;
53

54
    public Scale(String id) {
55
        super(TYPE_SCALE, id);
1✔
56
    }
1✔
57

58
    @Override
59
    public String getEntityState() {
60
        return state != null ? state.getValue() : null;
×
61
    }
62
}
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

© 2025 Coveralls, Inc