<commit_before>package ch.poinzofnoreturn.server.repo;

import ch.poinzofnoreturn.server.model.ProviderEntity;
import ch.poinzofnoreturn.server.projection.ProviderWithCode;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
import org.springframework.data.rest.core.annotation.RestResource;

import java.util.List;

/**
 * Datenbank-Zugriff auf die Anbieter
 */
@RepositoryRestResource(collectionResourceRel = "provider", path="provider", excerptProjection = ProviderWithCode.class)
public interface ProviderRepository extends PagingAndSortingRepository<ProviderEntity, Long> {

    @Query("SELECT p FROM ProviderEntity p JOIN p.pointcodes c")
    @RestResource(path = "onlyWithCodes", rel = "onlyWithCodes")
    public List<ProviderEntity> findProviderWithPointcodes(Pageable p);
}<commit_msg>stu: Auch die Suche nach Anlagen mit Code Pageable machen<commit_after>package ch.poinzofnoreturn.server.repo;

import ch.poinzofnoreturn.server.model.ProviderEntity;
import ch.poinzofnoreturn.server.projection.ProviderWithCode;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
import org.springframework.data.rest.core.annotation.RestResource;

import java.util.List;

/**
 * Datenbank-Zugriff auf die Anbieter
 */
@RepositoryRestResource(collectionResourceRel = "provider", path="provider", excerptProjection = ProviderWithCode.class)
public interface ProviderRepository extends PagingAndSortingRepository<ProviderEntity, Long> {

    @Query("SELECT p FROM ProviderEntity p JOIN p.pointcodes c")
    @RestResource(path = "onlyWithCodes", rel = "onlyWithCodes")
    public Page<ProviderEntity> findProviderWithPointcodes(Pageable p);
}
{'fraction_non_alphanumeric': 0.09476082004555808, 'fraction_numerical': 0.0, 'mean_word_length': 7.318181818181818, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1089273', 'n_tokens_mistral': 620, 'n_tokens_neox': 609, 'n_words': 113}