re base code
[sdc.git] / common-be / src / main / java / org / openecomp / sdc / be / datatypes / elements / Annotation.java
1 package org.openecomp.sdc.be.datatypes.elements;
2
3 import java.util.List;
4 import java.util.Map;
5 import java.util.Objects;
6
7 public class Annotation {
8     private String name;
9     private String type;
10     private String description;
11     private List<PropertyDataDefinition> properties;
12
13     public String getName() {
14         return name;
15     }
16
17     public void setName(String name) {
18         this.name = name;
19     }
20
21     public String getType() {
22         return type;
23     }
24
25     public void setType(String type) {
26         this.type = type;
27     }
28
29     public List<PropertyDataDefinition> getProperties() {
30         return properties;
31     }
32
33     public void setProperties(List<PropertyDataDefinition> properties) {
34         this.properties = properties;
35     }
36
37     public String getDescription() {
38         return description;
39     }
40
41     public void setDescription(String description) {
42         this.description = description;
43     }
44
45     public static void setAnnotationsName(Map<String, Annotation> annotations) {
46         annotations.forEach((name, annotation) -> annotation.setName(name));
47     }
48
49     @Override
50     public boolean equals(Object o) {
51         if (this == o) {
52             return true;
53         }
54         if (o == null || getClass() != o.getClass()) {
55             return false;
56         }
57         Annotation that = (Annotation) o;
58         return Objects.equals(name, that.name);
59     }
60
61     @Override
62     public int hashCode() {
63         return Objects.hash(name);
64     }
65 }