8485868788899091929394
return mf; } private CarModel createModel (Manufacturer mf, String name) { CarModel cm = new CarModel(); cm.setName(name); cm.setManufacturer(mf); mf.getModels().add(cm); return cm; }
132133134135136137138139140141142
/* * Create initial data */ Manufacturer mf = createManufacture("Opel"); for (String model : MODELS) { CarModel m = createModel(mf, model); /* * Five cars for each model */ for (int i=0;i<5;i++) {