2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 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;
23 import com.fasterxml.jackson.annotation.JsonProperty;
24 import com.fasterxml.jackson.annotation.JsonRootName;
25 import org.onap.so.bpmn.servicedecomposition.ShallowCopy;
26 import org.onap.so.bpmn.servicedecomposition.homingobjects.SolutionCandidates;
27 import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoServiceProxy;
28 import java.io.Serializable;
29 import javax.persistence.Id;
30 import org.apache.commons.lang3.builder.EqualsBuilder;
31 import org.apache.commons.lang3.builder.HashCodeBuilder;
33 @JsonRootName("service-proxy")
34 public class ServiceProxy extends SolutionCandidates implements Serializable, ShallowCopy<ServiceProxy> {
35 private static final long serialVersionUID = 1491890223056651430L;
44 @JsonProperty("service-instance")
45 private ServiceInstance serviceInstance;
47 @JsonProperty("model-info-service-proxy")
48 private ModelInfoServiceProxy modelInfoServiceProxy;
51 public String getId() {
55 public void setId(String id) {
60 * Way to identify the type of proxy i.e. "infrastructure", "transport", etc.
62 public String getType() {
67 * Way to identify the type of proxy i.e. "infrastructure", "transport", etc.
69 public void setType(String type) {
73 public ServiceInstance getServiceInstance() {
74 return serviceInstance;
77 public void setServiceInstance(ServiceInstance serviceInstance) {
78 this.serviceInstance = serviceInstance;
81 public ModelInfoServiceProxy getModelInfoServiceProxy() {
82 return modelInfoServiceProxy;
85 public void setModelInfoServiceProxy(ModelInfoServiceProxy modelInfoServiceProxy) {
86 this.modelInfoServiceProxy = modelInfoServiceProxy;
90 public boolean equals(final Object other) {
91 if (!(other instanceof ServiceProxy)) {
94 ServiceProxy castOther = (ServiceProxy) other;
95 return new EqualsBuilder().append(id, castOther.id).isEquals();
99 public int hashCode() {
100 return new HashCodeBuilder().append(id).toHashCode();