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 java.io.Serializable;
24 import java.util.ArrayList;
25 import java.util.List;
27 import javax.persistence.Id;
29 import com.fasterxml.jackson.annotation.JsonProperty;
30 import com.fasterxml.jackson.annotation.JsonRootName;
31 import org.apache.commons.lang3.builder.EqualsBuilder;
32 import org.apache.commons.lang3.builder.HashCodeBuilder;
33 import org.onap.so.bpmn.servicedecomposition.ShallowCopy;
35 @JsonRootName("customer")
36 public class Customer implements Serializable, ShallowCopy<Customer> {
38 private static final long serialVersionUID = 2006599484099139618L;
41 @JsonProperty("global-customer-id")
42 private String globalCustomerId;
43 @JsonProperty("subscriber-name")
44 private String subscriberName;
45 @JsonProperty("subscriber-type")
46 private String subscriberType;
47 @JsonProperty("subscriber-common-site-id")
48 private String subscriberCommonSiteId;
49 @JsonProperty("service-subscription")
50 private ServiceSubscription serviceSubscription;
51 @JsonProperty("vpn-bindings")
52 private List<VpnBinding> vpnBindings = new ArrayList<>();
54 public String getGlobalCustomerId() {
55 return globalCustomerId;
57 public void setGlobalCustomerId(String globalCustomerId) {
58 this.globalCustomerId = globalCustomerId;
60 public String getSubscriberName() {
61 return subscriberName;
63 public void setSubscriberName(String subscriberName) {
64 this.subscriberName = subscriberName;
66 public String getSubscriberType() {
67 return subscriberType;
69 public void setSubscriberType(String subscriberType) {
70 this.subscriberType = subscriberType;
72 public String getSubscriberCommonSiteId() {
73 return subscriberCommonSiteId;
75 public void setSubscriberCommonSiteId(String subscriberCommonSiteId) {
76 this.subscriberCommonSiteId = subscriberCommonSiteId;
78 public ServiceSubscription getServiceSubscription() {
79 return serviceSubscription;
81 public void setServiceSubscription(ServiceSubscription serviceSubscription) {
82 this.serviceSubscription = serviceSubscription;
84 public List<VpnBinding> getVpnBindings() {
88 public boolean equals(final Object other) {
89 if (!(other instanceof Customer)) {
92 Customer castOther = (Customer) other;
93 return new EqualsBuilder().append(globalCustomerId, castOther.globalCustomerId).isEquals();
96 public int hashCode() {
97 return new HashCodeBuilder().append(globalCustomerId).toHashCode();