statement.executeUpdate("INSERT INTO " + departmentTable + "(name, code) VALUES ('"
+ department.getName() + "', '" + department.getCode() + "')");
log("Department '" + department.getName() + "' created with code = '" + department.getCode()+ "'");
} catch (SQLException ex) {
Logger.getLogger(PersistenceManager.class.getName()).log(Level.SEVERE, null, ex);
throw new PersistenceManagerException();
} finally {
this.close(statement);
}
}