private void makePlateActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_makePlateActionPerformed // TODO add your handling code here: platetypeList = Collector.getAllLinksOf(ObjType.PLATE_TYPE); authorList = Collector.getAllLinksOf(ObjType.PERSON); int authorSelect = this.jComboBoxAuthor.getSelectedIndex(); int plateTypeSelect = this.jComboBoxPlateType.getSelectedIndex(); ObjLink plateLink = platetypeList.get(plateTypeSelect); ObjLink personLink = authorList.get(authorSelect); Person testPerson = Collector.getPerson(personLink.uuid); PlateType testType = Collector.getPlateType(plateLink.uuid); Plate testPlate = new Plate(this.plateName.getText(), testType, testPerson); if (this.location.getText() != null) { testPlate.setLocation(this.location.getText()); } if (this.barCode.getText() != null) testPlate.setBarcode(this.barCode.getText()); boolean didWork = testPlate.saveDefault(); System.out.println("write plate to DB:" + didWork); this.parentFrame.setVisible(false); frame aframe = new frame(testPlate); hub.guis.add(new WeakReference(aframe)); } // GEN-LAST:event_makePlateActionPerformed
public Person getAuthor() { return Collector.getPerson(_plateDatum._authorUUID); }