示例#1
0
  public SeasonalAthlete getMostRecentSeasonalAthlete() {

    return Query.from(SeasonalAthlete.class)
        .where("athlete = ? && year <= ?", this, StatsUtils.determineSeason(new Date()))
        .sortDescending("year")
        .first();
  }
示例#2
0
  public SeasonalAthlete getCurrentSeasonalAthlete() {

    return Query.from(SeasonalAthlete.class)
        .where("athlete = ? && year = ?", this, StatsUtils.determineSeason(new Date()))
        .first();
  }