if(activity.getEnteredId()!=null) {
User enteredBy = userDao.get(activity.getEnteredId());
activity.setEnteredBy(enteredBy);
}
if(activity.getProjectId()!=null) {
Project project = projectDao.get(activity.getProjectId());
activity.setProject(project);
}
if(activity.getParentId()!=null) {
Activity parent = activityDao.get(activity.getParentId());
activity.setParent(parent);