re base code
[sdc.git] / catalog-model / src / main / java / org / openecomp / sdc / be / model / AnnotationTypeDefinition.java
1 package org.openecomp.sdc.be.model;
2
3 import org.openecomp.sdc.be.datatypes.elements.AnnotationTypeDataDefinition;
4 import org.openecomp.sdc.be.model.utils.TypeCompareUtils;
5
6 import java.util.List;
7 import java.util.Objects;
8
9 public class AnnotationTypeDefinition extends AnnotationTypeDataDefinition {
10
11
12     public AnnotationTypeDefinition() {
13         super();
14     }
15
16     public AnnotationTypeDefinition(AnnotationTypeDataDefinition annotationTypeDataDefinition) {
17         super(annotationTypeDataDefinition);
18     }
19
20     protected List<PropertyDefinition> properties;
21
22     public List<PropertyDefinition> getProperties() {
23         return properties;
24     }
25
26     public void setProperties(List<PropertyDefinition> properties) {
27         this.properties = properties;
28     }
29
30     /**
31      * This method compares definition properties and ignores products such as
32      * actual graph ids that were already assigned
33      */
34     public boolean isSameDefinition(AnnotationTypeDefinition other) {
35         if (this == other) return true;
36         if (other == null) return false;
37
38         return Objects.equals(type, other.type) &&
39                Objects.equals(description, other.description) &&
40                TypeCompareUtils.propertiesEquals(properties, other.properties);
41     }
42 }