Added support to define a result class for native query.