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.db.catalog.beans;
23 import java.io.Serializable;
25 import javax.persistence.Column;
26 import javax.persistence.Entity;
27 import javax.persistence.GeneratedValue;
28 import javax.persistence.GenerationType;
29 import javax.persistence.Id;
30 import javax.persistence.Table;
32 import org.apache.commons.lang3.builder.EqualsBuilder;
33 import org.apache.commons.lang3.builder.HashCodeBuilder;
34 import org.apache.commons.lang3.builder.ToStringBuilder;
36 import com.openpojo.business.annotation.BusinessKey;
39 @Table(name = "external_service_to_internal_model_mapping")
40 public class ExternalServiceToInternalService implements Serializable {
45 private static final long serialVersionUID = 3825246668050173010L;
49 @GeneratedValue(strategy = GenerationType.IDENTITY)
53 @Column(name = "SERVICE_NAME")
54 private String serviceName;
57 @Column(name = "PRODUCT_FLAVOR")
58 private String productFlavor;
61 @Column(name = "SUBSCRIPTION_SERVICE_TYPE")
62 private String subscriptionServiceType;
65 @Column(name = "SERVICE_MODEL_UUID")
66 private String serviceModelUUID;
69 public boolean equals(final Object other) {
70 if (!(other instanceof ExternalServiceToInternalService)) {
73 ExternalServiceToInternalService castOther = (ExternalServiceToInternalService) other;
74 return new EqualsBuilder().append(serviceName, castOther.serviceName)
75 .append(productFlavor, castOther.productFlavor)
76 .append(subscriptionServiceType, castOther.subscriptionServiceType)
77 .append(serviceModelUUID, castOther.serviceModelUUID).isEquals();
81 public int hashCode() {
82 return new HashCodeBuilder().append(serviceName).append(productFlavor).append(subscriptionServiceType)
83 .append(serviceModelUUID).toHashCode();
87 public String toString() {
88 return new ToStringBuilder(this).append("id", id).append("serviceName", serviceName)
89 .append("productFlavor", productFlavor).append("subscriptionServiceType", subscriptionServiceType)
90 .append("serviceModelUUID", serviceModelUUID).toString();
93 public Integer getId() {
97 public void setId(Integer id) {
101 public String getServiceName() {
105 public void setServiceName(String serviceName) {
106 this.serviceName = serviceName;
109 public String getProductFlavor() {
110 return productFlavor;
113 public void setProductFlavor(String productFlavor) {
114 this.productFlavor = productFlavor;
117 public String getSubscriptionServiceType() {
118 return subscriptionServiceType;
121 public void setSubscriptionServiceType(String subscriptionServiceType) {
122 this.subscriptionServiceType = subscriptionServiceType;
125 public String getServiceModelUUID() {
126 return serviceModelUUID;
129 public void setServiceModelUUID(String serviceModelUUID) {
130 this.serviceModelUUID = serviceModelUUID;