/*
* (non-Javadoc)
* @see org.encuestame.core.service.imp.ISurveyService#newSurvey(org.encuestame.utils.web.SurveyBean)
*/
private Survey newSurvey(final SurveyBean surveyBean){
final Survey surveyDomain = new Survey();
surveyDomain.setTicket(surveyBean.getTicket());
surveyDomain.setStartDate(surveyBean.getStartDate());
surveyDomain.setEndDate(surveyBean.getEndDate());
surveyDomain.setDateInterview(surveyBean.getDateInterview());
surveyDomain.setComplete(surveyBean.getComplete());
surveyDomain.setCustomMessage(surveyBean.getCustomMessage());
surveyDomain.setCustomStartMessages(surveyBean.getCustomStartMessages());
surveyDomain.setShowProgressBar(surveyBean.getShowProgressBar());
surveyDomain.setOptionalTitle(surveyBean.getOptionalTitle());
surveyDomain.setPassProtection(surveyBean.getPassProtection());
surveyDomain.setIpProtection(surveyBean.getIpProtection());
surveyDomain.setIpRestriction(surveyBean.getIpRestriction());
surveyDomain.setPasswordRestrictions(surveyBean.getPasswordRestrictions());
surveyDomain.setCloseAfterDate(surveyBean.getCloseAfterDate());
surveyDomain.setCloseAfterquota(surveyBean.getCloseAfterquota());
surveyDomain.setCloseAfterquota(surveyBean.getCloseAfterquota());
surveyDomain.setClosedQuota(surveyBean.getClosedQuota());
//surveyDomain.setShowResults(surveyBean.getShowResults());
surveyDomain.setNumbervotes(surveyBean.getNumbervotes());
surveyDomain.setHits(surveyBean.getHits());
surveyDomain.setAdditionalInfo(surveyBean.getAdditionalInfo());
surveyDomain.setShowAdditionalInfo(surveyBean.getShowAdditionalInfo());
surveyDomain.setNotifications(surveyBean.getNotifications());
surveyDomain.setName(surveyBean.getName());
surveyDomain.setCreateDate(surveyBean.getCreatedAt());
surveyDomain.setFavourites(surveyBean.getFavorites());
try {
surveyDomain.setOwner(getAccount(surveyBean.getOwnerUsername()));
surveyDomain.setEditorOwner(getUserAccount(surveyBean.getOwnerUsername()));
} catch (EnMeNoResultsFoundException e) {
log.debug("Survey user not found");
}
getSurveyDaoImp().saveOrUpdate(surveyDomain);