/**
 * 
 */
package org.yacos.core.evaluation;

import java.util.List;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;

import org.yacos.core.article.Article;

/**
 * @author christiancorsano
 *
 */
@Stateless
public class EvaluationManager implements IEvaluationManager {
	@PersistenceContext
	EntityManager em;
	
	@SuppressWarnings("unchecked")
	public List<Report> getReportsForArticle(Article article) {
		Query q = em.createNativeQuery("from Report where article_id="+article.getId(), Report.class);
		return q.getResultList();
	}
}
