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.activitylog.dao.type;
23 import com.datastax.driver.mapping.annotations.*;
24 import org.openecomp.sdc.versioning.dao.types.Version;
26 import java.util.Calendar;
27 import java.util.Date;
29 @Table(keyspace = "dox", name = "activity_log")
30 public class ActivityLogEntity {
32 @Column(name = "item_id")
33 private String itemId;
34 @ClusteringColumn(value = 1)
35 @Column(name = "version_id")
36 private String versionId;
38 @Column(name = "activity_id")
42 private Date timestamp;
43 private boolean success;
44 private String message;
45 private String comment;
47 public ActivityLogEntity() {}
49 public ActivityLogEntity(String itemId, String versionId, String type, String user, boolean success, String message, String comment) {
51 this.versionId = versionId;
54 this.success = success;
55 this.message = message;
56 this.comment = comment;
57 Calendar now = Calendar.getInstance();
58 this.timestamp = now.getTime();
61 public String getItemId() { return itemId; }
63 public void setItemId(String itemId) {
67 public String getVersionId() {
71 public void setVersionId(String versionId) {
72 this.versionId = versionId;
75 public String getId() { return id; }
77 public void setId(String id) { this.id = id; }
79 public String getType() {
83 public void setType(String type) {
87 public String getUser() {
91 public void setUser(String user) {
95 public Date getTimestamp() {
99 public void setTimestamp(Date timestamp) {
100 this.timestamp = timestamp;
103 public boolean isSuccess() {
107 public void setSuccess(boolean success) {
108 this.success = success;
111 public String getMessage() {
115 public void setMessage(String message) {
116 this.message = message;
119 public String getComment() {
123 public void setComment(String comment) {
124 this.comment = comment;