in DeliveryApi/ApiHandlers/src/com/ilmlf/delivery/api/handlers/service/SlotService.java [68:93]
public int insertSlotList(List<Slot> slots) throws SQLException {
this.con = refreshDbConnection();
Integer rowsUpdated = 0;
try {
this.con.setAutoCommit(false); // for transaction handling
for (Slot slot : slots) {
rowsUpdated += this.insertSlot(slot);
}
if (slots.size() == rowsUpdated) {
this.con.commit();
} else {
this.con.rollback();
rowsUpdated = 0;
}
} catch (SQLException e) {
logger.error(e.getMessage(), e);
this.con.rollback();
rowsUpdated = 0;
}
return rowsUpdated;
}