@Test public void getInstanceIdUuidsShouldReturnEmptyIfNullCursor() { List<InstanceIdUuid> results = mapper.getInstanceIdUuids(null); assertTrue(results.isEmpty()); }
@NonNull public List<InstanceIdUuid> getInstanceIdUuids(Cursor cursor) { int size = cursor == null ? 0 : cursor.getCount(); List<InstanceIdUuid> instanceIdUuids = new ArrayList<>(size); if (cursor != null && cursor.moveToFirst()) { do { instanceIdUuids.add(getInstanceIdUuid(cursor)); } while (cursor.moveToNext()); } if (cursor != null) { cursor.close(); } return instanceIdUuids; }
FormInstanceMapper { @NonNull public List<InstanceIdUuid> getInstanceIdUuids(Cursor cursor) { int size = cursor == null ? 0 : cursor.getCount(); List<InstanceIdUuid> instanceIdUuids = new ArrayList<>(size); if (cursor != null && cursor.moveToFirst()) { do { instanceIdUuids.add(getInstanceIdUuid(cursor)); } while (cursor.moveToNext()); } if (cursor != null) { cursor.close(); } return instanceIdUuids; } }
FormInstanceMapper { @NonNull public List<InstanceIdUuid> getInstanceIdUuids(Cursor cursor) { int size = cursor == null ? 0 : cursor.getCount(); List<InstanceIdUuid> instanceIdUuids = new ArrayList<>(size); if (cursor != null && cursor.moveToFirst()) { do { instanceIdUuids.add(getInstanceIdUuid(cursor)); } while (cursor.moveToNext()); } if (cursor != null) { cursor.close(); } return instanceIdUuids; } @Inject  FormInstanceMapper(TextValueCleaner textValueCleaner,
            ResponseMapper responseMapper, FileHelper fileHelper); }
FormInstanceMapper { @NonNull public List<InstanceIdUuid> getInstanceIdUuids(Cursor cursor) { int size = cursor == null ? 0 : cursor.getCount(); List<InstanceIdUuid> instanceIdUuids = new ArrayList<>(size); if (cursor != null && cursor.moveToFirst()) { do { instanceIdUuids.add(getInstanceIdUuid(cursor)); } while (cursor.moveToNext()); } if (cursor != null) { cursor.close(); } return instanceIdUuids; } @Inject  FormInstanceMapper(TextValueCleaner textValueCleaner,
            ResponseMapper responseMapper, FileHelper fileHelper); @NonNull List<InstanceIdUuid> getInstanceIdUuids(Cursor cursor); @NonNull List<Long> getInstanceIds(Cursor cursor); @NonNull Pair<FormInstance, Set<String>> getFormInstanceWithMedia(@NonNull String deviceId,
            Cursor data); @NonNull FormInstance getFormInstance(@NonNull String deviceId, Cursor data); Long getFormInstanceId(Cursor cursor); }
FormInstanceMapper { @NonNull public List<InstanceIdUuid> getInstanceIdUuids(Cursor cursor) { int size = cursor == null ? 0 : cursor.getCount(); List<InstanceIdUuid> instanceIdUuids = new ArrayList<>(size); if (cursor != null && cursor.moveToFirst()) { do { instanceIdUuids.add(getInstanceIdUuid(cursor)); } while (cursor.moveToNext()); } if (cursor != null) { cursor.close(); } return instanceIdUuids; } @Inject  FormInstanceMapper(TextValueCleaner textValueCleaner,
            ResponseMapper responseMapper, FileHelper fileHelper); @NonNull List<InstanceIdUuid> getInstanceIdUuids(Cursor cursor); @NonNull List<Long> getInstanceIds(Cursor cursor); @NonNull Pair<FormInstance, Set<String>> getFormInstanceWithMedia(@NonNull String deviceId,
            Cursor data); @NonNull FormInstance getFormInstance(@NonNull String deviceId, Cursor data); Long getFormInstanceId(Cursor cursor);  }