Search in sources :

Example 96 with User

use of de.symeda.sormas.backend.user.User in project SORMAS-Project by hzi-braunschweig.

the class VisitFacadeEjb method getIndexList.

@Override
public List<VisitIndexDto> getIndexList(VisitCriteria visitCriteria, Integer first, Integer max, List<SortProperty> sortProperties) {
    if (visitCriteria == null || visitCriteria.isEmpty()) {
        // Retrieving an index list independent of a contact/case is not possible
        return new ArrayList<>();
    }
    CriteriaBuilder cb = em.getCriteriaBuilder();
    CriteriaQuery<VisitIndexDto> cq = cb.createQuery(VisitIndexDto.class);
    Root<Visit> visit = cq.from(Visit.class);
    Join<Visit, Symptoms> symptoms = visit.join(Visit.SYMPTOMS, JoinType.LEFT);
    Join<Visit, Case> caseJoin = visit.join(Visit.CAZE, JoinType.LEFT);
    Join<Visit, Contact> contactJoin = visit.join(Visit.CONTACTS, JoinType.LEFT);
    Join<Visit, User> visitUser = visit.join(Visit.VISIT_USER, JoinType.LEFT);
    cq.multiselect(visit.get(Visit.ID), visit.get(Visit.UUID), visit.get(Visit.VISIT_DATE_TIME), visit.get(Visit.VISIT_STATUS), visit.get(Visit.VISIT_REMARKS), visit.get(Visit.DISEASE), symptoms.get(Symptoms.SYMPTOMATIC), symptoms.get(Symptoms.TEMPERATURE), symptoms.get(Symptoms.TEMPERATURE_SOURCE), visit.get(Visit.ORIGIN), visitUser.get(User.UUID), visitUser.get(User.FIRST_NAME), visitUser.get(User.LAST_NAME), jurisdictionSelector(cq, cb, caseJoin, contactJoin));
    cq.distinct(true);
    cq.where(visitService.buildCriteriaFilter(visitCriteria, cb, visit));
    if (sortProperties != null && sortProperties.size() > 0) {
        List<Order> order = new ArrayList<>(sortProperties.size());
        for (SortProperty sortProperty : sortProperties) {
            Expression<?> expression;
            switch(sortProperty.propertyName) {
                case VisitIndexDto.VISIT_DATE_TIME:
                case VisitIndexDto.VISIT_STATUS:
                case VisitIndexDto.VISIT_REMARKS:
                case VisitIndexDto.DISEASE:
                case VisitIndexDto.ORIGIN:
                    expression = visit.get(sortProperty.propertyName);
                    break;
                case VisitIndexDto.SYMPTOMATIC:
                case VisitIndexDto.TEMPERATURE:
                    expression = symptoms.get(sortProperty.propertyName);
                    break;
                default:
                    throw new IllegalArgumentException(sortProperty.propertyName);
            }
            order.add(sortProperty.ascending ? cb.asc(expression) : cb.desc(expression));
        }
        cq.orderBy(order);
    } else {
        cq.orderBy(cb.desc(visit.get(Visit.VISIT_DATE_TIME)));
    }
    List<VisitIndexDto> indexList = QueryHelper.getResultList(em, cq, first, max);
    if (indexList.size() > 0) {
        Pseudonymizer pseudonymizer = Pseudonymizer.getDefault(userService::hasRight, I18nProperties.getCaption(Captions.inaccessibleValue));
        indexList.forEach(visitIndex -> pseudonymizer.pseudonymizeDto(VisitIndexDto.class, visitIndex, visitIndex.getInJurisdiction(), null));
    }
    return indexList;
}
Also used : CriteriaBuilder(javax.persistence.criteria.CriteriaBuilder) Order(javax.persistence.criteria.Order) User(de.symeda.sormas.backend.user.User) Pseudonymizer(de.symeda.sormas.backend.util.Pseudonymizer) ArrayList(java.util.ArrayList) Case(de.symeda.sormas.backend.caze.Case) Contact(de.symeda.sormas.backend.contact.Contact) SortProperty(de.symeda.sormas.api.utils.SortProperty) VisitIndexDto(de.symeda.sormas.api.visit.VisitIndexDto) Symptoms(de.symeda.sormas.backend.symptoms.Symptoms)

