public List<GWTJahiaNode> searchSQL(String searchString, int limit, List<String> nodeTypes, List<String> mimeTypes,
List<String> filters, List<String> fields,boolean sortOnDisplayName) throws GWTJahiaServiceException {
List<GWTJahiaNode> gwtJahiaNodes = search.searchSQL(searchString, limit, nodeTypes, mimeTypes, filters, fields,
retrieveCurrentSession());
if (sortOnDisplayName) {
final Collator collator = Collator.getInstance(retrieveCurrentSession().getLocale());
Collections.sort(gwtJahiaNodes, new Comparator<GWTJahiaNode>() {
public int compare(GWTJahiaNode o1, GWTJahiaNode o2) {
return collator.compare(o1.getDisplayName(), o2.getDisplayName());
}
});
}
return gwtJahiaNodes;
}