removed duplicated code
added a queryDTO object to compare by specific string hash.
Finish SDS-298-4-generate-query-hash-feature