This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects
Commit 9388728b authored by Michael Breu's avatar Michael Breu :speech_balloon:
Browse files

Fixing compilation

parent e6091034
Branches
Tags
No related merge requests found
package at.ac.uibk.gitsearch.repository;
import at.ac.uibk.gitsearch.domain.WatchListEntry;
import java.util.List;
import org.springframework.data.jpa.repository.*;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import at.ac.uibk.gitsearch.domain.WatchListEntry;
/**
* Spring Data repository for the WatchListEntry entity.
*/
@SuppressWarnings("unused")
@Repository
public interface WatchListEntryRepository extends JpaRepository<WatchListEntry, Long> {
@Query("SELECT wle FROM WatchListEntry wle WHERE wle.watchlist.id=:watchListId")
public List<WatchListEntry> getEntriesByWatchlist(@Param("watchListId") Long watchListId);
@Query("SELECT wle FROM WatchListEntry wle WHERE wle.watchlist.id=:watchListId AND wle.exerciseId=:exerciseId ")
public List<WatchListEntry> getEntriesByWatchlistAndExerciseId(@Param("watchListId") Long watchListId, @Param("exerciseId") String exerciseId);
}
......@@ -105,7 +105,7 @@ public class WatchListEntryService {
* @param id the id of the entity.
*/
public void deleteInWatchlist(Long watchListId, String exerciseId) {
final List<WatchListEntry> entries = watchListEntryRepository.getEntriesbyWatchlistAndExerciseId(watchListId, exerciseId);
final List<WatchListEntry> entries = watchListEntryRepository.getEntriesByWatchlistAndExerciseId(watchListId, exerciseId);
entries.forEach(en -> delete(en.getId()));
}
/**
......@@ -131,7 +131,7 @@ public class WatchListEntryService {
*/
@Transactional(readOnly = true)
public List<WatchListEntryDTO> getEntriesForWatchlist(Long watchlistId) {
return watchListEntryMapper.toDto(watchListEntryRepository.getEntriesbyWatchlist(watchlistId));
return watchListEntryMapper.toDto(watchListEntryRepository.getEntriesByWatchlist(watchlistId));
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment