engine: Use specific method to find query class

Change-Id: I455aa90280ba71bd3ec2731f34a2f277b7b86d3d
Signed-off-by: Moti Asayag <masayag@redhat.com>