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

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

import org.yacos.core.conferences.Conference;

/**
 * @author christiancorsano
 *
 */
@Entity
public class Criterion {
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	private Integer id;
	private String name;
	private Integer min_rating;
	private Integer max_rating;
	
	@ManyToOne(targetEntity=Conference.class)
	@JoinColumn(name="conference_id",nullable=false)
	private Conference conference;
	
	@ManyToOne(targetEntity=Conference.class)
	@JoinColumn(name="conference_id",nullable=false)
	public Conference getConference(){
		return conference;
	}
	
	/**
	 * @param conference the conference to set
	 */
	@ManyToOne(targetEntity=Conference.class)
	@JoinColumn(name="conference_id",nullable=false)
	public void setConference(Conference conference) {
		this.conference = conference;
	}

	/**
	 * @return the id
	 */
	public Integer getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(Integer id) {
		this.id = id;
	}



	/**
	 * @return the name of this criterion
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name the name of this criterion
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the minimum value for this criterion
	 */
	public Integer getMin() {
		return min_rating;
	}

	/**
	 * @param min the minimum value for this criterion
	 */
	public void setMin(Integer min) {
		this.min_rating = min;
	}

	/**
	 * @return the maximum value for this criterion
	 */
	public Integer getMax() {
		return max_rating;
	}

	/**
	 * @param max the maximum value for this criterion
	 */
	public void setMax(Integer max) {
		this.max_rating = max;
	}
	
}
