<commit_before>package es.ucm.fdi.anuncios.business;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import es.ucm.fdi.anuncios.business.domain.Aviso;
import es.ucm.fdi.anuncios.business.domain.repository.AvisoRepository;

@Transactional
@Service
public class Avisos {
	@Autowired
	AvisoRepository avisoRepository;

	public List<Aviso> getAllAvisos() {
		return avisoRepository.getAllAvisos();
	}

	public Aviso getAvisoById(String avisoID) {
		return avisoRepository.getAvisoById(avisoID);
	}

	public List<Aviso> getAvisosByCategory(String category) {
		return avisoRepository.getAvisosByCategory(category);
	}

	public void eliminarAviso(String avisoID){
		avisoRepository.eliminarAviso(avisoID);
	}

	@Transactional<commit_msg>Si la clase está anotada con @Transactional no hace falta añadirla a los métodos individuales<commit_after>package es.ucm.fdi.anuncios.business;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import es.ucm.fdi.anuncios.business.domain.Aviso;
import es.ucm.fdi.anuncios.business.domain.repository.AvisoRepository;

@Transactional
@Service
public class Avisos {
	@Autowired
	AvisoRepository avisoRepository;

	public List<Aviso> getAllAvisos() {
		return avisoRepository.getAllAvisos();
	}

	public Aviso getAvisoById(String avisoID) {
		return avisoRepository.getAvisoById(avisoID);
	}

	public List<Aviso> getAvisosByCategory(String category) {
		return avisoRepository.getAvisosByCategory(category);
	}

	public void eliminarAviso(String avisoID){
		avisoRepository.eliminarAviso(avisoID);
	}

{'fraction_non_alphanumeric': 0.0906113537117904, 'fraction_numerical': 0.0, 'mean_word_length': 6.54320987654321, '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': '4437298', 'n_tokens_mistral': 637, 'n_tokens_neox': 627, 'n_words': 102}