/*
 * Copyright (c) 2005 Absolutely Training Limited
 *  
 * Created on 07-Feb-2005
 */

// constructor
function Core(){
	this.student_id = null;
	this.student_name = null;
	this.lesson_location = null;
	this.credit = null;
	this.lesson_status = null;
	this.entry = null;
	this.total_time = null;
	this.lesson_mode = null;
	this.exit = null;
	this.session_time = null;
    this.type = "core";
	this.score = new Score();
    this.propertiesArray = new Array("student_id","student_name","lesson_location", "credit", "lesson_status", "total_time", "lesson_mode", "exit", "session_time");
	this.objectsArray = new Array("score");
	this._children = this.propertiesArray.join(",");
	this.validator = new Validator();
};

// create and discard an initial Object to force the prototype object to be
// created in Navigator 3.

new Core();     

Core.prototype = new RTEDataObject();
Core.prototype.constructor = Core;


Core.prototype.setStudent_id = function(student_id){
	//TODO add validation
	//if (this.validator.validateLongIdentifierType(id)){
		this.student_id = student_id;
		return VariableInfo.NO_SET_ERROR;
	//} else{
	//	return VariableInfo.ERROR_406;
	//}
};

Core.prototype.getStudent_id = function()  {
	var student_id =this.student_id == null ? "":this.student_id;
	var info = new VariableInfo("0", "", student_id);
	return info; 

};



Core.prototype.setStudent_name = function(student_name) {
	//TODO add validation
	//if (this.validator.validateLongIdentifierType(id)){
		this.student_name = student_name;
		return VariableInfo.NO_SET_ERROR;
	//} else{
	//	return VariableInfo.ERROR_406;
	//}
};

Core.prototype.getStudent_name = function()  {

	var student_name =this.student_name == null ? "":this.student_name;
	var info = new VariableInfo("0", "", student_name);
	return info; 

};



Core.prototype.setLesson_location = function(lesson_location) {
	//TODO add validation
	//if (this.validator.validateLongIdentifierType(id)){
		this.lesson_location = lesson_location;
		
		return VariableInfo.NO_SET_ERROR;
	//} else{
	//	return VariableInfo.ERROR_406;
	//}
};

Core.prototype.getLesson_location = function()  {

	var lesson_location =this.lesson_location == null ? "":this.lesson_location;


	var info = new VariableInfo("0", "", lesson_location);
	return info; 

};


Core.prototype.setCredit = function(credit) {
	//TODO add validation
	//if (this.validator.validateLongIdentifierType(id)){
		this.credit = credit;
		return VariableInfo.NO_SET_ERROR;
	//} else{
	//	return VariableInfo.ERROR_406;
	//}
};

Core.prototype.getCredit = function()  {
	
	var credit =this.credit == null ? "":this.credit;
	var info = new VariableInfo("0", "", credit);
	return info; 

};



Core.prototype.setLesson_status = function(lesson_status) {
	//TODO add validation
	//if (this.validator.validateLongIdentifierType(id)){
		this.lesson_status = lesson_status;
		return VariableInfo.NO_SET_ERROR;
	//} else{
	//	return VariableInfo.ERROR_406;
	//}
};


Core.prototype.getLesson_status = function()  {
	
	var lesson_status =this.lesson_status == null ? "":this.lesson_status;
	var info = new VariableInfo("0", "", lesson_status);
	return info; 

};


Core.prototype.setEntry = function(entry) {
	//TODO add validation
	//if (this.validator.validateLongIdentifierType(id)){
		this.entry = entry;
		return VariableInfo.NO_SET_ERROR;
	//} else{
	//	return VariableInfo.ERROR_406;
	//}
};
Core.prototype.getEntry = function()  {
	
	var entry =this.entry == null ? "":this.entry;
	var info = new VariableInfo("0", "", entry);
	return info; 

};


Core.prototype.setTotal_time = function(total_time) {
	//TODO add validation
	//if (this.validator.validateLongIdentifierType(id)){
		this.total_time = total_time;
		return VariableInfo.NO_SET_ERROR;
	//} else{
	//	return VariableInfo.ERROR_406;
	//}
};

Core.prototype.getTotal_time = function()  {
	
	var total_time =this.total_time == null ? "":this.total_time;
	var info = new VariableInfo("0", "", total_time);
	return info; 

};

Core.prototype.setLesson_mode = function(lesson_mode) {
	//TODO add validation
	//if (this.validator.validateLongIdentifierType(id)){
		this.lesson_mode = lesson_mode;
		return VariableInfo.NO_SET_ERROR;
	//} else{
	//	return VariableInfo.ERROR_406;
	//}
};


Core.prototype.setExit = function(exit) {
	//TODO add validation
	//if (this.validator.validateLongIdentifierType(id)){
		this.exit = exit;
		return VariableInfo.NO_SET_ERROR;
	//} else{
	//	return VariableInfo.ERROR_406;
	//}
};


Core.prototype.setSession_time = function(session_time) {
	//TODO add validation
	//if (this.validator.validateLongIdentifierType(id)){
		this.session_time = session_time;
		return VariableInfo.NO_SET_ERROR;
	//} else{
	//	return VariableInfo.ERROR_406;
	//}
};

Core.prototype.getSession_time = function()  {
	
	var session_time =this.session_time == null ? "":this.session_time;
	var info = new VariableInfo("0", "", session_time);
	return info; 

};