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;
28 import java.io.Serializable;
29 import java.util.ArrayList;
30 import java.util.List;
32 import javax.persistence.Id;
34 import org.apache.commons.lang3.builder.EqualsBuilder;
37 public class PServer implements Serializable, ShallowCopy<PServer> {
39 private static final long serialVersionUID = 1378547515775540874L;
42 @JsonProperty("pserver-id")
43 private String pserverId;
44 @JsonProperty("hostname")
45 private String hostname;
46 @JsonProperty("physical-links")
47 private List<PhysicalLink> physicalLinks = new ArrayList<PhysicalLink>(); //TODO techincally there is a pInterface between (pserver <--> physical-link) but dont really need that pojo
49 public String getPserverId(){
53 public void setPserverId(String pserverId){
54 this.pserverId = pserverId;
57 public String getHostname(){
61 public void setHostname(String hostname){
62 this.hostname = hostname;
65 public List<PhysicalLink> getPhysicalLinks(){
70 public boolean equals(final Object other){
71 if(!(other instanceof PServer)){
74 PServer castOther = (PServer) other;
75 return new EqualsBuilder().append(pserverId, castOther.pserverId).isEquals();
79 public int hashCode(){
80 return new HashCodeBuilder().append(pserverId).toHashCode();