Example 97 with User

use of de.symeda.sormas.backend.user.User in project SORMAS-Project by hzi-braunschweig.

the class VaccinationFacadeEjb method pseudonymizeDto.

private void pseudonymizeDto(Vaccination source, VaccinationDto dto, Pseudonymizer pseudonymizer) {
    if (dto != null) {
        boolean inJurisdiction = immunizationService.inJurisdictionOrOwned(source.getImmunization());
        pseudonymizer.pseudonymizeDto(VaccinationDto.class, dto, inJurisdiction, c -> {
            User currentUser = userService.getCurrentUser();
            pseudonymizer.pseudonymizeUser(source.getReportingUser(), currentUser, dto::setReportingUser);
        });
    }
}
Also used : User(de.symeda.sormas.backend.user.User)

Example 98 with User

use of de.symeda.sormas.backend.user.User in project SORMAS-Project by hzi-braunschweig.

the class SormasToSormasCaseFacadeEjbTest method testGetAllShares.

@Test
public void testGetAllShares() throws SormasToSormasException {
    useSurveillanceOfficerLogin(rdcf);
    UserReferenceDto officer = creator.createUser(rdcf, UserRole.SURVEILLANCE_OFFICER).toReference();
    CaseDataDto caze = creator.createCase(officer, creator.createPerson().toReference(), rdcf);
    User officerUser = getUserService().getByReferenceDto(officer);
    ShareRequestInfo shareRequestInfo = createShareRequestInfo(officerUser, SECOND_SERVER_ID, true, ShareRequestStatus.ACCEPTED, i -> i.setCaze(getCaseService().getByReferenceDto(caze.toReference())));
    getShareRequestInfoService().persist(shareRequestInfo);
    Mockito.when(MockProducer.getSormasToSormasClient().post(eq(SECOND_SERVER_ID), eq("/sormasToSormas/cases/shares"), ArgumentMatchers.any(), ArgumentMatchers.any())).thenAnswer(invocation -> {
        SormasToSormasShareInfoDto shareInfo = new SormasToSormasShareInfoDto();
        shareInfo.setTargetDescriptor(new SormasServerDescriptor("dummy SORMAS"));
        shareInfo.setOwnershipHandedOver(true);
        shareInfo.setComment("re-shared");
        return encryptShareDataAsArray(new SormasToSormasShareTree(null, shareInfo, Collections.emptyList(), false));
    });
    List<SormasToSormasShareTree> shares = getSormasToSormasCaseFacade().getAllShares(caze.getUuid());
    assertThat(shares, hasSize(1));
    SormasToSormasShareInfoDto fistShare = shares.get(0).getShare();
    assertThat(fistShare.getTargetDescriptor().getId(), is(SECOND_SERVER_ID));
    assertThat(fistShare.isOwnershipHandedOver(), is(true));
    List<SormasToSormasShareTree> reShares = shares.get(0).getReShares();
    assertThat(reShares, hasSize(1));
    SormasToSormasShareInfoDto reShare = reShares.get(0).getShare();
    assertThat(reShare.getTargetDescriptor().getId(), is("dummy SORMAS"));
    assertThat(reShare.isOwnershipHandedOver(), is(true));
    assertThat(reShare.getComment(), is("re-shared"));
    assertThat(reShares.get(0).getReShares(), hasSize(0));
}
Also used : UserReferenceDto(de.symeda.sormas.api.user.UserReferenceDto) SormasToSormasShareInfoDto(de.symeda.sormas.api.sormastosormas.shareinfo.SormasToSormasShareInfoDto) SormasServerDescriptor(de.symeda.sormas.api.sormastosormas.SormasServerDescriptor) User(de.symeda.sormas.backend.user.User) CaseDataDto(de.symeda.sormas.api.caze.CaseDataDto) ShareRequestInfo(de.symeda.sormas.backend.sormastosormas.share.shareinfo.ShareRequestInfo) SormasToSormasShareTree(de.symeda.sormas.api.sormastosormas.SormasToSormasShareTree) SormasToSormasTest(de.symeda.sormas.backend.sormastosormas.SormasToSormasTest) Test(org.junit.Test)

