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.querydsl.QueryDslPredicateExecutor;
6 import org.springframework.data.repository.PagingAndSortingRepository;
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 PagingAndSortingRepository<AdDescription, Long>, QueryDslPredicateExecutor<AdDescription> {
20 // Custom Query method (useful when the offered methods by PagingAndSortingRepository are not enough)
21 Page<AdDescription> findByAd(Ad ad, Pageable pageable);