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); + } }