Created
November 2, 2012 17:56
-
-
Save anonymous/4003175 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static SeccionCedula seccionCedula | |
static Pregunta pregunta | |
static Set<Pregunta> p | |
def static reactivosBase(Session session, String pregunta_id, String seccion_nombre){ | |
seccionCedula = new SeccionCedula() | |
pregunta = new Pregunta() | |
seccionCedula.nombre = seccion_nombre | |
pregunta_id.split(",").forEach([ | |
println("****split id's: "+ it) | |
pregunta.id = try {Integer::parseInt(it)} catch (Exception e) { 0 } | |
seccionCedula.obligatorias.add(pregunta) | |
) | |
]) | |
session.saveOrUpdate(seccionCedula) | |
return seccionCedula | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment