Implements createQuery to AbstractDAO