News for hackers. Stuff that matters.
Re:Why Scala seems difficult but really isn’t by pdhborges on Wednesday June 22, 2011 @11:26AM (#2683514)
Here is the Java version:

  public boolean domainExists(String domain) {
    return Option.of((Domain) HibernateUtil.getSession().getNamedQuery("domain.findByName").setParameter("name", domain.trim().toLowerCase()).uniqueResult()).getOrElse(new Domain()).id > 0;
  }

There are no comments on this comment yet.