default boolean exists(long jobId) throws CatalogDBException { return count(new Query(QueryParams.UID.key(), jobId)).first() > 0; }
QueryResult<Long> count = jobDBAdaptor.count(runningJobsQuery); logger.debug("Checking running jobs. {} running jobs found", count.first()); } catch (CatalogException e) { QueryResult<Long> count = jobDBAdaptor.count(queuedJobsQuery); logger.debug("Checking queued jobs. {} jobs found", count.first()); } catch (CatalogException e) { QueryResult<Long> count = jobDBAdaptor.count(preparedJobsQuery); logger.debug("Checking prepared jobs. {} jobs found", count.first()); } catch (CatalogException e) {
@Override public QueryResult<Job> count(String studyStr, Query query, String sessionId) throws CatalogException { query = ParamUtils.defaultObject(query, Query::new); String userId = userManager.getUserId(sessionId); Study study = catalogManager.getStudyManager().resolveId(studyStr, userId); fixQueryObject(study, query, sessionId); query.append(JobDBAdaptor.QueryParams.STUDY_UID.key(), study.getUid()); QueryResult<Long> queryResultAux = jobDBAdaptor.count(query, userId, StudyAclEntry.StudyPermissions.VIEW_JOBS); return new QueryResult<>("count", queryResultAux.getDbTime(), 0, queryResultAux.first(), queryResultAux.getWarningMsg(), queryResultAux.getErrorMsg(), Collections.emptyList()); }
return true; if (jobDBAdaptor.count(query).first() > 0) { return true;
studySummary.setSamples(nSamples); Long nJobs = jobDBAdaptor.count( new Query(JobDBAdaptor.QueryParams.STUDY_UID.key(), study.getUid()) .append(JobDBAdaptor.QueryParams.STATUS_NAME.key(), "!=" + File.FileStatus.TRASHED + ";!="