Implemented the generic method to query using object filter