package com.wasu.cs.widget.mediacontrol.adapter;

import com.wasu.cs.model.IAssetList;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by zhangrm on 16-3-3.
 */
public class RecommendEntry {
    private String title;
    private String picUrl;
    private String jsonUrl;
    private String point;

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getPicUrl() {
        return picUrl;
    }

    public void setPicUrl(String picUrl) {
        this.picUrl = picUrl;
    }

    public String getJsonUrl() {
        return jsonUrl;
    }

    public void setJsonUrl(String jsonUrl) {
        this.jsonUrl = jsonUrl;
    }

    public String getPoint() {
        return point;
    }

    public void setPoint(String point) {
        this.point = point;
    }

    public static List<RecommendEntry> generateList(IAssetList assetList) {
        List<RecommendEntry> list = new ArrayList<RecommendEntry>();
        int size = assetList.getRealSize();
        for (int i = 0; i < size; i++) {
            RecommendEntry entry = new RecommendEntry();
            entry.setTitle(assetList.getTitle(i));
            entry.setPicUrl(assetList.getPicUrl(i));
            entry.setJsonUrl(assetList.getJsonUrl(i));
            entry.setPoint(assetList.getPoint(i));
            list.add(entry);
        }

        return list;
    }
}