Example 99 with User

use of de.symeda.sormas.backend.user.User in project SORMAS-Project by hzi-braunschweig.

the class SormasToSormasCaseFacadeEjbTest method testGetAllSharesOnMiddleLevel.

@Test
public void testGetAllSharesOnMiddleLevel() throws SormasToSormasException {
    useSurveillanceOfficerLogin(rdcf);
    UserReferenceDto officer = creator.createUser(rdcf, UserRole.SURVEILLANCE_OFFICER).toReference();
    CaseDataDto caze = creator.createCase(officer, creator.createPerson().toReference(), rdcf, c -> {
        SormasToSormasOriginInfoDto originInfo = new SormasToSormasOriginInfoDto();
        originInfo.setSenderName("Test Name");
        originInfo.setOrganizationId(DEFAULT_SERVER_ID);
        originInfo.setOwnershipHandedOver(true);
        originInfo.setComment("first share");
        c.setSormasToSormasOriginInfo(originInfo);
    });
    // initial share by the creator of case
    SormasToSormasShareInfoDto shareToSecond = createShareInfoDto(officer, SECOND_SERVER_ID, true);
    // another share by the creator
    SormasToSormasShareInfoDto anotherShareFromDefault = createShareInfoDto(officer, "anotherShareFromDefault", false);
    // forwarded by the second system
    User officerUser = getUserService().getByReferenceDto(officer);
    ShareRequestInfo shareFromSecond = createShareRequestInfo(officerUser, "shareFromSecond", false, ShareRequestStatus.ACCEPTED, i -> i.setCaze(getCaseService().getByReferenceDto(caze.toReference())));
    getShareRequestInfoService().persist(shareFromSecond);
    // The share tree for the above code is:
    // |- default
    // |- second
    // |- shareFromSecond
    // |- another from default
    mockSecondServerAccess();
    // mock share tree on the case creator system
    Mockito.when(MockProducer.getSormasToSormasClient().post(eq(DEFAULT_SERVER_ID), eq("/sormasToSormas/cases/shares"), ArgumentMatchers.any(), ArgumentMatchers.any())).thenAnswer(invocation -> {
        List<SormasToSormasShareTree> shareTrees = new ArrayList<>();
        shareTrees.add(new SormasToSormasShareTree(null, shareToSecond, Collections.emptyList(), false));
        shareTrees.add(new SormasToSormasShareTree(null, anotherShareFromDefault, Collections.emptyList(), false));
        return encryptShareData(shareTrees);
    });
    // Mock shares from "anotherShareFromDefault" -> no more shares
    Mockito.when(MockProducer.getSormasToSormasClient().post(eq("anotherShareFromDefault"), eq("/sormasToSormas/cases/shares"), ArgumentMatchers.any(), ArgumentMatchers.any())).thenAnswer(invocation -> encryptShareData(Collections.emptyList()));
    // Mock shares from "shareFromSecond" server -> no more shares
    Mockito.when(MockProducer.getSormasToSormasClient().post(eq("shareFromSecond"), eq("/sormasToSormas/cases/shares"), ArgumentMatchers.any(), ArgumentMatchers.any())).thenAnswer(invocation -> encryptShareData(Collections.emptyList()));
    List<SormasToSormasShareTree> shares = getSormasToSormasCaseFacade().getAllShares(caze.getUuid());
    assertThat(shares, hasSize(2));
    SormasToSormasShareInfoDto fistShare = shares.get(0).getShare();
    assertThat(fistShare.getTargetDescriptor().getId(), is(SECOND_SERVER_ID));
    assertThat(fistShare.isOwnershipHandedOver(), is(true));
    List<SormasToSormasShareTree> reShares = shares.get(0).getReShares();
    assertThat(reShares, hasSize(1));
    SormasToSormasShareInfoDto reShare = reShares.get(0).getShare();
    assertThat(reShare.getTargetDescriptor().getId(), is("shareFromSecond"));
    assertThat(reShare.isOwnershipHandedOver(), is(false));
    assertThat(reShares.get(0).getReShares(), hasSize(0));
    SormasToSormasShareTree secondReShareFromDefault = shares.get(1);
    assertThat(secondReShareFromDefault.getShare().getTargetDescriptor().getId(), is("anotherShareFromDefault"));
    assertThat(secondReShareFromDefault.getShare().isOwnershipHandedOver(), is(false));
    assertThat(secondReShareFromDefault.getReShares(), hasSize(0));
}
Also used : UserReferenceDto(de.symeda.sormas.api.user.UserReferenceDto) SormasToSormasShareInfoDto(de.symeda.sormas.api.sormastosormas.shareinfo.SormasToSormasShareInfoDto) User(de.symeda.sormas.backend.user.User) CaseDataDto(de.symeda.sormas.api.caze.CaseDataDto) ShareRequestInfo(de.symeda.sormas.backend.sormastosormas.share.shareinfo.ShareRequestInfo) ArrayList(java.util.ArrayList) SormasToSormasOriginInfoDto(de.symeda.sormas.api.sormastosormas.SormasToSormasOriginInfoDto) SormasToSormasShareTree(de.symeda.sormas.api.sormastosormas.SormasToSormasShareTree) SormasToSormasTest(de.symeda.sormas.backend.sormastosormas.SormasToSormasTest) Test(org.junit.Test)

