*/
package org.onap.usecaseui.server.listener;
-import org.onap.usecaseui.server.service.InitializationService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
public class UsecaseServerEventListener implements ApplicationListener<ApplicationReadyEvent>
{
private static final Logger logger = LoggerFactory.getLogger(UsecaseServerEventListener.class);
-
- @Autowired
- InitializationService initializationService;
-
+
+
public void onApplicationEvent(ApplicationReadyEvent arg0)
{
- initializationService.initialize();
}
-
+
}
session.close();\r
return "1";\r
} catch (Exception e) {\r
- logger.error("Exception occurred while performing AlarmsHeaderServiceImpl saveAlarmsHeader. Details:" + e.getMessage());\r
+ logger.error("exception occurred while performing AlarmsHeaderServiceImpl saveAlarmsHeader. Details:" + e.getMessage());\r
return "0";\r
}\r
\r
session.close();\r
return "1";\r
} catch (Exception e) {\r
- logger.error("Exception occurred while performing AlarmsHeaderServiceImpl updateAlarmsHeader. Details:" + e.getMessage());\r
+ logger.error("exception occurred while performing AlarmsHeaderServiceImpl updateAlarmsHeader. Details:" + e.getMessage());\r
return "0";\r
}\r
}\r
session.close();\r
return (int)q;\r
} catch (Exception e) {\r
- logger.error("Exception occurred while performing AlarmsHeaderServiceImpl getAllCount. Details:" + e.getMessage());\r
+ logger.error("exception occurred while performing AlarmsHeaderServiceImpl getAllCount. Details:" + e.getMessage());\r
return -1;\r
}\r
}\r
session.close();\r
return page;\r
} catch (Exception e) {\r
- logger.error("Exception occurred while performing AlarmsHeaderServiceImpl queryAlarmsHeader. Details:" + e.getMessage());\r
+ logger.error("exception occurred while performing AlarmsHeaderServiceImpl queryAlarmsHeader. Details:" + e.getMessage());\r
return null;\r
}\r
}\r
session.close();\r
return list;\r
} catch (Exception e) {\r
- logger.error("Exception occurred while performing AlarmsHeaderServiceImpl queryId. Details:" + e.getMessage());\r
+ logger.error("exception occurred while performing AlarmsHeaderServiceImpl queryId. Details:" + e.getMessage());\r
return null;\r
}\r
}\r
session.close();\r
return "1";\r
} catch (Exception e) {\r
- logger.error("Exception occurred while performing AlarmsInformationServiceImpl saveAlarmsInformation. Details:" + e.getMessage());\r
+ logger.error("exception occurred while performing AlarmsInformationServiceImpl saveAlarmsInformation. Details:" + e.getMessage());\r
return "0";\r
}\r
\r
session.close();\r
return "1";\r
} catch (Exception e) {\r
- logger.error("Exception occurred while performing AlarmsInformationServiceImpl updateAlarmsInformation. Details:" + e.getMessage());\r
+ logger.error("exception occurred while performing AlarmsInformationServiceImpl updateAlarmsInformation. Details:" + e.getMessage());\r
return "0";\r
}\r
}\r
session.close();\r
return (int)q;\r
} catch (Exception e) {\r
- logger.error("Exception occurred while performing AlarmsInformationServiceImpl getAllCount. Details:" + e.getMessage());\r
+ logger.error("exception occurred while performing AlarmsInformationServiceImpl getAllCount. Details:" + e.getMessage());\r
return 0;\r
}\r
}\r
session.close();\r
return page;\r
} catch (Exception e) {\r
- logger.error("Exception occurred while performing AlarmsInformationServiceImpl queryAlarmsInformation. Details:" + e.getMessage());\r
+ logger.error("exception occurred while performing AlarmsInformationServiceImpl queryAlarmsInformation. Details:" + e.getMessage());\r
return null;\r
}\r
}\r
session.close();\r
return list;\r
} catch (Exception e) {\r
- logger.error("Exception occurred while performing AlarmsInformationServiceImpl queryId. Details:" + e.getMessage());\r
+ logger.error("exception occurred while performing AlarmsInformationServiceImpl queryId. Details:" + e.getMessage());\r
return null;\r
}\r
}\r
session.close();\r
return "1";\r
} catch (Exception e) {\r
- logger.error("Exception occurred while performing PerformanceHeaderServiceImpl savePerformanceHeader. Details:" + e.getMessage());\r
+ logger.error("exception occurred while performing PerformanceHeaderServiceImpl savePerformanceHeader. Details:" + e.getMessage());\r
return "0";\r
}\r
\r
session.close();\r
return "1";\r
} catch (Exception e) {\r
- logger.error("Exception occurred while performing PerformanceHeaderServiceImpl updatePerformanceHeader. Details:" + e.getMessage());\r
+ logger.error("exception occurred while performing PerformanceHeaderServiceImpl updatePerformanceHeader. Details:" + e.getMessage());\r
return "0";\r
}\r
}\r
session.close();\r
return (int)q;\r
} catch (Exception e) {\r
- logger.error("Exception occurred while performing PerformanceHeaderServiceImpl getAllCount. Details:" + e.getMessage());\r
+ logger.error("exception occurred while performing PerformanceHeaderServiceImpl getAllCount. Details:" + e.getMessage());\r
return 0;\r
}\r
}\r
session.close();\r
return page;\r
} catch (Exception e) {\r
- logger.error("Exception occurred while performing PerformanceHeaderServiceImpl queryPerformanceHeader. Details:" + e.getMessage());\r
+ logger.error("exception occurred while performing PerformanceHeaderServiceImpl queryPerformanceHeader. Details:" + e.getMessage());\r
return null;\r
}\r
}\r
session.close();\r
return list;\r
} catch (Exception e) {\r
- logger.error("Exception occurred while performing PerformanceHeaderServiceImpl queryId. Details:" + e.getMessage());\r
+ logger.error("exception occurred while performing PerformanceHeaderServiceImpl queryId. Details:" + e.getMessage());\r
return null;\r
}\r
}\r
session.close();\r
return "1";\r
} catch (Exception e) {\r
- logger.error("Exception occurred while performing PerformanceInformationServiceImpl savePerformanceInformation. Details:" + e.getMessage());\r
+ logger.error("exception occurred while performing PerformanceInformationServiceImpl savePerformanceInformation. Details:" + e.getMessage());\r
return "0";\r
}\r
\r
session.close();\r
return "1";\r
} catch (Exception e) {\r
- logger.error("Exception occurred while performing PerformanceInformationServiceImpl updatePerformanceInformation. Details:" + e.getMessage());\r
+ logger.error("exception occurred while performing PerformanceInformationServiceImpl updatePerformanceInformation. Details:" + e.getMessage());\r
return "0";\r
}\r
}\r
session.close();\r
return (int)q;\r
} catch (Exception e) {\r
- logger.error("Exception occurred while performing PerformanceInformationServiceImpl getAllCount. Details:" + e.getMessage());\r
+ logger.error("exception occurred while performing PerformanceInformationServiceImpl getAllCount. Details:" + e.getMessage());\r
return 0;\r
}\r
}\r
session.close();\r
return page;\r
} catch (Exception e) {\r
- logger.error("Exception occurred while performing PerformanceInformationServiceImpl queryPerformanceInformation. Details:" + e.getMessage());\r
+ logger.error("exception occurred while performing PerformanceInformationServiceImpl queryPerformanceInformation. Details:" + e.getMessage());\r
return null;\r
}\r
}\r
session.close();\r
return list;\r
} catch (Exception e) {\r
- logger.error("Exception occurred while performing PerformanceInformationServiceImpl queryId. Details:" + e.getMessage());\r
+ logger.error("exception occurred while performing PerformanceInformationServiceImpl queryId. Details:" + e.getMessage());\r
return null;\r
}\r
}\r
a.setEventName("a");
a.setStatus("1");
a.setVfStatus("1");
- a.setEventId("1101");
+ a.setEventId("11011");
a.setDomain("asb");
a.setEventCategory("s");
a.setAlarmCondition("ea");
System.out.println(alarmsHeaderService.saveAlarmsHeader(a));
}
+
@Test
public void update() throws ParseException {
AlarmsHeader a = new AlarmsHeader();
System.out.println(alarmsHeaderService.updateAlarmsHeader(a));
}
+
+ @Test
+ public void update1() throws ParseException {
+ AlarmsHeader a = new AlarmsHeader();
+ a.setEventName("a1");
+ a.setStatus("2");
+ a.setVfStatus("3");
+ a.setEventId("1101");
+ a.setDomain("asb");
+ a.setEventCategory("s");
+ a.setAlarmCondition("ea");
+ a.setAlarmInterfaceA("cs");
+ a.setCreateTime(DateUtils.now());
+ a.setEventServrity("s");
+ a.setEventSourceType("q");
+ a.setEventType("q");
+ a.setSpecificProblem("especially");
+ a.setStartEpochMicrosec("wallet");
+ a.setUpdateTime(DateUtils.now());
+ a.setVersion("va2");
+ System.out.println(alarmsHeaderService.updateAlarmsHeader(a));
+ }
+
@Test
public void get(){
@Test
public void save() throws ParseException {
AlarmsInformation a = new AlarmsInformation();
- a.setEventId("110");
+ a.setEventId("111");
a.setName("efw");
a.setValue("fre");
a.setCreateTime(DateUtils.now());
System.out.println(alarmsInformationService.updateAlarmsInformation(a));
}
+ @Test
+ public void update1() throws ParseException {
+ AlarmsInformation a = new AlarmsInformation();
+ a.setEventId("110");
+ a.setValue("fko");
+ System.out.println(alarmsInformationService.updateAlarmsInformation(a));
+ }
+
@Test
public void get() throws ParseException {
alarmsInformationService.queryId(new String[]{"110"}).forEach(ai -> System.out.println(ai));
public void save() throws ParseException {
PerformanceHeader p = new PerformanceHeader();
p.setCreateTime(DateUtils.now());
- p.setEventId("110");
+ p.setEventId("1101");
p.setEventName("fxc");
p.setDomain("asb");
p.setCreateTime(DateUtils.now());
System.out.println(performanceHeaderService.updatePerformanceHeader(p));
}
+ @Test
+ public void update1() throws ParseException {
+ PerformanceHeader p = new PerformanceHeader();
+ p.setCreateTime(DateUtils.now());
+ p.setEventId("110");
+ p.setEventName("fxc");
+ p.setDomain("asb");
+ p.setCreateTime(DateUtils.now());
+ p.setEventType("q");
+ p.setLastEpochMicroSec("csa");
+ p.setNfcNamingCode("std");
+ p.setNfNamingCode("cout");
+ p.setPriority("cs");
+ p.setReportingEntityId("112");
+ p.setMeasurementsForVfScalingVersion("12");
+ System.out.println(performanceHeaderService.updatePerformanceHeader(p));
+ }
+
+
@Test
public void get() throws ParseException {
performanceHeaderService.queryId(new String[]{"110"})
System.out.println(performanceInformationService.updatePerformanceInformation(a));
}
+ @Test
+ public void update1() throws ParseException {
+ PerformanceInformation a = new PerformanceInformation();
+ a.setEventId("110");
+ a.setName("efw");
+ a.setValue("fko11");
+ System.out.println(performanceInformationService.updatePerformanceInformation(a));
+ }
+
@Test
public void get() throws ParseException {
performanceInformationService.queryId(new String[]{"110"})