package taiwan.no1.app.data.mapper.search;

import android.support.annotation.NonNull;

import taiwan.no1.app.data.entities.search.SearchMovieEntity;
import taiwan.no1.app.domain.mapper.IBeanMapper;
import taiwan.no1.app.mvp.models.search.SearchMovieModel;

/**
 * Created by weian on 2017/2/15.
 */

public class SearchMovieMapper implements IBeanMapper<SearchMovieModel, SearchMovieEntity> {
    @NonNull
    @Override
    public SearchMovieEntity transformFrom(@NonNull SearchMovieModel model) {
        return null;
    }

    @NonNull
    @Override
    public SearchMovieModel transformTo(@NonNull SearchMovieEntity entity) {
        return null;
    }
}

@@ -81,16 +81,159 @@
 nNull;%0A%0A
+import com.innahema.collections.query.queriables.Queryable;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.Collections;%0Aimport java.util.List;%0A%0A
 import t
@@ -286,16 +286,16 @@
 Entity;%0A
-
 import t
@@ -639,35 +639,48 @@
 ) %7B%0A        
-return null
+throw new Error(%22No-op%22)
 ;%0A    %7D%0A%0A   
@@ -792,19 +792,1286 @@
     
-return null
+List%3CSearchMovieModel.ResultsBean%3E resultsBean = null != entity.getResults() ?%0A                Queryable.from(entity.getResults())%0A                        .map(data -%3E new SearchMovieModel.ResultsBean(%0A                                data.getPoster_path(),%0A                                data.isAdult(),%0A                                data.getOverview(),%0A                                data.getRelease_date(),%0A                                data.getId(),%0A                                data.getOriginal_title(),%0A                                data.getOriginal_language(),%0A                                data.getTitle(),%0A                                data.getBackdrop_path(),%0A                                data.getPopularity(),%0A                                data.getVote_count(),%0A                                data.isVideo(),%0A                                data.getVote_average(),%0A                                null != data.getGenre_ids() ?%0A                                        new ArrayList%3CInteger%3E(data.getGenre_ids()) : null))%0A                        .toList(): Collections.emptyList();%0A%0A        return new SearchMovieModel(entity.getPage(),%0A                entity.getTotal_results(),%0A                entity.getTotal_pages(),%0A                resultsBean)
 ;%0A  

implement SearchMovieMapper.