public Query customQuery(String searchFilter) {
    Query.QueryBuilder builder = Query.builder();
    builder.filter(searchFilter);
    if (!Strings.isNullOrEmpty(groupMembershipAttr)) {
      builder.returnAttribute(groupMembershipAttr);
    }
    return builder.build();
  }
Returns a query object created for the custom filter.
<br>
This query is configured to return a group membership attribute as part of the search result.
@param searchFilter custom search filter
@return an instance of {@link Query}
service/src/java/org/apache/hive/service/auth/ldap/QueryFactory.java