package ub.scp2.boImpl;

import java.util.List;

import ub.scp2.bo.SubjectBo;
import ub.scp2.dao.SubjectDao;
import ub.scp2.entities.Subject;
import ub.scp2.entities.User;

/**
 * SubjectBoImpl.java -this class implements the SubjectBo. This is the Business Object of the Subject entity
 * 
 *
 */
public class SubjectBoImpl implements SubjectBo, java.io.Serializable {
	private SubjectDao subjectdao;

	public void setSubjectdao(SubjectDao subjectdao) {
		this.subjectdao = subjectdao;
	}

	public List<Subject> getSubjects() {
		return subjectdao.getSubjects();
	}

	public void saveSubject(Subject subject){
		subjectdao.saveSubject(subject);
	}

	public void deleteSubject(Subject subject) {
		subjectdao.deleteSubject(subject);
		
	}

	public void updateSubject(Subject subject) {
		subjectdao.updateSubject(subject);
		
	}
	
	public Subject getSubjectById(Long subjectId) {
		return subjectdao.getSubjectById(subjectId);
	}
	
	public boolean subjectTitleExist(String subjectTitle){
		return subjectdao.subjectTitleExist(subjectTitle);
	}


}
