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.notification.dao.types;
19 import com.datastax.driver.mapping.annotations.ClusteringColumn;
20 import com.datastax.driver.mapping.annotations.Column;
21 import com.datastax.driver.mapping.annotations.PartitionKey;
22 import com.datastax.driver.mapping.annotations.Table;
24 import java.util.UUID;
26 import lombok.AllArgsConstructor;
28 import lombok.NoArgsConstructor;
33 @Table(keyspace = "dox", name = "notifications")
34 public class NotificationEntity {
36 public static final String ENTITY_TYPE = "Event Notification";
39 @Column(name = "owner_id")
40 private String ownerId;
42 @Column(name = "read")
46 @Column(name = "event_id")
49 @Column(name = "event_type")
50 private String eventType;
52 @Column(name = "event_attributes")
53 private String eventAttributes;
55 @Column(name = "originator_id")
56 private String originatorId;
58 public NotificationEntity(String ownerId) {
59 this.ownerId = ownerId;
62 public NotificationEntity(String ownerId, UUID eventId, String eventType, String originatorId) {
63 this(ownerId, false, eventId, eventType, null, originatorId);
66 public NotificationEntity(String ownerId, UUID eventId) {
67 this(ownerId, eventId, null, null);