Query jobs by name

@param name         Name of the job to query for
@param resultsLimit Max # of results to return
@return List of jobs with the name (empty list if none can be found)
179854
public List<JobExecutionInfo> queryByJobName(String name, int resultsLimit) throws RemoteInvocationException {
    JobExecutionQuery query = new JobExecutionQuery();
    query.setIdType(QueryIdTypeEnum.JOB_NAME);
    query.setId(JobExecutionQuery.Id.create(name));
    query.setIncludeTaskExecutions(false);
    query.setLimit(resultsLimit);

    return executeQuery(query);
  }
811922
@Override
    public Query createNamedQuery(String name)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            Tr.debug(tc, "em.createNamedQuery(" + name + ");\n" + toString());

        return getEMInvocationInfo(false).createNamedQuery(name);
    }
200865
public void setName(String name) {

    if (name == null || name.trim().length() == 0) {
      throw new IllegalArgumentException("Job name cannot be empty.");
    }

    this.name = name;
  }
568425
public FunctionList name(final String name) {
        return filter(new Filter() {
            public boolean keep(Function m) {
                return m.getName().equals(name);
            }
        });
    }
845468
public Job createJob(String query) {
    // [START ]
    Job job = null;
    JobConfiguration jobConfiguration = QueryJobConfiguration.of(query);
    JobInfo jobInfo = JobInfo.of(jobConfiguration);
    try {
      job = bigquery.create(jobInfo);
    } catch (BigQueryException e) {
      // the job was not created
    }
    // [END ]
    return job;
  }
492203
def get_jobs(self, job_ids = None):
    """"""
    if job_ids is not None and len(job_ids) == 0:
      return []
    q = self.session.query(Job)
    if job_ids is not None:
      q = q.filter(Job.unique.in_(job_ids))
    return sorted(list(q), key=lambda job: job.unique)
1297670
public void setName (final String name)
  {
    if (name == null || name.trim ().length () == 0)
    {
      throw new IllegalArgumentException ("Job name cannot be empty.");
    }

    m_sName = name;
    m_aKey = null;
  }
1319536
public JobResult job(String jobname) {
        HttpGet getRequest = new HttpGet(baseUrl + "job/" + jobname);
        getRequest.addHeader("Accept", "application/xml");
        return jobResult(getRequest);
    }
751982
public String queryParam(String name) {
		List<String> values = queryParams.get(name);
		return (values == null) ? null : values.get(0);
	}
80248
public Collection<Method> getAllMethods(String name) {
        final Map<ParamList, Map<Class<?>, Method>> nameMap = methods.get(name);
        if (nameMap == null) {
            return Collections.emptySet();
        }
        final Collection<Method> methods = new ArrayList<Method>();
        for (Map<Class<?>, Method> map : nameMap.values()) {
            methods.addAll(map.values());
        }
        return methods;
    }
620983
public List<String> getParameters(String name) {
		return Collections.unmodifiableList(parameters.get(name));
	}
98703
def run_query(self, collection_name, query):
        
        cursor = self.ds.filter(collection_name, query)
        return [Job.from_json(document) for document in cursor]
740988
@Deprecated
    public ListJobsResponse listJobs(String pipelineName) {
        ListJobsRequest request = new ListJobsRequest();
        request.setPipelineName(pipelineName);
        return listJobs(request);
    }
513172
public <T extends DataObject> List<T> getResults(String name, DataObject object) throws Exception {
        @SuppressWarnings("unchecked")
        ObjectMappedQuery<T> statement = (ObjectMappedQuery<T>)_statements.get(name);
        if (statement != null) {
            return statement.getResults(DataSourceUtils.getConnection(_dataSource), object);
        } else {
            throw new RuntimeException("ObjectMappedQuery '" + name + "' not found");
        }
    }
343617
public List<Extensions> queryByExtension(String extensionName)
			throws SQLException {

		QueryBuilder<Extensions, Void> qb = queryBuilder();

		setUniqueWhere(qb.where(), extensionName, false, null, false, null);

		List<Extensions> extensions = qb.query();

		return extensions;
	}
359896
public Job getJob(String name) {
        //FIXME: Check for null of jobs? Can that happen?
        return jobs.stream()
            .map(SET_CLIENT(this.client))
            .filter(item -> item.getName().equals(name))
            .findAny()
            .orElseThrow(() -> new IllegalArgumentException("Job with name " + name + " does not exist."));
    }
28863
@Override
    public List<JobInstance> getJobs(Query query)
    {
        return JqmClientFactory.getClient().getJobs(query);
    }