Exemple #1
0
 /**
  * Controlla l'esistenza dell'oggetto nel database e nel caso non sia presente registra su DB i
  * dati contenuti nel <code>model</code>.
  *
  * @param model
  * @return boolean<br>
  *     -<code>true</code> se la registrazione su DB avviene con successo -<code>false</code> se
  *     l'oggetto esisteva già
  * @throws SQLException
  * @throws Exception
  */
 static boolean insert(Regione model) throws SQLException, Exception {
   NazioneManager.insert(model.getNazione());
   if (!checkExist(model)) {
     model.setCodice(String.valueOf(count()));
     return RegioneDto.insert(JndiName.dbTakaloa, model);
   }
   return false;
 }