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

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

/**
 * @author christiancorsano
 *
 */
@Entity
public class Rating {
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	private Integer id;
	private Integer value;
	@ManyToOne(targetEntity=Criterion.class,fetch=FetchType.EAGER)
	@JoinColumn(name="criterion_id",nullable=false)
	private Criterion criterion;
	@ManyToOne(targetEntity=Report.class)
	@JoinColumn(name="report_id",nullable=false)
	private Report report;
	/**
	 * @return the id
	 */
	@Id
	public Integer getId() {
		return id;
	}
	/**
	 * @param id the id to set
	 */
	@Id
	public void setId(Integer id) {
		this.id = id;
	}
	/**
	 * @return the value
	 */
	public Integer getValue() {
		return value;
	}
	/**
	 * @param value the value to set
	 */
	public void setValue(Integer value) {
		this.value = value;
	}
	/**
	 * @return the criterion
	 */
	@ManyToOne(targetEntity=Criterion.class)
	@JoinColumn(name="criterion_id",nullable=false)
	public Criterion getCriterion() {
		return criterion;
	}
	/**
	 * @param criterion the criterion to set
	 */
	@ManyToOne(targetEntity=Criterion.class)
	@JoinColumn(name="criterion_id",nullable=false)
	public void setCriterion(Criterion criterion) {
		this.criterion = criterion;
	}
	/**
	 * @return the report
	 */
	@ManyToOne(targetEntity=Report.class)
	@JoinColumn(name="report_id",nullable=false)
	public Report getReport() {
		return report;
	}
	/**
	 * @param report the report to set
	 */
	@ManyToOne(targetEntity=Report.class)
	@JoinColumn(name="report_id",nullable=false)
	public void setReport(Report report) {
		this.report = report;
	}
	
	
}
