I think that you need extend querytask class:
http://serverx.esri.com/ESRIBlogs/blogs/arcgisserver/archive/2007/05/03/Follow_2D00_up-to-Extending-...
but I advise you don't use adf because it's deprecated see http://blogs.esri.com/esri/arcgis/2011/09/30/update-to-arcgis-10-and-10-1-deprecation-plan/