// Path: app/src/main/java/com/photoviewer/data/entity/PhotoStatisticsEntity.java
// @Accessors(prefix = "m")
// @PreferenceFile(name = "photos_opening_statistics")
// public class PhotoStatisticsEntity {
// 
//     @Setter
//     @Getter
//     @Preference(name = "last_opened_photo_id")
//     private int mLastOpenedPhotoId;
// 
//     @Setter
//     @Getter
//     @Preference(name = "opened_photos_count")
//     private int mOpenedPhotosCount;
// }
// 
// Path: app/src/main/java/com/photoviewer/data/repository/PhotoStatisticsEntityDataSource.java
// public class PhotoStatisticsEntityDataSource implements PhotoStatisticsRepository {
// 
//     @Inject PreferencesPhotoStatisticsEntityStore mStatisticsEntityStore;
// 
//     @Override
//     public Observable<PhotoStatisticsEntity> readStatistics() {
//         return mStatisticsEntityStore.readStatistics();
//     }
// 
//     @Override
//     public Observable<PhotoStatisticsEntity> updateStatistics(PhotoStatisticsEntity photoStatisticsEntity) {
//         return mStatisticsEntityStore.updateStatistics(photoStatisticsEntity);
//     }
// }
// 
// Path: app/src/main/java/com/photoviewer/domain/PhotoStatistics.java
// @Accessors(prefix = "m")
// public class PhotoStatistics {
// 
//     @Setter
//     @Getter
//     private Photo mLastOpenedPhoto;
// 
//     @Setter
//     @Getter
//     private int mOpenedPhotosCount;
// }
// 
// Path: app/src/main/java/com/photoviewer/domain/mapper/photostatisctics/PhotoStatisticsToPhotoStatisticsEntity.java
// public class PhotoStatisticsToPhotoStatisticsEntity extends BaseLayerDataTransformer<PhotoStatistics, PhotoStatisticsEntity> {
//     @Override
//     public PhotoStatisticsEntity transform(PhotoStatistics from) {
//         PhotoStatisticsEntity transformed = new PhotoStatisticsEntity();
// 
//         Photo lastOpenedPhoto = from.getLastOpenedPhoto();
//         transformed.setLastOpenedPhotoId(lastOpenedPhoto != null ? lastOpenedPhoto.getId() : 0);
//         transformed.setOpenedPhotosCount(from.getOpenedPhotosCount());
// 
//         return transformed;
//     }
// }
// 
// Path: app/src/main/java/com/photoviewer/presentation/di/modules/RxModule.java
// @Module(library = true, complete = false) public class RxModule {
// 
//   public static final String COMPUTATION = "computation";
//   public static final String IO = "io";
//   public static final String MAIN_THREAD = "main_thread";
// 
//   @Provides @Singleton @Named(IO) Scheduler provideIoScheduler() {
//     return Schedulers.io();
//   }
// 
//   @Provides @Singleton @Named(MAIN_THREAD) Scheduler provideMainScheduler() {
//     return AndroidSchedulers.mainThread();
//   }
// 
//   @Provides @Singleton @Named(COMPUTATION) Scheduler provideComputationScheduler() {
//     return Schedulers.computation();
//   }
// }


import com.photoviewer.data.entity.PhotoStatisticsEntity;
import com.photoviewer.data.repository.PhotoStatisticsEntityDataSource;
import com.photoviewer.domain.PhotoStatistics;
import com.photoviewer.domain.mapper.photostatisctics.PhotoStatisticsToPhotoStatisticsEntity;
import com.photoviewer.presentation.di.modules.RxModule;
import javax.inject.Inject;
import javax.inject.Named;
import lombok.Setter;
import lombok.experimental.Accessors;
import rx.Observable;
import rx.Scheduler;
package com.photoviewer.domain.usecases;



@Accessors(prefix = "m")
public class SavePhotoStatistics extends UseCase<Void> {
    private final PhotoStatisticsToPhotoStatisticsEntity mPhotoStatisticsToPhotoStatisticsEntityTransformer;

    @Setter
    private PhotoStatistics mPhotoStatistics;

    @Inject PhotoStatisticsEntityDataSource mPhotoStatisticsEntityDataSource;

