1 package de.spring.example.persistence.repository;
3 import org.springframework.data.domain.Page;
4 import org.springframework.data.domain.Pageable;
5 import org.springframework.data.repository.PagingAndSortingRepository;
6 import org.springframework.data.repository.history.RevisionRepository;
8 import de.spring.example.persistence.domain.Ad;
9 import de.spring.example.persistence.domain.AdDescription;
12 * By default <code>org.springframework.data.jpa.repository.support.SimpleJpaRepository<code>
13 * will be the implementation for this interface.
15 * Be careful with <code>@Transactional</code>. SimpleJpaRepository has annotated methods.
18 public interface AdDescriptionRepository extends
19 PagingAndSortingRepository<AdDescription, Long>,
20 /** https://github.com/spring-projects/spring-data-envers/pull/45 QueryDslPredicateExecutor<AdDescription>, **/
21 RevisionRepository<AdDescription, Long, Integer> {
23 // Custom Query method (useful when the offered methods by PagingAndSortingRepository are not enough)
24 Page<AdDescription> findByAd(Ad ad, Pageable pageable);