aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/com/terminaldweller/doc/DocRepository.java
blob: 387835e9834c8f0c250b330814a780a14cbb412a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
package com.terminaldweller.doc;

import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

/** The interface of the doc class for the data store. */
@Repository
public interface DocRepository extends JpaRepository<Doc, Long> {
  @Query("SELECT d FROM Doc d WHERE d.name = ?1")
  Optional<Doc> findDocByName(String name);
}