code: @SuppressWarnings("unchecked")
      public LdapUser getLdapUser(final String username) {
          final Query query = pm.newQuery(LdapUser.class, "username == :username");
          final List<LdapUser> result = (List<LdapUser>) query.execute(username);
          return Collections.isEmpty(result) ? null : result.get(0);
      }
docs: Retrieves an LdapUser containing the specified username. If the username
  does not exist, returns null.
  @param username The username to retrieve
  @return an LdapUser
  @since 1.0.0