Example 100 with User

use of de.symeda.sormas.backend.user.User in project SORMAS-Project by hzi-braunschweig.

the class SormasToSormasCaseFacadeEjbTest method testSaveReturnedCase.

@Test
public void testSaveReturnedCase() throws SormasToSormasException {
    UserReferenceDto officer = creator.createUser(rdcf, UserRole.SURVEILLANCE_OFFICER).toReference();
    PersonDto person = creator.createPerson();
    CaseDataDto caze = creator.createCase(officer, person.toReference(), rdcf);
    PersonDto sharedContactPerson = creator.createPerson();
    ContactDto sharedContact = creator.createContact(officer, sharedContactPerson.toReference(), caze);
    PersonDto newContactPerson = creator.createPerson();
    ContactDto newContact = createContactRemoteContact(officer, newContactPerson.toReference(), caze);
    ContactDto newContact2 = createContactRemoteContact(officer, newContactPerson.toReference(), caze);
    SampleDto sharedSample = creator.createSample(caze.toReference(), officer, rdcf.facility);
    SampleDto newSample = createRemoteSample(caze.toReference(), officer, rdcf.facility);
    SampleDto newSample2 = createRemoteSample(caze.toReference(), officer, rdcf.facility);
    User officerUser = getUserService().getByReferenceDto(officer);
    getShareRequestInfoService().persist(createShareRequestInfo(officerUser, DEFAULT_SERVER_ID, true, i -> i.setCaze(getCaseService().getByReferenceDto(caze.toReference()))));
    getShareRequestInfoService().persist(createShareRequestInfo(officerUser, DEFAULT_SERVER_ID, true, i -> i.setContact(getContactService().getByReferenceDto(sharedContact.toReference()))));
    getShareRequestInfoService().persist(createShareRequestInfo(officerUser, DEFAULT_SERVER_ID, true, i -> i.setSample(getSampleService().getByReferenceDto(sharedSample.toReference()))));
    caze.setQuarantine(QuarantineType.HOTEL);
    Calendar calendar = Calendar.getInstance();
    calendar.setTime(caze.getChangeDate());
    calendar.add(Calendar.DAY_OF_MONTH, 1);
    caze.setChangeDate(calendar.getTime());
    SormasToSormasOriginInfoDto originInfo = createSormasToSormasOriginInfo(DEFAULT_SERVER_ID, true);
    SormasToSormasDto shareData = new SormasToSormasDto();
    shareData.setOriginInfo(originInfo);
    shareData.setCases(Collections.singletonList(new SormasToSormasCaseDto(person, caze)));
    shareData.setContacts(Arrays.asList(new SormasToSormasContactDto(sharedContactPerson, sharedContact), new SormasToSormasContactDto(newContactPerson, newContact), new SormasToSormasContactDto(newContactPerson, newContact2)));
    shareData.setSamples(Arrays.asList(new SormasToSormasSampleDto(sharedSample, Collections.emptyList(), Collections.emptyList()), new SormasToSormasSampleDto(newSample, Collections.emptyList(), Collections.emptyList()), new SormasToSormasSampleDto(newSample2, Collections.emptyList(), Collections.emptyList())));
    SormasToSormasEncryptedDataDto encryptedData = encryptShareData(shareData);
    try {
        getSormasToSormasCaseFacade().saveSharedEntities(encryptedData);
    } catch (Exception e) {
        e.printStackTrace();
    }
    CaseDataDto returnedCase = getCaseFacade().getCaseDataByUuid(caze.getUuid());
    assertThat(returnedCase.getQuarantine(), is(QuarantineType.HOTEL));
    assertThat(returnedCase.getReportingUser(), is(officer));
    List<SormasToSormasShareInfoDto> caseShares = getSormasToSormasShareInfoFacade().getIndexList(new SormasToSormasShareInfoCriteria().caze(caze.toReference()), 0, 100);
    assertThat(caseShares.get(0).isOwnershipHandedOver(), is(false));
    List<SormasToSormasShareInfoDto> contactShares = getSormasToSormasShareInfoFacade().getIndexList(new SormasToSormasShareInfoCriteria().contact(sharedContact.toReference()), 0, 100);
    assertThat(contactShares.get(0).isOwnershipHandedOver(), is(false));
    ContactDto returnedNewContact = getContactFacade().getByUuid(newContact.getUuid());
    assertThat(returnedNewContact.getSormasToSormasOriginInfo().isOwnershipHandedOver(), is(true));
    ContactDto returnedNewContact2 = getContactFacade().getByUuid(newContact.getUuid());
    assertThat(returnedNewContact2.getSormasToSormasOriginInfo().isOwnershipHandedOver(), is(true));
    List<SormasToSormasShareInfoDto> sampleShares = getSormasToSormasShareInfoFacade().getIndexList(new SormasToSormasShareInfoCriteria().sample(sharedSample.toReference()), 0, 100);
    assertThat(sampleShares.get(0).isOwnershipHandedOver(), is(false));
    SampleDto returnedNewSample = getSampleFacade().getSampleByUuid(newSample.getUuid());
    assertThat(returnedNewSample.getSormasToSormasOriginInfo().isOwnershipHandedOver(), is(true));
    SampleDto returnedNewSample2 = getSampleFacade().getSampleByUuid(newSample.getUuid());
    assertThat(returnedNewSample2.getSormasToSormasOriginInfo().isOwnershipHandedOver(), is(true));
}
Also used : Arrays(java.util.Arrays) SormasToSormasShareTree(de.symeda.sormas.api.sormastosormas.SormasToSormasShareTree) ArgumentMatchers(org.mockito.ArgumentMatchers) SormasToSormasOriginInfoDto(de.symeda.sormas.api.sormastosormas.SormasToSormasOriginInfoDto) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) Date(java.util.Date) SormasToSormasSampleDto(de.symeda.sormas.api.sormastosormas.sample.SormasToSormasSampleDto) SormasToSormasOptionsDto(de.symeda.sormas.api.sormastosormas.SormasToSormasOptionsDto) ExposureType(de.symeda.sormas.api.exposure.ExposureType) PersonDto(de.symeda.sormas.api.person.PersonDto) PortHealthInfoDto(de.symeda.sormas.api.caze.porthealthinfo.PortHealthInfoDto) YesNoUnknown(de.symeda.sormas.api.utils.YesNoUnknown) Matchers.nullValue(org.hamcrest.Matchers.nullValue) PointOfEntryType(de.symeda.sormas.api.infrastructure.pointofentry.PointOfEntryType) UserRole(de.symeda.sormas.api.user.UserRole) AnimalContactType(de.symeda.sormas.api.exposure.AnimalContactType) PointOfEntryDto(de.symeda.sormas.api.infrastructure.pointofentry.PointOfEntryDto) SormasToSormasTest(de.symeda.sormas.backend.sormastosormas.SormasToSormasTest) SormasToSormasShareInfoCriteria(de.symeda.sormas.api.sormastosormas.shareinfo.SormasToSormasShareInfoCriteria) Matchers.notNullValue(org.hamcrest.Matchers.notNullValue) FacilityType(de.symeda.sormas.api.infrastructure.facility.FacilityType) CaseDataDto(de.symeda.sormas.api.caze.CaseDataDto) SormasToSormasException(de.symeda.sormas.api.sormastosormas.SormasToSormasException) ShareTreeCriteria(de.symeda.sormas.api.sormastosormas.ShareTreeCriteria) List(java.util.List) User(de.symeda.sormas.backend.user.User) Response(javax.ws.rs.core.Response) EpiDataDto(de.symeda.sormas.api.epidata.EpiDataDto) ContactDto(de.symeda.sormas.api.contact.ContactDto) SormasToSormasDto(de.symeda.sormas.api.sormastosormas.SormasToSormasDto) SormasToSormasContactDto(de.symeda.sormas.api.sormastosormas.contact.SormasToSormasContactDto) Matchers.is(org.hamcrest.Matchers.is) ShareRequestInfo(de.symeda.sormas.backend.sormastosormas.share.shareinfo.ShareRequestInfo) MockitoJUnitRunner(org.mockito.junit.MockitoJUnitRunner) SamplePurpose(de.symeda.sormas.api.sample.SamplePurpose) SormasServerDescriptor(de.symeda.sormas.api.sormastosormas.SormasServerDescriptor) Matchers.arrayWithSize(org.hamcrest.Matchers.arrayWithSize) MockProducer(de.symeda.sormas.backend.MockProducer) FacilityDto(de.symeda.sormas.api.infrastructure.facility.FacilityDto) SormasToSormasValidationException(de.symeda.sormas.api.sormastosormas.validation.SormasToSormasValidationException) SormasToSormasShareInfoDto(de.symeda.sormas.api.sormastosormas.shareinfo.SormasToSormasShareInfoDto) RunWith(org.junit.runner.RunWith) PersonReferenceDto(de.symeda.sormas.api.person.PersonReferenceDto) TestDataCreator(de.symeda.sormas.backend.TestDataCreator) ArrayList(java.util.ArrayList) CaseReferenceDto(de.symeda.sormas.api.caze.CaseReferenceDto) QuarantineType(de.symeda.sormas.api.contact.QuarantineType) SormasToSormasEncryptedDataDto(de.symeda.sormas.api.sormastosormas.SormasToSormasEncryptedDataDto) Calendar(java.util.Calendar) SymptomState(de.symeda.sormas.api.symptoms.SymptomState) Matchers.hasSize(org.hamcrest.Matchers.hasSize) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) DataHelper(de.symeda.sormas.api.utils.DataHelper) ContactStatus(de.symeda.sormas.api.contact.ContactStatus) SormasToSormasShareRequestDto(de.symeda.sormas.api.sormastosormas.sharerequest.SormasToSormasShareRequestDto) UserDto(de.symeda.sormas.api.user.UserDto) Matchers.isEmptyString(org.hamcrest.Matchers.isEmptyString) Test(org.junit.Test) CaseOrigin(de.symeda.sormas.api.caze.CaseOrigin) ShareRequestStatus(de.symeda.sormas.api.sormastosormas.sharerequest.ShareRequestStatus) FacilityReferenceDto(de.symeda.sormas.api.infrastructure.facility.FacilityReferenceDto) SormasToSormasConfig(de.symeda.sormas.api.sormastosormas.SormasToSormasConfig) SampleMaterial(de.symeda.sormas.api.sample.SampleMaterial) UserReferenceDto(de.symeda.sormas.api.user.UserReferenceDto) Mockito(org.mockito.Mockito) ExposureDto(de.symeda.sormas.api.exposure.ExposureDto) Disease(de.symeda.sormas.api.Disease) SampleDto(de.symeda.sormas.api.sample.SampleDto) PointOfEntryReferenceDto(de.symeda.sormas.api.infrastructure.pointofentry.PointOfEntryReferenceDto) Collections(java.util.Collections) SormasToSormasCaseDto(de.symeda.sormas.api.sormastosormas.caze.SormasToSormasCaseDto) SormasToSormasEncryptedDataDto(de.symeda.sormas.api.sormastosormas.SormasToSormasEncryptedDataDto) SormasToSormasShareInfoDto(de.symeda.sormas.api.sormastosormas.shareinfo.SormasToSormasShareInfoDto) User(de.symeda.sormas.backend.user.User) SormasToSormasDto(de.symeda.sormas.api.sormastosormas.SormasToSormasDto) CaseDataDto(de.symeda.sormas.api.caze.CaseDataDto) PersonDto(de.symeda.sormas.api.person.PersonDto) Calendar(java.util.Calendar) SormasToSormasSampleDto(de.symeda.sormas.api.sormastosormas.sample.SormasToSormasSampleDto) SormasToSormasShareInfoCriteria(de.symeda.sormas.api.sormastosormas.shareinfo.SormasToSormasShareInfoCriteria) SormasToSormasOriginInfoDto(de.symeda.sormas.api.sormastosormas.SormasToSormasOriginInfoDto) SormasToSormasContactDto(de.symeda.sormas.api.sormastosormas.contact.SormasToSormasContactDto) SormasToSormasCaseDto(de.symeda.sormas.api.sormastosormas.caze.SormasToSormasCaseDto) SormasToSormasException(de.symeda.sormas.api.sormastosormas.SormasToSormasException) SormasToSormasValidationException(de.symeda.sormas.api.sormastosormas.validation.SormasToSormasValidationException) UserReferenceDto(de.symeda.sormas.api.user.UserReferenceDto) ContactDto(de.symeda.sormas.api.contact.ContactDto) SormasToSormasContactDto(de.symeda.sormas.api.sormastosormas.contact.SormasToSormasContactDto) SormasToSormasSampleDto(de.symeda.sormas.api.sormastosormas.sample.SormasToSormasSampleDto) SampleDto(de.symeda.sormas.api.sample.SampleDto) SormasToSormasTest(de.symeda.sormas.backend.sormastosormas.SormasToSormasTest) Test(org.junit.Test)

Aggregations

User (de.symeda.sormas.backend.user.User)138 Predicate (javax.persistence.criteria.Predicate)61 CriteriaBuilder (javax.persistence.criteria.CriteriaBuilder)51 List (java.util.List)48 Region (de.symeda.sormas.backend.infrastructure.region.Region)43 Collections (java.util.Collections)42 ArrayList (java.util.ArrayList)40 DataHelper (de.symeda.sormas.api.utils.DataHelper)38 Date (java.util.Date)38 Stateless (javax.ejb.Stateless)38 EJB (javax.ejb.EJB)37 LocalBean (javax.ejb.LocalBean)37 District (de.symeda.sormas.backend.infrastructure.district.District)36 Collectors (java.util.stream.Collectors)36 UserRole (de.symeda.sormas.api.user.UserRole)34 UserService (de.symeda.sormas.backend.user.UserService)33 CriteriaQuery (javax.persistence.criteria.CriteriaQuery)33 Case (de.symeda.sormas.backend.caze.Case)32 Root (javax.persistence.criteria.Root)32 Disease (de.symeda.sormas.api.Disease)31