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;
24 import javax.persistence.Column;
25 import javax.persistence.Entity;
26 import javax.persistence.GeneratedValue;
27 import javax.persistence.GenerationType;
28 import javax.persistence.Id;
29 import javax.persistence.Table;
30 import org.apache.commons.lang3.builder.EqualsBuilder;
31 import org.apache.commons.lang3.builder.HashCodeBuilder;
32 import org.apache.commons.lang3.builder.ToStringBuilder;
33 import com.openpojo.business.annotation.BusinessKey;
34 import uk.co.blackpepper.bowman.annotation.RemoteResource;
37 @RemoteResource("/externalServiceToInternalService")
38 @Table(name = "external_service_to_internal_model_mapping")
39 public class ExternalServiceToInternalService implements Serializable {
44 private static final long serialVersionUID = 3825246668050173010L;
48 @GeneratedValue(strategy = GenerationType.IDENTITY)
52 @Column(name = "SERVICE_NAME")
53 private String serviceName;
56 @Column(name = "PRODUCT_FLAVOR")
57 private String productFlavor;
60 @Column(name = "SUBSCRIPTION_SERVICE_TYPE")
61 private String subscriptionServiceType;
64 @Column(name = "SERVICE_MODEL_UUID")
65 private String serviceModelUUID;
68 public boolean equals(final Object other) {
69 if (!(other instanceof ExternalServiceToInternalService)) {
72 ExternalServiceToInternalService castOther = (ExternalServiceToInternalService) other;
73 return new EqualsBuilder().append(serviceName, castOther.serviceName)
74 .append(productFlavor, castOther.productFlavor)
75 .append(subscriptionServiceType, castOther.subscriptionServiceType)
76 .append(serviceModelUUID, castOther.serviceModelUUID).isEquals();
80 public int hashCode() {
81 return new HashCodeBuilder().append(serviceName).append(productFlavor).append(subscriptionServiceType)
82 .append(serviceModelUUID).toHashCode();
86 public String toString() {
87 return new ToStringBuilder(this).append("id", id).append("serviceName", serviceName)
88 .append("productFlavor", productFlavor).append("subscriptionServiceType", subscriptionServiceType)
89 .append("serviceModelUUID", serviceModelUUID).toString();
92 public Integer getId() {
96 public void setId(Integer id) {
100 public String getServiceName() {
104 public void setServiceName(String serviceName) {
105 this.serviceName = serviceName;
108 public String getProductFlavor() {
109 return productFlavor;
112 public void setProductFlavor(String productFlavor) {
113 this.productFlavor = productFlavor;
116 public String getSubscriptionServiceType() {
117 return subscriptionServiceType;
120 public void setSubscriptionServiceType(String subscriptionServiceType) {
121 this.subscriptionServiceType = subscriptionServiceType;
124 public String getServiceModelUUID() {
125 return serviceModelUUID;
128 public void setServiceModelUUID(String serviceModelUUID) {
129 this.serviceModelUUID = serviceModelUUID;