public Query findUserDnByRdn(String userRdn) {
    return Query.builder()
        .filter("(&(|<classes:{ class |(objectClass=<class>)}>)"
            + "(<userRdn>))")
        .limit(2)
        .map("classes", USER_OBJECT_CLASSES)
        .map("userRdn", userRdn)
        .build();
  }
Returns a query for finding user DN based on user RDN.
@param userRdn user RDN
@return an instance of {@link Query}
service/src/java/org/apache/hive/service/auth/ldap/QueryFactory.java