class SurveyStyleManagerImpl implements SurveyStyleManager {

	@Autowired
	private SurveyStyleDao surveyStyleDao;
	
	public SurveyStyle get(String id) {
		return surveyStyleDao.findUniqueBy("id", id);
	}
	
	public SurveyStyle getBySurveyId(String surveyId) {
		Criterion cri1=Restrictions.eq("surveyId", surveyId);
		return surveyStyleDao.findFirst(cri1);
	}
	
	@Transactional
	public void save(SurveyStyle surveyStyle){<FILL_FUNCTION_BODY>}
	
}

		String surveyId = surveyStyle.getSurveyId();
		SurveyStyle upSurveyStyle = getBySurveyId(surveyId);
		if(upSurveyStyle!=null){
			ReflectionUtils.copyAttr(surveyStyle,upSurveyStyle);
			surveyStyleDao.save(upSurveyStyle);
		}else{
			surveyStyleDao.save(surveyStyle);
		}
	
<no_super_class>