summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/bean/AlarmsHeader.java42
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/bean/AlarmsInformation.java11
-rwxr-xr-xserver/src/main/java/org/onap/usecaseui/server/service/impl/AlarmsHeaderServiceImpl.java3
3 files changed, 29 insertions, 27 deletions
diff --git a/server/src/main/java/org/onap/usecaseui/server/bean/AlarmsHeader.java b/server/src/main/java/org/onap/usecaseui/server/bean/AlarmsHeader.java
index 62ef39a7..0a077241 100644
--- a/server/src/main/java/org/onap/usecaseui/server/bean/AlarmsHeader.java
+++ b/server/src/main/java/org/onap/usecaseui/server/bean/AlarmsHeader.java
@@ -35,78 +35,78 @@ public class AlarmsHeader implements Serializable{
@Column(name = "version")
private String version;
- @Column(name = "eventName")
+ @Column(name = "event_name")
private String eventName;
@Column(name = "domain")
private String domain;
- @Column(name = "eventId")
+ @Column(name = "event_id")
private String eventId;
- @Column(name = "eventType")
+ @Column(name = "event_type")
private String eventType;
- @Column(name = "nfcNamingCode", nullable=false)
+ @Column(name = "nfc_naming_code", nullable=false)
private String nfcNamingCode;
- @Column(name = "nfNamingCode", nullable=false)
+ @Column(name = "nf_naming_code", nullable=false)
private String nfNamingCode;
- @Column(name = "sourceId")
+ @Column(name = "source_id")
private String sourceId;
- @Column(name = "sourceName")
+ @Column(name = "source_name")
private String sourceName;
- @Column(name = "reportingEntityId")
+ @Column(name = "reporting_entity_id")
private String reportingEntityId;
- @Column(name = "reportingEntityName")
+ @Column(name = "reporting_entity_name")
private String reportingEntityName;
@Column(name = "priority")
private String priority;
- @Column(name = "startEpochMicrosec")
+ @Column(name = "start_epoch_microsec")
private String startEpochMicrosec;
- @Column(name = "lastEpochMicroSec")
+ @Column(name = "last_epoch_microsec")
private String lastEpochMicroSec;
- @Column(name = "startEpochMicrosecCleared")
+ @Column(name = "start_epoch_microsec_cleared")
private String startEpochMicrosecCleared;
- @Column(name = "lastEpochMicroSecCleared")
+ @Column(name = "last_epoch_microsec_cleared")
private String lastEpochMicroSecCleared;
@Column(name = "sequence")
private String sequence;
- @Column(name = "faultFieldsVersion")
+ @Column(name = "fault_fields_version")
private String faultFieldsVersion;
- @Column(name = "eventServrity")
+ @Column(name = "event_servrity")
private String eventServrity;
- @Column(name = "eventSourceType")
+ @Column(name = "event_source_type")
private String eventSourceType;
- @Column(name = "eventCategory")
+ @Column(name = "event_category")
private String eventCategory;
- @Column(name = "alarmCondition")
+ @Column(name = "alarm_condition")
private String alarmCondition;
- @Column(name = "specificProblem")
+ @Column(name = "specific_problem")
private String specificProblem;
- @Column(name = "vfStatus")
+ @Column(name = "vf_status")
private String vfStatus;
- @Column(name = "alarmInterfaceA")
+ @Column(name = "alarm_interfacea")
private String alarmInterfaceA;
@Column(name = "status")
diff --git a/server/src/main/java/org/onap/usecaseui/server/bean/AlarmsInformation.java b/server/src/main/java/org/onap/usecaseui/server/bean/AlarmsInformation.java
index f39e3dd2..f11175ff 100644
--- a/server/src/main/java/org/onap/usecaseui/server/bean/AlarmsInformation.java
+++ b/server/src/main/java/org/onap/usecaseui/server/bean/AlarmsInformation.java
@@ -19,6 +19,8 @@ import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
@@ -32,6 +34,7 @@ import javax.persistence.Table;
public class AlarmsInformation implements Serializable {
@Id
+ @GeneratedValue(strategy=GenerationType.IDENTITY)
@Column(name = "id")
private int id;
@@ -41,16 +44,16 @@ public class AlarmsInformation implements Serializable {
@Column(name = "value")
private String value;
- @Column(name = "sourceId")
+ @Column(name = "source_id")
private String sourceId;
- @Column(name = "startEpochMicroSec")
+ @Column(name = "start_epoch_microsec")
private String startEpochMicroSec;
- @Column(name = "lastEpochMicroSec")
+ @Column(name = "last_epoch_microsec")
private String lastEpochMicroSec;
- @Column(name = "headerId")
+ @Column(name = "header_id")
private String headerId;
@Override
diff --git a/server/src/main/java/org/onap/usecaseui/server/service/impl/AlarmsHeaderServiceImpl.java b/server/src/main/java/org/onap/usecaseui/server/service/impl/AlarmsHeaderServiceImpl.java
index 71a0faf7..0f9431bc 100755
--- a/server/src/main/java/org/onap/usecaseui/server/service/impl/AlarmsHeaderServiceImpl.java
+++ b/server/src/main/java/org/onap/usecaseui/server/service/impl/AlarmsHeaderServiceImpl.java
@@ -247,8 +247,7 @@ public class AlarmsHeaderServiceImpl implements AlarmsHeaderService {
Query q = session.createQuery(string);
q.setString("id",id);
AlarmsHeader alarmsHeader =(AlarmsHeader)q.uniqueResult();
- session.flush();
- return alarmsHeader;
+ return alarmsHeader;
}catch (Exception e){
logger.error("exception occurred while performing AlarmsHeaderServiceImpl getAlarmsHeaderDetail."+e.getMessage());