2 * Copyright © 2016-2017 European Support Limited
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package org.openecomp.sdc.activitylog.dao.type;
19 import com.datastax.driver.mapping.annotations.*;
20 import org.openecomp.sdc.versioning.dao.types.Version;
22 import java.util.Calendar;
23 import java.util.Date;
25 @Table(keyspace = "dox", name = "activity_log")
26 public class ActivityLogEntity {
28 @Column(name = "item_id")
29 private String itemId;
30 @ClusteringColumn(value = 1)
31 @Column(name = "version_id")
32 private String versionId;
34 @Column(name = "activity_id")
38 private Date timestamp;
39 private boolean success;
40 private String message;
41 private String comment;
43 public ActivityLogEntity() {}
45 public ActivityLogEntity(String itemId, String versionId, String type, String user, boolean success, String message, String comment) {
47 this.versionId = versionId;
50 this.success = success;
51 this.message = message;
52 this.comment = comment;
53 Calendar now = Calendar.getInstance();
54 this.timestamp = now.getTime();
57 public String getItemId() { return itemId; }
59 public void setItemId(String itemId) {
63 public String getVersionId() {
67 public void setVersionId(String versionId) {
68 this.versionId = versionId;
71 public String getId() { return id; }
73 public void setId(String id) { this.id = id; }
75 public String getType() {
79 public void setType(String type) {
83 public String getUser() {
87 public void setUser(String user) {
91 public Date getTimestamp() {
95 public void setTimestamp(Date timestamp) {
96 this.timestamp = timestamp;
99 public boolean isSuccess() {
103 public void setSuccess(boolean success) {
104 this.success = success;
107 public String getMessage() {
111 public void setMessage(String message) {
112 this.message = message;
115 public String getComment() {
119 public void setComment(String comment) {
120 this.comment = comment;