aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/com/terminaldweller/doc/DocRepository.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/terminaldweller/doc/DocRepository.java')
-rw-r--r--src/main/java/com/terminaldweller/doc/DocRepository.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/com/terminaldweller/doc/DocRepository.java b/src/main/java/com/terminaldweller/doc/DocRepository.java
index 387835e..56db04e 100644
--- a/src/main/java/com/terminaldweller/doc/DocRepository.java
+++ b/src/main/java/com/terminaldweller/doc/DocRepository.java
@@ -10,4 +10,7 @@ import org.springframework.stereotype.Repository;
public interface DocRepository extends JpaRepository<Doc, Long> {
@Query("SELECT d FROM Doc d WHERE d.name = ?1")
Optional<Doc> findDocByName(String name);
+
+ @Query("SELECT d FROM Doc d WHERE d.id = ?1")
+ Optional<Doc> findDocById(Long id);
}