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.Frozen;
26 import com.datastax.driver.mapping.annotations.FrozenValue;
27 import com.datastax.driver.mapping.annotations.PartitionKey;
28 import com.datastax.driver.mapping.annotations.Table;
30 import lombok.NoArgsConstructor;
33 import java.util.HashSet;
36 @Table(keyspace = "dox", name = "version_info_deleted")
40 public class VersionInfoDeletedEntity {
43 @Column(name = "entity_type")
44 private String entityType;
47 @Column(name = "entity_id")
48 private String entityId;
50 @Column(name = "active_version")
52 private Version activeVersion;
54 private VersionStatus status;
57 private UserCandidateVersion candidate;
59 @Column(name = "viewable_versions")
61 private Set<Version> viewableVersions = new HashSet<>();
63 @Column(name = "latest_final_version")
65 private Version latestFinalVersion;
67 public VersionInfoDeletedEntity(String entityType, String entityId) {
68 this.entityType = entityType;
69 this.entityId = entityId;