This commit is contained in:
insanity 2018-06-28 17:45:56 +09:00
parent e8ecaefb92
commit 7e13d150ec
2 changed files with 11 additions and 0 deletions

View File

@ -10,4 +10,5 @@ import org.springframework.stereotype.Repository;
@Repository
public interface MetaSensorStatusDAO extends JpaRepository<MetaSensorStatus, Short> {
MetaSensorStatus findByKey(String key);
}

View File

@ -21,4 +21,14 @@ public class CentralMetaSensorStatusService implements MetaSensorStatusService {
public List<MetaSensorStatus> 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);
}
}