2 * ===============================LICENSE_START======================================
4 * ================================================================================
5 * Copyright © 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.onap.dcae.apod.analytics.cdap.common.persistance.tca;
23 import org.apache.hadoop.io.Writable;
24 import org.apache.hadoop.io.WritableUtils;
26 import java.io.DataInput;
27 import java.io.DataOutput;
28 import java.io.IOException;
29 import java.io.Serializable;
33 * @author Rajiv Singla . Creation Date: 11/16/2016.
35 public class TCAVESAlertEntity implements Writable, Serializable {
37 private static final long serialVersionUID = 1L;
39 private long creationTS;
40 private String alertMessage;
42 public TCAVESAlertEntity() {
43 // no argument constructor required for json serialization / deserialization
46 public TCAVESAlertEntity(long creationTS, String alertMessage) {
47 this.creationTS = creationTS;
48 this.alertMessage = alertMessage;
51 public long getCreationTS() {
55 public void setCreationTS(long creationTS) {
56 this.creationTS = creationTS;
59 public String getAlertMessage() {
63 public void setAlertMessage(String alertMessage) {
64 this.alertMessage = alertMessage;
68 public void write(DataOutput dataOutput) throws IOException {
69 WritableUtils.writeVLong(dataOutput, creationTS);
70 WritableUtils.writeString(dataOutput, alertMessage);
74 public void readFields(DataInput dataInput) throws IOException {
75 creationTS = WritableUtils.readVLong(dataInput);
76 alertMessage = WritableUtils.readString(dataInput);