    @Inject public SavePhotoStatistics(@Named(RxModule.COMPUTATION) Scheduler executionScheduler,
// Path: app/src/main/java/com/photoviewer/data/entity/PhotoStatisticsEntity.java
// @Accessors(prefix = "m")
// @PreferenceFile(name = "photos_opening_statistics")
// public class PhotoStatisticsEntity {
// 
//     @Setter
//     @Getter
//     @Preference(name = "last_opened_photo_id")
//     private int mLastOpenedPhotoId;
// 
//     @Setter
//     @Getter
//     @Preference(name = "opened_photos_count")
//     private int mOpenedPhotosCount;
// }
// 
// Path: app/src/main/java/com/photoviewer/data/repository/PhotoStatisticsEntityDataSource.java
// public class PhotoStatisticsEntityDataSource implements PhotoStatisticsRepository {
// 
//     @Inject PreferencesPhotoStatisticsEntityStore mStatisticsEntityStore;
// 
//     @Override
//     public Observable<PhotoStatisticsEntity> readStatistics() {
//         return mStatisticsEntityStore.readStatistics();
//     }
// 
//     @Override
//     public Observable<PhotoStatisticsEntity> updateStatistics(PhotoStatisticsEntity photoStatisticsEntity) {
//         return mStatisticsEntityStore.updateStatistics(photoStatisticsEntity);
//     }
// }
// 
// Path: app/src/main/java/com/photoviewer/domain/PhotoStatistics.java
// @Accessors(prefix = "m")
// public class PhotoStatistics {
// 
//     @Setter
//     @Getter
//     private Photo mLastOpenedPhoto;
// 
//     @Setter
//     @Getter
//     private int mOpenedPhotosCount;
// }
// 
// Path: app/src/main/java/com/photoviewer/domain/mapper/photostatisctics/PhotoStatisticsToPhotoStatisticsEntity.java
// public class PhotoStatisticsToPhotoStatisticsEntity extends BaseLayerDataTransformer<PhotoStatistics, PhotoStatisticsEntity> {
//     @Override
//     public PhotoStatisticsEntity transform(PhotoStatistics from) {
//         PhotoStatisticsEntity transformed = new PhotoStatisticsEntity();
// 
//         Photo lastOpenedPhoto = from.getLastOpenedPhoto();
//         transformed.setLastOpenedPhotoId(lastOpenedPhoto != null ? lastOpenedPhoto.getId() : 0);
//         transformed.setOpenedPhotosCount(from.getOpenedPhotosCount());
// 
//         return transformed;
//     }
// }
// 
// Path: app/src/main/java/com/photoviewer/presentation/di/modules/RxModule.java
// @Module(library = true, complete = false) public class RxModule {
// 
//   public static final String COMPUTATION = "computation";
//   public static final String IO = "io";
//   public static final String MAIN_THREAD = "main_thread";
// 
//   @Provides @Singleton @Named(IO) Scheduler provideIoScheduler() {
//     return Schedulers.io();
//   }
// 
//   @Provides @Singleton @Named(MAIN_THREAD) Scheduler provideMainScheduler() {
//     return AndroidSchedulers.mainThread();
//   }
// 
//   @Provides @Singleton @Named(COMPUTATION) Scheduler provideComputationScheduler() {
//     return Schedulers.computation();
//   }
// }


// Path: app/src/main/java/com/photoviewer/domain/usecases/SavePhotoStatistics.java
import com.photoviewer.data.entity.PhotoStatisticsEntity;
import com.photoviewer.data.repository.PhotoStatisticsEntityDataSource;
import com.photoviewer.domain.PhotoStatistics;
import com.photoviewer.domain.mapper.photostatisctics.PhotoStatisticsToPhotoStatisticsEntity;
import com.photoviewer.presentation.di.modules.RxModule;
import javax.inject.Inject;
import javax.inject.Named;
import lombok.Setter;
import lombok.experimental.Accessors;
import rx.Observable;
import rx.Scheduler;

package com.photoviewer.domain.usecases;



@Accessors(prefix = "m")
public class SavePhotoStatistics extends UseCase<Void> {
    private final PhotoStatisticsToPhotoStatisticsEntity mPhotoStatisticsToPhotoStatisticsEntityTransformer;

    @Setter
    private PhotoStatistics mPhotoStatistics;

    @Inject PhotoStatisticsEntityDataSource mPhotoStatisticsEntityDataSource;

    @Inject public SavePhotoStatistics(@Named(RxModule.COMPUTATION) Scheduler executionScheduler,
        @Named(RxModule.MAIN_THREAD) Scheduler observingScheduler) {