Changed toString method to toQueryString for query related classes