*/
public static final UnitProjectBean convertProjectDomainToBean(
final Project project) {
final SimpleDateFormat simpleDateFormat = new SimpleDateFormat(
DateUtil.DEFAULT_FORMAT_DATE);
final UnitProjectBean projectBean = new UnitProjectBean();
projectBean.setName(project.getProjectDescription());
projectBean.setDateFinish(project.getProjectDateFinish());
projectBean.setDateInit(project.getProjectDateStart());
projectBean.setId(project.getProyectId());
projectBean.setDescription(project.getProjectDescription());
projectBean.setName(project.getProjectName());
projectBean.setProjectInfo(project.getProjectInfo());
if (project.getLead() != null) {
projectBean.setLeader(project.getLead().getUid());
}
projectBean.setPriority(project.getPriority().name());
projectBean.setPublished(project.getPublished());
projectBean.setState(project.getProjectStatus().name());
if (project.getProjectDateStart() != null) {
projectBean.setFormatedDateInit(simpleDateFormat.format(project
.getProjectDateStart()));
}
if (project.getProjectDateFinish() != null) {
projectBean.setFormatedDateFinish(simpleDateFormat.format(project
.getProjectDateFinish()));
}
projectBean.setHide(project.getHideProject());
projectBean.setNotify(project.getNotifyMembers());
// TODO: add other properties.
log.debug("project bean converted " + projectBean.toString());
return projectBean;
}