test_class.declarator: caseDao
test_class.modifier: @Mock
test_class.original_string: @Mock
      CaseDao caseDao;
test_class.type: CaseDao
test_class.var_name: caseDao
test_class.declarator: casePhotoDao
test_class.modifier: @Mock
test_class.original_string: @Mock
      CasePhotoDao casePhotoDao;
test_class.type: CasePhotoDao
test_class.var_name: casePhotoDao
test_class.declarator: incidentDao
test_class.modifier: @Mock
test_class.original_string: @Mock
      IncidentDao incidentDao;
test_class.type: IncidentDao
test_class.var_name: incidentDao
test_class.declarator: caseService
test_class.modifier: @InjectMocks
test_class.original_string: @InjectMocks
      CaseService caseService;
test_class.type: CaseService
test_class.var_name: caseService
test_class.file: app/src/test/java/org/unicef/rapidreg/service/CaseServiceTest.java
test_class.identifier: CaseServiceTest
test_case.body: @Test
      public void should_delete_when_case_exists_and_synced_yet() throws Exception {
          long recordId = 123L;
  
          Case deleteCase = new Case(recordId);
          deleteCase.setSynced(true);
          when(caseDao.getCaseById(recordId)).thenReturn(deleteCase);
  
          Case actual = caseService.deleteByRecordId(recordId);
  
          verify(caseDao, times(1)).delete(deleteCase);
          verify(casePhotoDao, times(1)).deleteByCaseId(recordId);
          assertThat(actual, is(deleteCase));
      }
test_case.class_method_signature: CaseServiceTest.should_delete_when_case_exists_and_synced_yet()
test_case.full_signature: @Test public void should_delete_when_case_exists_and_synced_yet()
test_case.identifier: should_delete_when_case_exists_and_synced_yet
test_case.invocations: setSynced thenReturn when getCaseById deleteByRecordId delete verify times deleteByCaseId verify times assertThat is
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void should_delete_when_case_exists_and_synced_yet()
focal_class.declarator: TAG = CaseService.class.getSimpleName()
focal_class.modifier: public static final
focal_class.original_string: public static final String TAG = CaseService.class.getSimpleName();
focal_class.type: String
focal_class.var_name: TAG
focal_class.declarator: CASE_DISPLAY_ID = "case_id_display"
focal_class.modifier: public static final
focal_class.original_string: public static final String CASE_DISPLAY_ID = "case_id_display";
focal_class.type: String
focal_class.var_name: CASE_DISPLAY_ID
focal_class.declarator: CASE_ID = "case_id"
focal_class.modifier: public static final
focal_class.original_string: public static final String CASE_ID = "case_id";
focal_class.type: String
focal_class.var_name: CASE_ID
focal_class.declarator: CASE_PRIMARY_ID = "case_primary_id"
focal_class.modifier: public static final
focal_class.original_string: public static final String CASE_PRIMARY_ID = "case_primary_id";
focal_class.type: String
focal_class.var_name: CASE_PRIMARY_ID
focal_class.declarator: caseDao
focal_class.modifier: private
focal_class.original_string: private CaseDao caseDao;
focal_class.type: CaseDao
focal_class.var_name: caseDao
focal_class.declarator: casePhotoDao
focal_class.modifier: private
focal_class.original_string: private CasePhotoDao casePhotoDao;
focal_class.type: CasePhotoDao
focal_class.var_name: casePhotoDao
focal_class.declarator: incidentDao
focal_class.modifier: private
focal_class.original_string: private IncidentDao incidentDao;
focal_class.type: IncidentDao
focal_class.var_name: incidentDao
focal_class.file: app/src/main/java/org/unicef/rapidreg/service/CaseService.java
focal_class.identifier: CaseService
focal_class.class_method_signature: CaseService.CaseService(CaseDao caseDao, CasePhotoDao casePhotoDao, IncidentDao incidentDao)
focal_class.full_signature: public  CaseService(CaseDao caseDao, CasePhotoDao casePhotoDao, IncidentDao incidentDao)
focal_class.identifier: CaseService
focal_class.modifiers: public
focal_class.parameters: (CaseDao caseDao, CasePhotoDao casePhotoDao, IncidentDao incidentDao)
focal_class.signature:  CaseService(CaseDao caseDao, CasePhotoDao casePhotoDao, IncidentDao incidentDao)
focal_class.class_method_signature: CaseService.getAll()
focal_class.full_signature: public List<Case> getAll()
focal_class.identifier: getAll
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<Case>
focal_class.signature: List<Case> getAll()
focal_class.class_method_signature: CaseService.getById(long caseId)
focal_class.full_signature: public Case getById(long caseId)
focal_class.identifier: getById
focal_class.modifiers: public
focal_class.parameters: (long caseId)
focal_class.return: Case
focal_class.signature: Case getById(long caseId)
focal_class.class_method_signature: CaseService.getByUniqueId(String uniqueId)
focal_class.full_signature: public Case getByUniqueId(String uniqueId)
focal_class.identifier: getByUniqueId
focal_class.modifiers: public
focal_class.parameters: (String uniqueId)
focal_class.return: Case
focal_class.signature: Case getByUniqueId(String uniqueId)
focal_class.class_method_signature: CaseService.getIncidentsByCaseId(String caseUniqueId)
focal_class.full_signature: public List<String> getIncidentsByCaseId(String caseUniqueId)
focal_class.identifier: getIncidentsByCaseId
focal_class.modifiers: public
focal_class.parameters: (String caseUniqueId)
focal_class.return: List<String>
focal_class.signature: List<String> getIncidentsByCaseId(String caseUniqueId)
focal_class.class_method_signature: CaseService.getAllOrderByDateASC()
focal_class.full_signature: public List<Long> getAllOrderByDateASC()
focal_class.identifier: getAllOrderByDateASC
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<Long>
focal_class.signature: List<Long> getAllOrderByDateASC()
focal_class.class_method_signature: CaseService.getAllOrderByDateDES()
focal_class.full_signature: public List<Long> getAllOrderByDateDES()
focal_class.identifier: getAllOrderByDateDES
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<Long>
focal_class.signature: List<Long> getAllOrderByDateDES()
focal_class.class_method_signature: CaseService.getAllOrderByAgeASC()
focal_class.full_signature: public List<Long> getAllOrderByAgeASC()
focal_class.identifier: getAllOrderByAgeASC
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<Long>
focal_class.signature: List<Long> getAllOrderByAgeASC()
focal_class.class_method_signature: CaseService.getAllOrderByAgeDES()
focal_class.full_signature: public List<Long> getAllOrderByAgeDES()
focal_class.identifier: getAllOrderByAgeDES
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<Long>
focal_class.signature: List<Long> getAllOrderByAgeDES()
focal_class.class_method_signature: CaseService.getCPSearchResult(String shortId, String name, int ageFrom, int ageTo,
                                          String caregiver, Date date)
