2 * ===============================LICENSE_START======================================
\r
4 * ================================================================================
\r
5 * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
\r
6 * ================================================================================
\r
7 * Licensed under the Apache License, Version 2.0 (the "License");
\r
8 * you may not use this file except in compliance with the License.
\r
9 * You may obtain a copy of the License at
\r
11 * http://www.apache.org/licenses/LICENSE-2.0
\r
13 * Unless required by applicable law or agreed to in writing, software
\r
14 * distributed under the License is distributed on an "AS IS" BASIS,
\r
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
16 * See the License for the specific language governing permissions and
\r
17 * limitations under the License.
\r
18 * ============================LICENSE_END===========================================
\r
21 package org.openecomp.dcae.apod.analytics.cdap.common.persistance.tca;
\r
23 import org.apache.hadoop.io.Writable;
\r
24 import org.apache.hadoop.io.WritableUtils;
\r
26 import java.io.DataInput;
\r
27 import java.io.DataOutput;
\r
28 import java.io.IOException;
\r
29 import java.io.Serializable;
\r
33 * @author Rajiv Singla . Creation Date: 11/16/2016.
\r
35 public class TCAVESAlertEntity implements Writable, Serializable {
\r
37 private static final long serialVersionUID = 1L;
\r
39 private long creationTS;
\r
40 private String alertMessage;
\r
42 public TCAVESAlertEntity() {
\r
43 // no argument constructor required for json serialization / deserialization
\r
46 public TCAVESAlertEntity(long creationTS, String alertMessage) {
\r
47 this.creationTS = creationTS;
\r
48 this.alertMessage = alertMessage;
\r
51 public long getCreationTS() {
\r
55 public void setCreationTS(long creationTS) {
\r
56 this.creationTS = creationTS;
\r
59 public String getAlertMessage() {
\r
60 return alertMessage;
\r
63 public void setAlertMessage(String alertMessage) {
\r
64 this.alertMessage = alertMessage;
\r
68 public void write(DataOutput dataOutput) throws IOException {
\r
69 WritableUtils.writeVLong(dataOutput, creationTS);
\r
70 WritableUtils.writeString(dataOutput, alertMessage);
\r
74 public void readFields(DataInput dataInput) throws IOException {
\r
75 creationTS = WritableUtils.readVLong(dataInput);
\r
76 alertMessage = WritableUtils.readString(dataInput);
\r