예제 #1
1
  @Override
  public Set<HomeInvite> findAllAvailableInvites(String invitee) {
    String q;
    if (configCore.useEbeanSearchLower())
      q = "find homeInvite where lower(invitedPlayer) = lower(:invitee)";
    else q = "find homeInvite where invitedPlayer = :invitee";

    Query<HomeInvite> query = ebean.createQuery(HomeInvite.class, q);
    query.setParameter("invitee", invitee);

    return query.findSet();
  }
예제 #2
0
  @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();
  }