2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.onap.so.bpmn.servicedecomposition.bbobjects;
24 import com.fasterxml.jackson.annotation.JsonProperty;
25 import org.apache.commons.lang3.builder.HashCodeBuilder;
26 import org.onap.so.bpmn.servicedecomposition.ShallowCopy;
27 import java.io.Serializable;
28 import java.util.ArrayList;
29 import java.util.List;
30 import javax.persistence.Id;
31 import org.apache.commons.lang3.builder.EqualsBuilder;
34 public class PServer implements Serializable, ShallowCopy<PServer> {
36 private static final long serialVersionUID = 1378547515775540874L;
39 @JsonProperty("pserver-id")
40 private String pserverId;
41 @JsonProperty("hostname")
42 private String hostname;
43 @JsonProperty("physical-links")
44 private List<PhysicalLink> physicalLinks = new ArrayList<PhysicalLink>(); // TODO techincally there is a pInterface
45 // between (pserver <--> physical-link)
46 // but dont really need that pojo
48 public String getPserverId() {
52 public void setPserverId(String pserverId) {
53 this.pserverId = pserverId;
56 public String getHostname() {
60 public void setHostname(String hostname) {
61 this.hostname = hostname;
64 public List<PhysicalLink> getPhysicalLinks() {
69 public boolean equals(final Object other) {
70 if (!(other instanceof PServer)) {
73 PServer castOther = (PServer) other;
74 return new EqualsBuilder().append(pserverId, castOther.pserverId).isEquals();
78 public int hashCode() {
79 return new HashCodeBuilder().append(pserverId).toHashCode();