summaryrefslogtreecommitdiff
path: root/src/main/java/com/stileeducation/markr/repository/StudentRepository.java
diff options
context:
space:
mode:
authorSzymon Szukalski <szymon@skas.io>2024-07-23 23:19:45 +1000
committerSzymon Szukalski <szymon@skas.io>2024-07-23 23:19:45 +1000
commitfa34f76ad8ebccb96012b45a4207532846cfa03f (patch)
treee11e7a675d8d23a4921be505cec16b735abbd23d /src/main/java/com/stileeducation/markr/repository/StudentRepository.java
parent6964e0bc8578abcbdf7e49ffa36c49197df67787 (diff)
Define JPA entities and repositories and H2 DB
Diffstat (limited to 'src/main/java/com/stileeducation/markr/repository/StudentRepository.java')
-rw-r--r--src/main/java/com/stileeducation/markr/repository/StudentRepository.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/com/stileeducation/markr/repository/StudentRepository.java b/src/main/java/com/stileeducation/markr/repository/StudentRepository.java
new file mode 100644
index 0000000..2d27644
--- /dev/null
+++ b/src/main/java/com/stileeducation/markr/repository/StudentRepository.java
@@ -0,0 +1,10 @@
+package com.stileeducation.markr.repository;
+
+import com.stileeducation.markr.entity.Student;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+import java.util.Optional;
+
+public interface StudentRepository extends JpaRepository<Student, Long> {
+ Optional<Student> findByStudentNumber(String studentNumber);
+}