Skip to content

Instantly share code, notes, and snippets.

@MinCha
Last active August 11, 2016 05:43
Show Gist options
  • Save MinCha/cf679837a32f7ad97e5ed058f8ad1564 to your computer and use it in GitHub Desktop.
Save MinCha/cf679837a32f7ad97e5ed058f8ad1564 to your computer and use it in GitHub Desktop.
Graph Eager Fetch
trait DiagnosisHistoryRepository extends PagingAndSortingRepository[DiagnosisHistory, java.lang.Long] {
def deleteBySummoner(summoner: Summoner): Int
def countBySummonerAndCreatedBetween(summoner: Summoner, start: DateTime, end: DateTime): Int
@org.springframework.data.jpa.repository.EntityGraph(value = "DiagnosisHistory.matchData", `type` = EntityGraphType.LOAD)
def findBySummonerAndMatchDataId(summoner: Summoner, matchDataId: Long): DiagnosisHistory
@org.springframework.data.jpa.repository.EntityGraph(value = "DiagnosisHistory.matchData", `type` = EntityGraphType.LOAD)
def findTop1ByMatchDataId(matchId: Long): DiagnosisHistory
@org.springframework.data.jpa.repository.EntityGraph(value = "DiagnosisHistory.matchData", `type` = EntityGraphType.LOAD)
def findBySummonerIdAndMatchDataId(summonerId: Long, matchDataId: Long): DiagnosisHistory
@org.springframework.data.jpa.repository.EntityGraph(value = "DiagnosisHistory.matchData", `type` = EntityGraphType.LOAD)
def findTop1BySummonerOrderByGameCreatedDesc(summoner: Summoner): DiagnosisHistory
@org.springframework.data.jpa.repository.EntityGraph(value = "DiagnosisHistory.matchData", `type` = EntityGraphType.LOAD)
def findTop50BySummonerAndGameCreatedLessThanEqualOrderByGameCreatedDesc(summoner: Summoner, gameCreated: DateTime): java.util.List[DiagnosisHistory]
@org.springframework.data.jpa.repository.EntityGraph(value = "DiagnosisHistory.matchData", `type` = EntityGraphType.LOAD)
def findBySummoner(summoner: Summoner): java.util.List[DiagnosisHistory]
def findBySummonerId(id: Long): java.util.List[DiagnosisHistory]
def findBySummonerAndMatchDataIdIn(summoner: Summoner, matchIds: java.util.List[Long]): java.util.List[DiagnosisHistory]
@org.springframework.data.jpa.repository.EntityGraph(value = "DiagnosisHistory.matchData", `type` = EntityGraphType.LOAD)
def findTop50BySummonerOrderByGameCreatedDesc(summoner: Summoner): java.util.List[DiagnosisHistory]
def findTop100BySummonerOrderByGameCreatedDesc(summoner: Summoner): java.util.List[DiagnosisHistory]
def findTop100BySummonerAndGameCreatedLessThanEqualOrderByGameCreatedDesc(summoner: Summoner, gameCreated: DateTime): java.util.List[DiagnosisHistory]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment