package tutorial.rest.resources;

import org.springframework.hateoas.ResourceSupport;

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

/**
 * 
 * @author Xavier
 */
public class ActiveIngredientListResourceWithRecomendations extends ResourceSupport {
    private List<ActiveIngredientResourceWithRecomendations> activeIngredients = new ArrayList<ActiveIngredientResourceWithRecomendations>();

    public ActiveIngredientListResourceWithRecomendations(ActiveIngredientListResource activeIngredientListRes) {
        for(int i = 0;i<activeIngredientListRes.getActiveIngredients().size();i++){
            ActiveIngredientResourceWithRecomendations item = new ActiveIngredientResourceWithRecomendations(activeIngredientListRes.getActiveIngredients().get(i));
            this.activeIngredients.add(item);
        }
    }

    public List<ActiveIngredientResourceWithRecomendations> getActiveIngredients() {
        return activeIngredients;
    }

    public void setActiveIngredients(List<ActiveIngredientResourceWithRecomendations> activeIngredients) {
        this.activeIngredients = activeIngredients;
    }
}
