* Camada view n�o pode acessar entities.
* @param dao Objeto da camada de persist�ncia
* @return objeto convertido
*/
public static GroupTO convertGroupTO(Group dao) {
GroupTO to = new GroupTO();
to.setId(dao.getId());
to.setName(dao.getName());
Map<String, FunctionTO> functions = new HashMap<String, FunctionTO>();
for (GroupFunction gf : dao.getFunctions()) {
Function f = gf.getFunction();
functions.put(f.getName(), convertFunctionTO(f));
}
to.setFunctions(functions);
return to;
}