push addional code
[sdc.git] / openecomp-be / lib / openecomp-sdc-versioning-lib / openecomp-sdc-versioning-api / src / main / java / org / openecomp / sdc / versioning / dao / types / VersionHistoryEntity.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
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.sdc.versioning.dao.types;
22
23 import com.datastax.driver.mapping.annotations.Column;
24 import com.datastax.driver.mapping.annotations.Frozen;
25 import com.datastax.driver.mapping.annotations.PartitionKey;
26 import com.datastax.driver.mapping.annotations.Table;
27
28 @Table(keyspace = "dox", name = "version_history")
29 public class VersionHistoryEntity {
30
31   @PartitionKey
32   @Column(name = "entity_id")
33   @Frozen
34   private VersionableEntityId entityId;
35
36   @Column(name = "active_version")
37   @Frozen
38   private Version version;
39
40   private String user;
41   private String description;
42   private VersionType type;
43
44   public VersionHistoryEntity() {
45   }
46
47   public VersionHistoryEntity(VersionableEntityId entityId) {
48     this.entityId = entityId;
49   }
50
51   public VersionableEntityId getEntityId() {
52     return entityId;
53   }
54
55   public void setEntityId(VersionableEntityId entityId) {
56     this.entityId = entityId;
57   }
58
59   public Version getVersion() {
60     return version;
61   }
62
63   public void setVersion(Version version) {
64     this.version = version;
65   }
66
67   public String getUser() {
68     return user;
69   }
70
71   public void setUser(String user) {
72     this.user = user;
73   }
74
75   public String getDescription() {
76     return description;
77   }
78
79   public void setDescription(String description) {
80     this.description = description;
81   }
82
83   public VersionType getType() {
84     return type;
85   }
86
87   public void setType(VersionType type) {
88     this.type = type;
89   }
90 }