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=========================================================
20 package org.openecomp.mso.db.catalog.beans;
22 import java.io.Serializable;
23 import java.sql.Timestamp;
25 import com.openpojo.business.annotation.BusinessKey;
27 public class ServiceToNetworks implements Serializable {
29 // This maps to SERVICE.SERVICE_NAME_VERSION_ID / Service.serviceNameVersionId in SERVICE/Service table
31 private String serviceModelUuid = null;
32 // This maps to NETWORK_RESOURCE_CUSTOMIZATION.MODEL_CUSTOMIZATION_UUID / NetworkResourceCustomization.ModelCustomizationUuid
34 private String networkModelCustomizationUuid = null;
35 private Timestamp created = null;
36 public static final long serialVersionUID = -1322322139926390329L;
38 public ServiceToNetworks() {
42 public String getServiceModelUuid() {
43 return this.serviceModelUuid;
45 public void setServiceModelUuid(String serviceModelUuid) {
46 this.serviceModelUuid = serviceModelUuid;
49 public String getNetworkModelCustomizationUuid() {
50 return this.networkModelCustomizationUuid;
52 public void setNetworkModelCustomizationUuid(String networkCustomizationUuid) {
53 this.networkModelCustomizationUuid = networkCustomizationUuid;
56 public Timestamp getCreated() {
59 public void setCreated(Timestamp timestamp) {
60 this.created = timestamp;
64 public boolean equals(Object o) {
65 if (!(o instanceof ServiceToNetworks)) {
71 ServiceToNetworks stn = (ServiceToNetworks) o;
72 if (stn.getNetworkModelCustomizationUuid().equals(this.getNetworkModelCustomizationUuid())
73 && stn.getServiceModelUuid().equals(this.getServiceModelUuid())) {
80 public int hashCode() {
82 int code = this.networkModelCustomizationUuid == null ? 0 : this.networkModelCustomizationUuid.hashCode();
83 code += this.serviceModelUuid == null ? 0 : this.serviceModelUuid.hashCode();
89 public String toString() {
90 return "ServiceToNetworks mapping: " + "serviceModelUuid=" + this.serviceModelUuid
91 + ",networkModelCustomizationUuid=" + networkModelCustomizationUuid;