// 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/presentation/mapper/photo/PhotoModelToPhoto.java
// public class PhotoModelToPhoto extends BaseLayerDataTransformer<PhotoModel, Photo> {
//     @Override
//     public Photo transform(PhotoModel from) {
//         Photo transformed = new Photo();
// 
//         transformed.setId(from.getId());
//         transformed.setTitle(from.getTitle());
//         transformed.setThumbnailUrl(from.getThumbnailUrl());
//         transformed.setUrl(from.getUrl());
// 
//         return transformed;
//     }
// }
// 
// Path: app/src/main/java/com/photoviewer/presentation/model/PhotoModel.java
// @Accessors(prefix = "m")
// public class PhotoModel {
// 
//     @Getter
//     @Setter
//     private int mId;
// 
//     @Getter
//     @Setter
//     private String mTitle;
// 
//     @Getter
//     @Setter
//     private String mUrl;
// 
//     @Getter
//     @Setter
//     private String mThumbnailUrl;
// }
// 
// Path: app/src/main/java/com/photoviewer/presentation/model/PhotoStatisticsModel.java
// @Accessors(prefix = "m")
// public class PhotoStatisticsModel {
// 
//     @Setter
//     @Getter
//     private PhotoModel mLastOpenedPhotoModel;
// 
//     @Setter
//     @Getter
//     private int mOpenedPhotosCount;
// 
//     public void incOpenedPhotosCount() {
//         mOpenedPhotosCount++;
//     }
// }
// 
// Path: app/src/main/java/com/photoviewer/domain/mapper/BaseLayerDataTransformer.java
// public abstract class BaseLayerDataTransformer<F, T> implements LayerDataTransformer<F, T> {
// 
//     @Override
//     public List<T> transform(Collection<F> from) {
//         List<T> transformed = new ArrayList<>(from.size());
// 
//         for (F fromObject : from) {
//             transformed.add(transform(fromObject));
//         }
// 
//         return transformed;
//     }
// }


import com.photoviewer.domain.PhotoStatistics;
import com.photoviewer.presentation.mapper.photo.PhotoModelToPhoto;
import com.photoviewer.presentation.model.PhotoModel;
import com.photoviewer.presentation.model.PhotoStatisticsModel;
import com.photoviewer.domain.mapper.BaseLayerDataTransformer;
package com.photoviewer.presentation.mapper.photostatistics;


public class PhotoStatisticsModelToPhotoStatistics extends BaseLayerDataTransformer<PhotoStatisticsModel, PhotoStatistics> {

    private PhotoModelToPhoto mPhotoModelToPhotoTransformer;

    public PhotoStatisticsModelToPhotoStatistics() {
        mPhotoModelToPhotoTransformer = new PhotoModelToPhoto();
    }

    @Override
    public PhotoStatistics transform(PhotoStatisticsModel from) {
        PhotoStatistics transformed = new PhotoStatistics();

        PhotoModel lastOpenedPhotoModel = from.getLastOpenedPhotoModel();

        if (lastOpenedPhotoModel != null) {
            transformed.setLastOpenedPhoto(mPhotoModelToPhotoTransformer.transform(lastOpenedPhotoModel));
// 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/presentation/mapper/photo/PhotoModelToPhoto.java
// public class PhotoModelToPhoto extends BaseLayerDataTransformer<PhotoModel, Photo> {
//     @Override
//     public Photo transform(PhotoModel from) {
//         Photo transformed = new Photo();
// 
//         transformed.setId(from.getId());
//         transformed.setTitle(from.getTitle());
//         transformed.setThumbnailUrl(from.getThumbnailUrl());
//         transformed.setUrl(from.getUrl());
// 
//         return transformed;
//     }
// }
// 
// Path: app/src/main/java/com/photoviewer/presentation/model/PhotoModel.java
// @Accessors(prefix = "m")
// public class PhotoModel {
// 
//     @Getter
//     @Setter
//     private int mId;
// 
//     @Getter
//     @Setter
//     private String mTitle;
// 
//     @Getter
//     @Setter
//     private String mUrl;
// 
//     @Getter
//     @Setter
//     private String mThumbnailUrl;
// }
// 
// Path: app/src/main/java/com/photoviewer/presentation/model/PhotoStatisticsModel.java
// @Accessors(prefix = "m")
// public class PhotoStatisticsModel {
// 
//     @Setter
//     @Getter
//     private PhotoModel mLastOpenedPhotoModel;
// 
//     @Setter
//     @Getter
//     private int mOpenedPhotosCount;
// 
//     public void incOpenedPhotosCount() {
//         mOpenedPhotosCount++;
//     }
// }
// 
// Path: app/src/main/java/com/photoviewer/domain/mapper/BaseLayerDataTransformer.java
// public abstract class BaseLayerDataTransformer<F, T> implements LayerDataTransformer<F, T> {
// 
//     @Override
//     public List<T> transform(Collection<F> from) {
//         List<T> transformed = new ArrayList<>(from.size());
// 
//         for (F fromObject : from) {
//             transformed.add(transform(fromObject));
//         }
// 
//         return transformed;
//     }
// }


// Path: app/src/main/java/com/photoviewer/presentation/mapper/photostatistics/PhotoStatisticsModelToPhotoStatistics.java
import com.photoviewer.domain.PhotoStatistics;
import com.photoviewer.presentation.mapper.photo.PhotoModelToPhoto;
import com.photoviewer.presentation.model.PhotoModel;
import com.photoviewer.presentation.model.PhotoStatisticsModel;
import com.photoviewer.domain.mapper.BaseLayerDataTransformer;

package com.photoviewer.presentation.mapper.photostatistics;


public class PhotoStatisticsModelToPhotoStatistics extends BaseLayerDataTransformer<PhotoStatisticsModel, PhotoStatistics> {

    private PhotoModelToPhoto mPhotoModelToPhotoTransformer;

    public PhotoStatisticsModelToPhotoStatistics() {
        mPhotoModelToPhotoTransformer = new PhotoModelToPhoto();
    }

    @Override
    public PhotoStatistics transform(PhotoStatisticsModel from) {
        PhotoStatistics transformed = new PhotoStatistics();

        PhotoModel lastOpenedPhotoModel = from.getLastOpenedPhotoModel();

        if (lastOpenedPhotoModel != null) {
            transformed.setLastOpenedPhoto(mPhotoModelToPhotoTransformer.transform(lastOpenedPhotoModel));
            transformed.setOpenedPhotosCount(from.getOpenedPhotosCount());