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.versioning.dao.types;
23 import com.datastax.driver.mapping.annotations.ClusteringColumn;
24 import com.datastax.driver.mapping.annotations.Column;
25 import com.datastax.driver.mapping.annotations.Enumerated;
26 import com.datastax.driver.mapping.annotations.Frozen;
27 import com.datastax.driver.mapping.annotations.FrozenValue;
28 import com.datastax.driver.mapping.annotations.PartitionKey;
29 import com.datastax.driver.mapping.annotations.Table;
31 import java.util.HashSet;
34 @Table(keyspace = "dox", name = "version_info_deleted")
35 public class VersionInfoDeletedEntity {
38 @Column(name = "entity_type")
39 private String entityType;
42 @Column(name = "entity_id")
43 private String entityId;
45 @Column(name = "active_version")
47 private Version activeVersion;
50 private VersionStatus status;
53 private UserCandidateVersion candidate;
55 @Column(name = "viewable_versions")
57 private Set<Version> viewableVersions = new HashSet<>();
59 @Column(name = "latest_final_version")
61 private Version latestFinalVersion;
64 * Every entity class must have a default constructor according to
65 * <a href="http://docs.datastax.com/en/developer/java-driver/2.1/manual/object_mapper/creating/">
66 * Definition of mapped classes</a>.
68 public VersionInfoDeletedEntity() {
69 // Don't delete! Default constructor is required by DataStax driver
72 public VersionInfoDeletedEntity(String entityType, String entityId) {
73 this.entityType = entityType;
74 this.entityId = entityId;
77 public String getEntityType() {
81 public void setEntityType(String entityType) {
82 this.entityType = entityType;
85 public String getEntityId() {
89 public void setEntityId(String entityId) {
90 this.entityId = entityId;
93 public Version getActiveVersion() {
97 public void setActiveVersion(Version activeVersion) {
98 this.activeVersion = activeVersion;
101 public VersionStatus getStatus() {
105 public void setStatus(VersionStatus status) {
106 this.status = status;
109 public UserCandidateVersion getCandidate() {
113 public void setCandidate(UserCandidateVersion candidate) {
114 this.candidate = candidate;
117 public Set<Version> getViewableVersions() {
118 return viewableVersions;
121 public void setViewableVersions(Set<Version> viewableVersions) {
122 this.viewableVersions = viewableVersions;
125 public Version getLatestFinalVersion() {
126 return latestFinalVersion;
129 public void setLatestFinalVersion(Version latestFinalVersion) {
130 this.latestFinalVersion = latestFinalVersion;