From 7e13d150ecd2d6605ec144c06375def23aec33ad Mon Sep 17 00:00:00 2001 From: insanity Date: Thu, 28 Jun 2018 17:45:56 +0900 Subject: [PATCH] ing --- .../central/module/meta/dao/MetaSensorStatusDAO.java | 1 + .../meta/service/CentralMetaSensorStatusService.java | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/src/main/java/com/loafle/overflow/central/module/meta/dao/MetaSensorStatusDAO.java b/src/main/java/com/loafle/overflow/central/module/meta/dao/MetaSensorStatusDAO.java index 3a01890..0e9a505 100644 --- a/src/main/java/com/loafle/overflow/central/module/meta/dao/MetaSensorStatusDAO.java +++ b/src/main/java/com/loafle/overflow/central/module/meta/dao/MetaSensorStatusDAO.java @@ -10,4 +10,5 @@ import org.springframework.stereotype.Repository; @Repository public interface MetaSensorStatusDAO extends JpaRepository { + MetaSensorStatus findByKey(String key); } diff --git a/src/main/java/com/loafle/overflow/central/module/meta/service/CentralMetaSensorStatusService.java b/src/main/java/com/loafle/overflow/central/module/meta/service/CentralMetaSensorStatusService.java index 872bb4d..985b133 100644 --- a/src/main/java/com/loafle/overflow/central/module/meta/service/CentralMetaSensorStatusService.java +++ b/src/main/java/com/loafle/overflow/central/module/meta/service/CentralMetaSensorStatusService.java @@ -21,4 +21,14 @@ public class CentralMetaSensorStatusService implements MetaSensorStatusService { public List readAll() throws OverflowException { return this.sensorStatusDAO.findAll(); } + + @Override + public MetaSensorStatus regist(MetaSensorStatus metaSensorStatus) throws OverflowException { + return this.sensorStatusDAO.save(metaSensorStatus); + } + + @Override + public MetaSensorStatus readByKey(String key) throws OverflowException { + return this.sensorStatusDAO.findByKey(key); + } }