def query(template_or_hql, *path)
      String === template_or_hql ? query_hql(template_or_hql) : query_template(template_or_hql, path)
    end
def query(template_or_hql, *path)
      String === template_or_hql ? query_hql(template_or_hql) : query_template(template_or_hql, path)
    end
Creates a new PersistenceService with the specified application service name and options.

 @param [String] the caBIG application service name
 @param [{Symbol => Object}] opts the options
 @option opts [String] :host the service host (default +localhost+)
 @option opts [String] :version the caTissue version identifier
 Database access methods 
 Returns an array of objects fetched from the database which match the given template_or_hql.

 If template_or_hql is a String, then the HQL is submitted to the service.

 Otherwise, the template_or_hql is a query template domain
 object following the given attribute path. The query condition is determined by the values set in the
 template. Every non-nil attribute in the template is used as a select condition.

 @quirk caCORE this method returns the direct result of calling the +caCORE+ application service
   search method. Calling reference attributes of this result is broken by +caCORE+ design.