@Test @RunWithCustomExecutor public void givenTestFindAllThenReturnEmpty() throws Exception { VitamThreadUtils.getVitamSession().setTenantId(TENANT_ID); final RequestResponseOK<OntologyModel> ontologyModelList = ontologyService.findOntologies(JsonHandler.createObjectNode()); assertThat(ontologyModelList.getResults()).isEmpty(); }
@Override public RequestResponseOK<OntologyModel> findOntologies(JsonNode queryDsl) throws ReferentialException, InvalidParseOperationException { try (DbRequestResult result = mongoAccess.findDocuments(queryDsl, FunctionalAdminCollections.ONTOLOGY)) { return result.getRequestResponseOK(queryDsl, Ontology.class, OntologyModel.class); } }
OntologyServiceImpl implements OntologyService { @Override public RequestResponseOK<OntologyModel> findOntologies(JsonNode queryDsl) throws ReferentialException, InvalidParseOperationException { try (DbRequestResult result = mongoAccess.findDocuments(queryDsl, FunctionalAdminCollections.ONTOLOGY)) { return result.getRequestResponseOK(queryDsl, Ontology.class, OntologyModel.class); } } }
OntologyServiceImpl implements OntologyService { @Override public RequestResponseOK<OntologyModel> findOntologies(JsonNode queryDsl) throws ReferentialException, InvalidParseOperationException { try (DbRequestResult result = mongoAccess.findDocuments(queryDsl, FunctionalAdminCollections.ONTOLOGY)) { return result.getRequestResponseOK(queryDsl, Ontology.class, OntologyModel.class); } } OntologyServiceImpl(MongoDbAccessAdminImpl mongoAccess, FunctionalBackupService functionalBackupService); }
OntologyServiceImpl implements OntologyService { @Override public RequestResponseOK<OntologyModel> findOntologies(JsonNode queryDsl) throws ReferentialException, InvalidParseOperationException { try (DbRequestResult result = mongoAccess.findDocuments(queryDsl, FunctionalAdminCollections.ONTOLOGY)) { return result.getRequestResponseOK(queryDsl, Ontology.class, OntologyModel.class); } } OntologyServiceImpl(MongoDbAccessAdminImpl mongoAccess, FunctionalBackupService functionalBackupService); @Override RequestResponse<OntologyModel> importOntologies(boolean forceUpdate, List<OntologyModel> ontologyModelList); @Override RequestResponseOK<OntologyModel> findOntologiesForCache(JsonNode queryDsl); @Override RequestResponseOK<OntologyModel> findOntologies(JsonNode queryDsl); @Override void close(); }
OntologyServiceImpl implements OntologyService { @Override public RequestResponseOK<OntologyModel> findOntologies(JsonNode queryDsl) throws ReferentialException, InvalidParseOperationException { try (DbRequestResult result = mongoAccess.findDocuments(queryDsl, FunctionalAdminCollections.ONTOLOGY)) { return result.getRequestResponseOK(queryDsl, Ontology.class, OntologyModel.class); } } OntologyServiceImpl(MongoDbAccessAdminImpl mongoAccess, FunctionalBackupService functionalBackupService); @Override RequestResponse<OntologyModel> importOntologies(boolean forceUpdate, List<OntologyModel> ontologyModelList); @Override RequestResponseOK<OntologyModel> findOntologiesForCache(JsonNode queryDsl); @Override RequestResponseOK<OntologyModel> findOntologies(JsonNode queryDsl); @Override void close();  }