/**
  * Search for {@link JpaSurvey} specified by id.
  *
  * @param id
  * @return
  */
 @Override
 @Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
 public SurveyDTO getSurvey(long id) {
   JpaSurvey jpaSurvey = jpaSurveyDao.getSurvey(id);
   if (jpaSurvey == null) {
     return null;
   }
   SurveyDTO result = surveyMapper.toSurvey(jpaSurvey);
   result.retrieveText(this);
   return result;
 }
 @Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
 @Override
 public SurveyDTO getSurveyByName(String surveyName) {
   JpaSurvey jpaSurvey = jpaSurveyDao.getSurveyByCanonicalName(surveyName);
   if (jpaSurvey == null) {
     return null;
   }
   SurveyDTO result = surveyMapper.toSurvey(jpaSurvey);
   result.retrieveText(this);
   return result;
 }
 /**
  * Return all surveys
  *
  * @return
  */
 @Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
 @Override
 public List<SurveyDTO> getAllSurveys() {
   List<JpaSurvey> surveyList = jpaSurveyDao.getAllSurveys();
   if (surveyList == null) {
     return null;
   }
   List<SurveyDTO> results = surveyMapper.toSurveyList(surveyList);
   for (SurveyDTO surveyDTO : results) {
     surveyDTO.retrieveText(this);
   }
   return results;
 }