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.openecomp.mso.db.catalog.beans;
23 import java.io.Serializable;
24 import java.sql.Timestamp;
26 import com.openpojo.business.annotation.BusinessKey;
28 public class VfModuleCustomization implements Serializable {
31 private String modelCustomizationUuid = null;
33 private String vfModuleModelUuid = null;
34 private String label = null;
35 private Integer minInstances;
36 private Integer maxInstances;
37 private Integer initialCount;
38 private Integer availabilityZoneCount;
39 private String heatEnvironmentArtifactUuid = null;
40 private String volEnvironmentArtifactUuid = null;
41 private Timestamp created = null;
42 private VfModule vfModule;
43 public static final long serialVersionUID = -1322322139926390329L;
45 public VfModuleCustomization() {
49 public String getModelCustomizationUuid() {
50 return this.modelCustomizationUuid;
52 public void setModelCustomizationUuid(String modelCustomizationUuid) {
53 this.modelCustomizationUuid = modelCustomizationUuid;
55 public String getVfModuleModelUuid() {
56 return this.vfModuleModelUuid;
58 public void setVfModuleModelUuid(String vfModuleModelUuid) {
59 this.vfModuleModelUuid = vfModuleModelUuid;
61 public String getHeatEnvironmentArtifactUuid() {
62 return this.heatEnvironmentArtifactUuid;
64 public void setHeatEnvironmentArtifactUuid(String heatEnvironmentArtifactUuid) {
65 this.heatEnvironmentArtifactUuid = heatEnvironmentArtifactUuid;
67 public String getVolEnvironmentArtifactUuid() {
68 return this.volEnvironmentArtifactUuid;
70 public void setVolEnvironmentArtifactUuid(String volEnvironmentArtifactUuid) {
71 this.volEnvironmentArtifactUuid = volEnvironmentArtifactUuid;
74 public Integer getMinInstances() {
75 return this.minInstances;
77 public void setMinInstances(Integer minInstances) {
78 this.minInstances = minInstances;
80 public Integer getMaxInstances() {
81 return this.maxInstances;
83 public void setMaxInstances(Integer maxInstances) {
84 this.maxInstances = maxInstances;
86 public Integer getInitialCount() {
87 return this.initialCount;
89 public void setInitialCount(Integer initialCount) {
90 this.initialCount = initialCount;
92 public Integer getAvailabilityZoneCount() {
93 return this.availabilityZoneCount;
95 public void setAvailabilityZoneCount(Integer availabilityZoneCount) {
96 this.availabilityZoneCount = availabilityZoneCount;
98 public Timestamp getCreated() {
101 public void setCreated(Timestamp created) {
102 this.created = created;
104 public String getLabel() {
107 public void setLabel(String label) {
110 public VfModule getVfModule() {
111 return this.vfModule;
113 public void setVfModule(VfModule vfModule) {
114 this.vfModule = vfModule;
118 public String toString() {
119 return "modelCustomizationUuid=" + this.modelCustomizationUuid +
120 "vfModuleModelUuid=" + this.vfModuleModelUuid +
121 "label=" + this.label +
122 "initalCount=" + this.initialCount +
123 "minInstances=" + this.minInstances +
124 "maxInstances=" + this.maxInstances +
125 "availabilityZoneCount=" + this.availabilityZoneCount +
126 "heatEnvironmentArtifactUuid=" + this.heatEnvironmentArtifactUuid +
127 "volEnvironmentArtifactUuid=" + this.volEnvironmentArtifactUuid +
128 "created=" + this.created;
132 public boolean equals (Object o) {
133 if (!(o instanceof VfModuleCustomization)) {
139 VfModuleCustomization vfmc = (VfModuleCustomization) o;
140 if (vfmc.getModelCustomizationUuid().equals(this.getModelCustomizationUuid()) && vfmc.getVfModuleModelUuid().equals(this.getVfModuleModelUuid())) {
147 public int hashCode () {
148 // hash code does not have to be a unique result - only that two objects that should be treated as equal
149 // return the same value. so this should work.
151 result = (this.modelCustomizationUuid != null ? this.modelCustomizationUuid.hashCode() : 0) + (this.vfModuleModelUuid != null ? this.vfModuleModelUuid.hashCode() : 0);