src/main/java/fr/insee/pogues/persistence/query/QuestionnairesServiceQueryPostgresqlImpl.java
public void createQuestionnaire(JSONObject questionnaire) throws Exception {
		String qString = "INSERT INTO pogues (id, data) VALUES (?, ?)";
		String id = (String) questionnaire.get("id");
		if (null != getQuestionnaireByID(id)) {
			throw new NonUniqueResultException("Entity already exists");
		}
		PGobject q = new PGobject();
		q.setType("json");
		q.setValue(questionnaire.toJSONString());
		jdbcTemplate.update(qString, id, q);
	}
/**
	 * A method to save a new questionnaire in database
	 * 
	 * @param questionnaire the JSON description of the questionnaire
	 */
A method to save a new questionnaire in database

@param questionnaire the JSON description of the questionnaire
A method to save a new questionnaire in database @param questionnaire the JSON description of the questionnaire
public void createQuestionnaire(JSONObject questionnaire) throws Exception {
		String qString = "INSERT INTO pogues (id, data) VALUES (?, ?)";
		String id = (String) questionnaire.get("id");
		if (null != getQuestionnaireByID(id)) {
			throw new NonUniqueResultException("Entity already exists");
		}
		PGobject q = new PGobject();
		q.setType("json");
		q.setValue(questionnaire.toJSONString());
		jdbcTemplate.update(qString, id, q);
	}
public void createQuestionnaire ( JSONObject questionnaire ) throws Exception { String qString = "INSERT INTO pogues (id, data) VALUES (?, ?)" ; String id = ( String ) questionnaire . get ( "id" ) ; if ( null != getQuestionnaireByID ( id ) ) { throw new NonUniqueResultException ( "Entity already exists" ) ; } PGobject q = new PGobject ( ) ; q . setType ( "json" ) ; q . setValue ( questionnaire . toJSONString ( ) ) ; jdbcTemplate . update ( qString , id , q ) ; }
A method to save a new questionnaire in database
A method to save a new questionnaire in database