/** * Retrieves the groupId where the members belongs to. * * @param studyId study id. * @param members List of user ids. * @return the group id of the user. Null if the user does not take part of any group. * @throws CatalogException when there is any database error. */ QueryResult<Group> getGroupBelonging(long studyId, List<String> members) throws CatalogException { return studyDBAdaptor.getGroup(studyId, null, members); }
public DBIterator<Sample> indexSolr(Query query) throws CatalogException { return sampleDBAdaptor.iterator(query, null, null); } }
public Long getStudyId(long jobId) throws CatalogException { return jobDBAdaptor.getStudyId(jobId); }
@Override public QueryResult groupBy(Query query, String field, QueryOptions options) throws CatalogDBException { filterOutDeleted(query); Bson bsonQuery = parseQuery(query, false); return groupBy(fileCollection, bsonQuery, field, QueryParams.NAME.key(), options); }
public Long getStudyId(long cohortId) throws CatalogException { return cohortDBAdaptor.getStudyId(cohortId); }
public String getOwner(long projectId) throws CatalogException { return projectDBAdaptor.getOwnerId(projectId); }
public String getProjectId(long studyId) throws CatalogException { return studyDBAdaptor.getProjectIdByStudyUid(studyId); }
default void checkId(long interpretationId) throws CatalogDBException { if (interpretationId < 0) { throw CatalogDBException.newInstance("Interpretation id '{}' is not valid: ", interpretationId); } if (!exists(interpretationId)) { throw CatalogDBException.newInstance("Interpretation id '{}' does not exist", interpretationId); } }
default void checkUid(long panelUid) throws CatalogDBException { if (panelUid < 0) { throw CatalogDBException.newInstance("Panel uid '{}' is not valid: ", panelUid); } if (!exists(panelUid)) { throw CatalogDBException.newInstance("Panel uid '{}' does not exist", panelUid); } }
default void checkId(long jobId) throws CatalogDBException { if (jobId < 0) { throw CatalogDBException.newInstance("Job id '{}' is not valid: ", jobId); } if (!exists(jobId)) { throw CatalogDBException.newInstance("Job id '{}' does not exist", jobId); } }
default void checkId(long cohortId) throws CatalogDBException { if (cohortId < 0) { throw CatalogDBException.newInstance("Cohort id '{}' is not valid: ", cohortId); } if (!exists(cohortId)) { throw CatalogDBException.newInstance("Cohort id '{}' does not exist", cohortId); } }
default void checkId(long sampleId) throws CatalogDBException { if (sampleId < 0) { throw CatalogDBException.newInstance("Sample id '{}' is not valid: ", sampleId); } if (!exists(sampleId)) { throw CatalogDBException.newInstance("Sample id '{}' does not exist", sampleId); } }
default void checkId(long studyId) throws CatalogDBException { if (studyId < 0) { throw CatalogDBException.newInstance("Study id '{}' is not valid: ", studyId); } Long count = exists(studyId); if (count <= 0) { throw CatalogDBException.newInstance("Study id '{}' does not exist", studyId); } else if (count > 1) { throw CatalogDBException.newInstance("'{}' documents found with the Study id '{}'", count, studyId); } }