Merge "Reorder modifiers"
[so.git] / mso-catalog-db / src / main / java / org / openecomp / mso / db / catalog / beans / VfModuleCustomization.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
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
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
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=========================================================
19  */
20
21 package org.openecomp.mso.db.catalog.beans;
22
23 import java.io.Serializable;
24 import java.sql.Timestamp;
25
26 import com.openpojo.business.annotation.BusinessKey;
27
28 public class VfModuleCustomization implements Serializable {
29         
30         @BusinessKey
31         private String modelCustomizationUuid = null;
32         @BusinessKey
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;
44
45         public VfModuleCustomization() {
46                 super();
47         }
48         
49         public String getModelCustomizationUuid() {
50                 return this.modelCustomizationUuid;
51         }
52         public void setModelCustomizationUuid(String modelCustomizationUuid) {
53                 this.modelCustomizationUuid = modelCustomizationUuid;
54         }
55         public String getVfModuleModelUuid() {
56                 return this.vfModuleModelUuid;
57         }
58         public void setVfModuleModelUuid(String vfModuleModelUuid) {
59                 this.vfModuleModelUuid = vfModuleModelUuid;
60         }
61         public String getHeatEnvironmentArtifactUuid() {
62                 return this.heatEnvironmentArtifactUuid;
63         }
64         public void setHeatEnvironmentArtifactUuid(String heatEnvironmentArtifactUuid) {
65                 this.heatEnvironmentArtifactUuid = heatEnvironmentArtifactUuid;
66         }
67         public String getVolEnvironmentArtifactUuid() {
68                 return this.volEnvironmentArtifactUuid;
69         }
70         public void setVolEnvironmentArtifactUuid(String volEnvironmentArtifactUuid) {
71                 this.volEnvironmentArtifactUuid = volEnvironmentArtifactUuid;
72         }
73         
74         public Integer getMinInstances() {
75                 return this.minInstances;
76         }
77         public void setMinInstances(Integer minInstances) {
78                 this.minInstances = minInstances;
79         }
80         public Integer getMaxInstances() {
81                 return this.maxInstances;
82         }
83         public void setMaxInstances(Integer maxInstances) {
84                 this.maxInstances = maxInstances;
85         }
86         public Integer getInitialCount() {
87                 return this.initialCount;
88         }
89         public void setInitialCount(Integer initialCount) {
90                 this.initialCount = initialCount;
91         }
92         public Integer getAvailabilityZoneCount() {
93                 return this.availabilityZoneCount;
94         }
95         public void setAvailabilityZoneCount(Integer availabilityZoneCount) {
96                 this.availabilityZoneCount = availabilityZoneCount;
97         }
98         public Timestamp getCreated() {
99                 return created;
100         }
101         public void setCreated(Timestamp created) {
102                 this.created = created;
103         }
104         public String getLabel() {
105                 return this.label;
106         }
107         public void setLabel(String label) {
108                 this.label = label;
109         }
110         public VfModule getVfModule() {
111                 return this.vfModule;
112         }
113         public void setVfModule(VfModule vfModule) {
114                 this.vfModule = vfModule;
115         }
116
117         @Override
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;
129         }
130
131         @Override
132     public boolean equals (Object o) {
133         if (!(o instanceof VfModuleCustomization)) {
134             return false;
135         }
136         if (this == o) {
137             return true;
138         }
139         VfModuleCustomization vfmc = (VfModuleCustomization) o;
140         if (vfmc.getModelCustomizationUuid().equals(this.getModelCustomizationUuid()) && vfmc.getVfModuleModelUuid().equals(this.getVfModuleModelUuid())) {
141             return true;
142         }
143         return false;
144     }
145
146     @Override
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.
150         int result = 0;
151         result = (this.modelCustomizationUuid != null ? this.modelCustomizationUuid.hashCode() : 0) + (this.vfModuleModelUuid != null ? this.vfModuleModelUuid.hashCode() : 0);
152         return result;
153     }
154
155 }