def query_hql(hql)
      logger.debug { "Building HQLCriteria..." }
      criteria = HQLCriteria.new(hql)
      target = hql[/from\s+(\S+)/i, 1]
      raise DatabaseError.new("HQL does not contain a FROM clause: #{hql}") unless target
      logger.debug { "Submitting search on target class #{target} with the following HQL:\n  #{hql}" }
      begin
        dispatch { |svc| svc.query(criteria, target) }
      rescue Exception => e
        logger.error("Error querying on HQL - #{$!}:\n#{hql}")
        raise e
      end
    end
def query_hql(hql)
      logger.debug { "Building HQLCriteria..." }
      criteria = HQLCriteria.new(hql)
      target = hql[/from\s+(\S+)/i, 1]
      raise DatabaseError.new("HQL does not contain a FROM clause: #{hql}") unless target
      logger.debug { "Submitting search on target class #{target} with the following HQL:\n  #{hql}" }
      begin
        dispatch { |svc| svc.query(criteria, target) }
      rescue Exception => e
        logger.error("Error querying on HQL - #{$!}:\n#{hql}")
        raise e
      end
    end
Dispatches the given HQL to the application service.

 @quirk caCORE query target parameter is necessary for caCORE 3.x but deprecated in caCORE 4+.

 @param [String] hql the HQL to submit