2 * Copyright © 2016-2017 European Support Limited
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package org.openecomp.core.zusammen.plugin.dao.types;
19 import com.amdocs.zusammen.datatypes.Id;
20 import com.amdocs.zusammen.datatypes.Namespace;
21 import com.amdocs.zusammen.datatypes.item.Info;
22 import com.amdocs.zusammen.datatypes.item.Relation;
24 import java.nio.ByteBuffer;
25 import java.util.Collection;
26 import java.util.Collections;
29 public class ElementEntity {
32 private Namespace namespace;
34 private Collection<Relation> relations = Collections.emptyList();
35 private ByteBuffer data;
36 private ByteBuffer searchableData;
37 private ByteBuffer visualization;
38 private Set<Id> subElementIds = Collections.emptySet();
40 public ElementEntity(Id id) {
44 public Id getParentId() {
48 public void setParentId(Id parentId) {
49 this.parentId = parentId;
56 public void setId(Id id) {
60 public Namespace getNamespace() {
64 public void setNamespace(Namespace namespace) {
65 this.namespace = namespace;
68 public Info getInfo() {
72 public void setInfo(Info info) {
76 public Collection<Relation> getRelations() {
80 public void setRelations(Collection<Relation> relations) {
81 this.relations = relations;
84 public ByteBuffer getData() {
88 public void setData(ByteBuffer data) {
92 public ByteBuffer getSearchableData() {
93 return searchableData;
96 public void setSearchableData(ByteBuffer searchableData) {
97 this.searchableData = searchableData;
100 public ByteBuffer getVisualization() {
101 return visualization;
104 public void setVisualization(ByteBuffer visualization) {
105 this.visualization = visualization;
108 public Set<Id> getSubElementIds() {
109 return subElementIds;
112 public void setSubElementIds(Set<Id> subElementIds) {
113 this.subElementIds = subElementIds;
117 public boolean equals(Object o) {
121 if (o == null || getClass() != o.getClass()) {
125 ElementEntity that = (ElementEntity) o;
127 return id.equals(that.id);
131 public int hashCode() {
132 return id.hashCode();