return;
}
Integer zoneID = ((DBSecondaryZone)zone).getZoneID();
TransactionHandler transactionHandler = null;
try {
transactionHandler = zoneDAO.createTransaction();
DBZone dbZone = this.zoneDAO.get(new HighLevelQuery<DBZone>(this.zoneIDQueryParameterFactory.getParameter(zoneID),(Field)null),transactionHandler);
if(dbZone == null){
log.warn("Unable to find secondary zone with zoneID " + zoneID + " in DB, ignoring zone update");
return;
}
dbZone.parse(zone.getZoneCopy(), true);
zoneDAO.update(dbZone,transactionHandler, null);
recordDAO.delete(new HighLevelQuery<DBRecord>(recordZoneQueryParameterFactory.getParameter(dbZone),(Field)null), transactionHandler);
if(dbZone.getRecords() != null){
for(DBRecord dbRecord : dbZone.getRecords()){
dbRecord.setZone(dbZone);
this.recordDAO.add(dbRecord, transactionHandler, null);
}
}
transactionHandler.commit();
log.debug("Changes in seconday zone " + dbZone + " saved");
} catch (SQLException e) {