2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (c) 2019, CMCC Technologies Co., Ltd.
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 com.openpojo.business.annotation.BusinessKey;
24 import org.apache.commons.lang3.builder.ToStringBuilder;
25 import uk.co.blackpepper.bowman.annotation.LinkedResource;
26 import javax.persistence.*;
27 import java.io.Serializable;
28 import java.util.Objects;
31 @Table(name = "service_info")
32 public class ServiceInfo implements Serializable {
34 private static final long serialVersionUID = 768026109321305392L;
38 @GeneratedValue(strategy = GenerationType.IDENTITY)
42 @Column(name = "SERVICE_INPUT")
43 private String serviceInput;
45 @Column(name = "SERVICE_PROPERTIES")
46 private String serviceProperties;
48 @ManyToOne(cascade = CascadeType.ALL)
49 @JoinColumn(name = "SERVICE_MODEL_UUID")
50 private Service service;
52 public Integer getId() {
56 public void setId(Integer serviceInfoId) {
57 this.id = serviceInfoId;
60 public String getServiceInput() {
64 public void setServiceInput(String serviceInput) {
65 this.serviceInput = serviceInput;
68 public String getServiceProperties() {
69 return serviceProperties;
72 public void setServiceProperties(String serviceProperties) {
73 this.serviceProperties = serviceProperties;
77 public Service getService() {
81 public void setService(Service service) {
82 this.service = service;
86 public String toString() {
87 return new ToStringBuilder(this).append("id", id).append("serviceProperties", serviceProperties)
88 .append("serviceInput", serviceInput).toString();
92 public boolean equals(Object o) {
95 if (o == null || getClass() != o.getClass())
97 ServiceInfo that = (ServiceInfo) o;
98 return id.equals(that.id);
102 public int hashCode() {
103 return Objects.hash(id);