<commit_before>package org.helianto.partner.repository;

import java.io.Serializable;
import java.util.List;

import org.helianto.core.domain.Category;
import org.helianto.partner.domain.Partner;
import org.helianto.partner.domain.PrivateEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

/**
 * Partner repository.
 * 
 * @author mauriciofernandesdecastro
 */
public interface PartnerRepository extends JpaRepository<Partner, Serializable> {
	
	/**
	 * Find by natural key.
	 * 
	 * @param privateEntity
	 * @param category
	 */
	@Query("select partner from Partner partner where privateEntity = ?1 and category = ?2")
	Partner findByPrivateEntityAndCategory(PrivateEntity privateEntity, Category category);
	
	/**
	 * Find by private entity.
	 * 
	 * @param privateEntity
	 */
	List<Partner> findByPrivateEntity(PrivateEntity privateEntity);
	
}<commit_msg>@Transactional em partner<commit_after>package org.helianto.partner.repository;

import java.io.Serializable;
import java.util.List;

import org.helianto.core.domain.Category;
import org.helianto.partner.domain.Partner;
import org.helianto.partner.domain.PrivateEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

/**
 * Partner repository.
 * 
 * @author mauriciofernandesdecastro
 */
public interface PartnerRepository extends JpaRepository<Partner, Serializable> {
	
	/**
	 * Find by natural key.
	 * 
	 * @param privateEntity
	 * @param category
	 */
	@Transactional
	@Query("select partner from Partner partner where privateEntity = ?1 and category = ?2")
	Partner findByPrivateEntityAndCategory(PrivateEntity privateEntity, Category category);
	
	/**
	 * Find by private entity.
	 * 
	 * @param privateEntity
	 */
	@Transactional
	List<Partner> findByPrivateEntity(PrivateEntity privateEntity);
	
}
{'fraction_non_alphanumeric': 0.10025316455696202, 'fraction_numerical': 0.0020253164556962027, 'mean_word_length': 5.117647058823529, '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': '3960693', 'n_tokens_mistral': 593, 'n_tokens_neox': 558, 'n_words': 124}