package tutorial.core.services;

import tutorial.core.models.entities.ActiveIngredient;
import tutorial.core.models.entities.ActiveIngredientRecomendation;
import tutorial.core.services.util.ActiveIngredientList;
import tutorial.core.services.util.ActiveIngredientRecomendationList;

/**
 * 
 * @author Xavier
 */
public interface ActiveIngredientService {
    /**
     * 
     * @param activeIngredientId the id of the ActiveIngredient to add this ActiveIngredientRecomendation to
     * @param data the ActiveIngredientRecomendation containing the data to be used for creating the new entity
     * @return the created ActiveIngredientRecomendation with a generated ID
     * @throws tutorial.core.services.exceptions.ActiveIngredientNotFoundException if the ActiveIngredient to add to cannot be found
     */
    public ActiveIngredientRecomendation createActiveIngredientRecomendation(Long activeIngredientId, ActiveIngredientRecomendation data);

    /**
     * 
     * @param data
     * @return 
     */
    public ActiveIngredient createActiveIngredient(ActiveIngredient data);
    
    /**
     * 
     * @return 
     */
    public ActiveIngredientList findAllActiveIngredients();

    /**
     * 
     * @param activeIngredientId
     * @return 
     */
    public ActiveIngredientRecomendationList findAllActiveIngredientRecomendations(Long activeIngredientId);

    /**
     * 
     * @param id
     * @return 
     */
    public ActiveIngredient findActiveIngredient(Long id);
    
    /**
     * 
     * @param name
     * @return 
     */
    public ActiveIngredient findActiveIngredientByName(String name);

    /**
     * 
     */
    public void deleteAllActiveIngredients();
}
