@Override public Set<HomeInvite> findInvitesByHome(Home home) { String q = "find homeInvite where home = :home"; Query<HomeInvite> query = ebean.createQuery(HomeInvite.class, q); query.setParameter("home", home.getId()); return query.findSet(); }
@Override public HomeInvite findInviteByHomeAndInvitee(Home home, String invitee) { String q; if (configCore.useEbeanSearchLower()) q = "find homeInvite where home = :home and lower(invitedPlayer) = lower(:invitee)"; else q = "find homeInvite where home = :home and invitedPlayer = :invitee"; Query<HomeInvite> query = ebean.createQuery(HomeInvite.class, q); query.setParameter("home", home.getId()); query.setParameter("invitee", invitee); return query.findUnique(); }