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.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;
28 @Table(keyspace = "dox", name = "version_history")
29 public class VersionHistoryEntity {
32 @Column(name = "entity_id")
34 private VersionableEntityId entityId;
36 @Column(name = "active_version")
38 private Version version;
41 private String description;
42 private VersionType type;
45 * Every entity class must have a default constructor according to
46 * <a href="http://docs.datastax.com/en/developer/java-driver/2.1/manual/object_mapper/creating/">
47 * Definition of mapped classes</a>.
49 public VersionHistoryEntity() {
50 // Don't delete! Default constructor is required by DataStax driver
53 public VersionHistoryEntity(VersionableEntityId entityId) {
54 this.entityId = entityId;
57 public VersionableEntityId getEntityId() {
61 public void setEntityId(VersionableEntityId entityId) {
62 this.entityId = entityId;
65 public Version getVersion() {
69 public void setVersion(Version version) {
70 this.version = version;
73 public String getUser() {
77 public void setUser(String user) {
81 public String getDescription() {
85 public void setDescription(String description) {
86 this.description = description;
89 public VersionType getType() {
93 public void setType(VersionType type) {