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.sdc.vendorsoftwareproduct.dao.type;
23 import com.datastax.driver.mapping.annotations.ClusteringColumn;
24 import com.datastax.driver.mapping.annotations.Column;
25 import com.datastax.driver.mapping.annotations.Frozen;
26 import com.datastax.driver.mapping.annotations.PartitionKey;
27 import com.datastax.driver.mapping.annotations.Table;
28 import org.openecomp.sdc.versioning.dao.types.Version;
29 import org.openecomp.sdc.versioning.dao.types.VersionableEntity;
31 @Table(keyspace = "dox", name = "vsp_process")
32 public class ProcessEntity implements VersionableEntity {
33 public static final String ENTITY_TYPE = "Vendor Software Product Process";
35 @Column(name = "vsp_id")
37 @PartitionKey(value = 1)
39 private Version version;
41 @Column(name = "component_id")
42 private String componentId;
43 @ClusteringColumn(value = 1)
44 @Column(name = "process_id")
47 private String description;
48 @Column(name = "artifact_name")
49 private String artifactName;
51 public ProcessEntity() {
56 * Instantiates a new Process entity.
58 * @param vspId the vsp id
59 * @param version the version
60 * @param componentId the component id
63 public ProcessEntity(String vspId, Version version, String componentId, String id) {
65 this.version = version;
66 this.componentId = componentId;
70 public String getVspId() {
74 public void setVspId(String vspId) {
78 public Version getVersion() {
82 public void setVersion(Version version) {
83 this.version = version;
86 public String getComponentId() {
90 public void setComponentId(String componentId) {
91 this.componentId = componentId;
95 public String getEntityType() {
100 public String getFirstClassCitizenId() {
104 public String getId() {
108 public void setId(String id) {
112 public String getName() {
116 public void setName(String name) {
120 public String getDescription() {
124 public void setDescription(String description) {
125 this.description = description;
128 public String getArtifactName() {
132 public void setArtifactName(String artifactName) {
133 this.artifactName = artifactName;
137 public boolean equals(Object obj) {
141 if (obj == null || getClass() != obj.getClass()) {
145 ProcessEntity that = (ProcessEntity) obj;
147 if (vspId != null ? !vspId.equals(that.vspId) : that.vspId != null) {
150 if (version != null ? !version.equals(that.version) : that.version != null) {
153 if (componentId != null ? !componentId.equals(that.componentId) : that.componentId != null) {
156 if (id != null ? !id.equals(that.id) : that.id != null) {
159 if (name != null ? !name.equals(that.name) : that.name != null) {
162 return description != null ? description.equals(that.description) : that.description == null
164 (artifactName != null ? artifactName.equals(that.artifactName) : that.artifactName == null);
169 public int hashCode() {
170 int result = vspId != null ? vspId.hashCode() : 0;
171 result = 31 * result + (version != null ? version.hashCode() : 0);
172 result = 31 * result + (componentId != null ? componentId.hashCode() : 0);
173 result = 31 * result + (id != null ? id.hashCode() : 0);
174 result = 31 * result + (name != null ? name.hashCode() : 0);
175 result = 31 * result + (description != null ? description.hashCode() : 0);
176 result = 31 * result + (artifactName != null ? artifactName.hashCode() : 0);