//  @import com.hedgehoglab.application.model.BaseModel;

function TaskTypeModel(scope){
    BaseModel.call(this,scope);
    var _model=null;
    var _revserse_lookup=null;

    this.model=function(model){
        if(arguments.length>0){
			_model=model;
			this.raise_event('model_changed',{
				model: _model
			});
		}
		return _model;
	};

  this.type_by_id=function(id){
    if(!_revserse_lookup){
      _revserse_lookup={};
    }
    $.each(_model.taskType,function(i,n){
      _revserse_lookup[n.id]={index:i,item:n};
    })
    return _revserse_lookup[id].item;
  };
};