OsrsHiscoreStatService.java (803B)
1 package com.wimdupont.sxcybot.services.osrs; 2 3 import com.wimdupont.sxcybot.repository.osrs.OsrsHiscoreStatRepository; 4 import com.wimdupont.sxcybot.repository.osrs.dao.OsrsHiscoreStat; 5 import org.springframework.data.domain.Sort; 6 import org.springframework.stereotype.Service; 7 import org.springframework.transaction.annotation.Transactional; 8 9 import java.util.List; 10 11 @Service 12 @Transactional 13 public class OsrsHiscoreStatService { 14 15 private final OsrsHiscoreStatRepository osrsHiscoreStatRepository; 16 17 public OsrsHiscoreStatService(OsrsHiscoreStatRepository osrsHiscoreStatRepository) { 18 this.osrsHiscoreStatRepository = osrsHiscoreStatRepository; 19 } 20 21 public List<OsrsHiscoreStat> findAll() { 22 return osrsHiscoreStatRepository.findAll(Sort.by("orderValue").ascending()); 23 } 24 }