diff --git a/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/DeviceRepository.java b/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/DeviceRepository.java new file mode 100644 index 0000000..fdae66e --- /dev/null +++ b/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/DeviceRepository.java @@ -0,0 +1,13 @@ +package ch.usi.inf.sa4.sanmarinoes.smarthut.models; + +import java.util.List; +import org.springframework.data.repository.CrudRepository; +import org.springframework.data.repository.query.Param; + +/** + * DeviceRepository acts as a superclass for the other repositories so to mirror in the database the + * class inheritance present among the various devices. + */ +public interface DeviceRepository extends CrudRepository { + List findByRoomId(@Param("roomId") long roomId); +}