public static boolean hasDomain(String userName) {
    return (ServiceUtils.indexOfDomainMatch(userName) > 0);
  }
Check for a domain part in the provided username.
<br>
<b>Example:</b>
<br>
<pre>
LdapUtils.hasDomain("user1@mycorp.com") = true
LdapUtils.hasDomain("user1")            = false
</pre>
@param userName username
@return true if {@code userName} contains {@code @<domain>} part
service/src/java/org/apache/hive/service/auth/ldap/LdapUtils.java