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

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