/**
 * Retorna os dados do usuario.
 * 
 * @param colleagueId: Matricula do usuario.
 * @returns {User}.
 */
function getUser(colleagueId){
	var constraints = new Array();
	var dataset = null;
	var user = {"colleagueName":"","login":""};
	
	constraints.push(DatasetFactory.createConstraint("colleaguePK.colleagueId", colleagueId, colleagueId, ConstraintType.MUST));
	//constraints.push(DatasetFactory.createConstraint("colleaguePK.companyId", 1, 1, ConstraintType.MUST));
	
	dataset = DatasetFactory.getDataset("colleague", null, constraints, null);
	
	if(dataset.rowsCount > 0) {
		user.colleagueName = dataset.getValue(0,"colleagueName").toUpperCase();
		user.login = dataset.getValue(0,"login");
	}
	else{
		log.error("Usuario nao encontrado para a matricula: "+colleagueId);
		throw("Usuario nao encontrado para a matricula: "+colleagueId);
	}
	
	return user;
}