focal_class.full_signature: public List<Long> getCPSearchResult(String shortId, String name, int ageFrom, int ageTo,
                                          String caregiver, Date date)
focal_class.identifier: getCPSearchResult
focal_class.modifiers: public
focal_class.parameters: (String shortId, String name, int ageFrom, int ageTo,
                                          String caregiver, Date date)
focal_class.return: List<Long>
focal_class.signature: List<Long> getCPSearchResult(String shortId, String name, int ageFrom, int ageTo,
                                          String caregiver, Date date)
focal_class.class_method_signature: CaseService.getAllSyncedRecordsId()
focal_class.full_signature: public List<Long> getAllSyncedRecordsId()
focal_class.identifier: getAllSyncedRecordsId
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<Long>
focal_class.signature: List<Long> getAllSyncedRecordsId()
focal_class.class_method_signature: CaseService.getGBVSearchResult(String shortId, String name, String location, Date registrationDate)
focal_class.full_signature: public List<Long> getGBVSearchResult(String shortId, String name, String location, Date registrationDate)
focal_class.identifier: getGBVSearchResult
focal_class.modifiers: public
focal_class.parameters: (String shortId, String name, String location, Date registrationDate)
focal_class.return: List<Long>
focal_class.signature: List<Long> getGBVSearchResult(String shortId, String name, String location, Date registrationDate)
focal_class.class_method_signature: CaseService.saveOrUpdate(ItemValuesMap itemValues, List<String> photoPaths)
focal_class.full_signature: public Case saveOrUpdate(ItemValuesMap itemValues, List<String> photoPaths)
focal_class.identifier: saveOrUpdate
focal_class.modifiers: public
focal_class.parameters: (ItemValuesMap itemValues, List<String> photoPaths)
focal_class.return: Case
focal_class.signature: Case saveOrUpdate(ItemValuesMap itemValues, List<String> photoPaths)
focal_class.class_method_signature: CaseService.save(ItemValuesMap itemValues, List<String> photoPaths)
focal_class.full_signature: public Case save(ItemValuesMap itemValues, List<String> photoPaths)
focal_class.identifier: save
focal_class.modifiers: public
focal_class.parameters: (ItemValuesMap itemValues, List<String> photoPaths)
focal_class.return: Case
focal_class.signature: Case save(ItemValuesMap itemValues, List<String> photoPaths)
focal_class.class_method_signature: CaseService.savePhoto(Case child, List<String> photoPaths)
focal_class.full_signature: public void savePhoto(Case child, List<String> photoPaths)
focal_class.identifier: savePhoto
focal_class.modifiers: public
focal_class.parameters: (Case child, List<String> photoPaths)
focal_class.return: void
focal_class.signature: void savePhoto(Case child, List<String> photoPaths)
focal_class.class_method_signature: CaseService.update(ItemValuesMap itemValues, List<String> photoBitPaths)
focal_class.full_signature: public Case update(ItemValuesMap itemValues, List<String> photoBitPaths)
focal_class.identifier: update
focal_class.modifiers: public
focal_class.parameters: (ItemValuesMap itemValues, List<String> photoBitPaths)
focal_class.return: Case
focal_class.signature: Case update(ItemValuesMap itemValues, List<String> photoBitPaths)
focal_class.class_method_signature: CaseService.setCurrentDateIfRegistrationNotExist(ItemValuesMap itemValues)
focal_class.full_signature: private void setCurrentDateIfRegistrationNotExist(ItemValuesMap itemValues)
focal_class.identifier: setCurrentDateIfRegistrationNotExist
focal_class.modifiers: private
focal_class.parameters: (ItemValuesMap itemValues)
focal_class.return: void
focal_class.signature: void setCurrentDateIfRegistrationNotExist(ItemValuesMap itemValues)
focal_class.class_method_signature: CaseService.updatePhoto(Case child, List<String> photoPaths)
focal_class.full_signature: public void updatePhoto(Case child, List<String> photoPaths)
focal_class.identifier: updatePhoto
focal_class.modifiers: public
focal_class.parameters: (Case child, List<String> photoPaths)
focal_class.return: void
focal_class.signature: void updatePhoto(Case child, List<String> photoPaths)
focal_class.class_method_signature: CaseService.deleteByRecordId(long recordId)
focal_class.full_signature: public Case deleteByRecordId(long recordId)
focal_class.identifier: deleteByRecordId
focal_class.modifiers: public
focal_class.parameters: (long recordId)
focal_class.return: Case
focal_class.signature: Case deleteByRecordId(long recordId)
focal_class.class_method_signature: CaseService.generateSavePhoto(Case child, List<String> photoPaths, int index)
focal_class.full_signature: private CasePhoto generateSavePhoto(Case child, List<String> photoPaths, int index)
focal_class.identifier: generateSavePhoto
focal_class.modifiers: private
focal_class.parameters: (Case child, List<String> photoPaths, int index)
focal_class.return: CasePhoto
focal_class.signature: CasePhoto generateSavePhoto(Case child, List<String> photoPaths, int index)
focal_class.class_method_signature: CaseService.generateUpdatePhoto(Case child, List<String> photoPaths, int index)
focal_class.full_signature: @NonNull private CasePhoto generateUpdatePhoto(Case child, List<String> photoPaths, int index)
focal_class.identifier: generateUpdatePhoto
focal_class.modifiers: @NonNull private
focal_class.parameters: (Case child, List<String> photoPaths, int index)
focal_class.return: CasePhoto
focal_class.signature: CasePhoto generateUpdatePhoto(Case child, List<String> photoPaths, int index)
focal_class.class_method_signature: CaseService.getAudioBlob()
focal_class.full_signature: private Blob getAudioBlob()
focal_class.identifier: getAudioBlob
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: Blob
focal_class.signature: Blob getAudioBlob()
focal_class.class_method_signature: CaseService.getName(ItemValuesMap values)
focal_class.full_signature: private String getName(ItemValuesMap values)
focal_class.identifier: getName
focal_class.modifiers: private
focal_class.parameters: (ItemValuesMap values)
focal_class.return: String
focal_class.signature: String getName(ItemValuesMap values)
focal_class.class_method_signature: CaseService.getByInternalId(String id)
focal_class.full_signature: public Case getByInternalId(String id)
focal_class.identifier: getByInternalId
focal_class.modifiers: public
focal_class.parameters: (String id)
focal_class.return: Case
focal_class.signature: Case getByInternalId(String id)
focal_class.class_method_signature: CaseService.hasSameRev(String id, String rev)
focal_class.full_signature: public boolean hasSameRev(String id, String rev)
focal_class.identifier: hasSameRev
focal_class.modifiers: public
focal_class.parameters: (String id, String rev)
focal_class.return: boolean
focal_class.signature: boolean hasSameRev(String id, String rev)
focal_class.superclass: extends RecordService
focal_method.body: public Case deleteByRecordId(long recordId) {
          Case deleteCase = caseDao.getCaseById(recordId);
          if (deleteCase != null && !deleteCase.isSynced()) {
              return null;
          }
          caseDao.delete(deleteCase);
          casePhotoDao.deleteByCaseId(recordId);
          return deleteCase;
      }
focal_method.class_method_signature: CaseService.deleteByRecordId(long recordId)
focal_method.full_signature: public Case deleteByRecordId(long recordId)
focal_method.identifier: deleteByRecordId
focal_method.invocations: getCaseById isSynced delete deleteByCaseId
focal_method.modifiers: public
focal_method.parameters: (long recordId)
focal_method.return: Case
focal_method.signature: Case deleteByRecordId(long recordId)