public ZSearchFolder modifySearchFolder(String id, String query, String types, SortBy sortBy) throws ServiceException {
public ZSearchFolder modifySearchFolder(String id, String query, String types, SearchSortBy sortBy) throws ServiceException {
    public ZSearchFolder modifySearchFolder(String id, String query, String types, SortBy sortBy) throws ServiceException {        XMLElement req = new XMLElement(MailService.MODIFY_SEARCH_FOLDER_REQUEST);        Element folderEl = req.addElement(MailService.E_SEARCH);        folderEl.addAttribute(MailService.A_ID, id);        if (query != null) folderEl.addAttribute(MailService.A_QUERY, query);        if (types != null) folderEl.addAttribute(MailService.A_SEARCH_TYPES, types);        if (sortBy != null) folderEl.addAttribute(MailService.A_SORTBY, sortBy.name());        invoke(req);        // this assumes notifications will modify the search folder        return getSearchFolderById(id);    }