public BedSpaceStateStatusVo getBedSpaceStateStatus(BedSpaceStateStatusRefVo bedSpaceStateStatus) { if(bedSpaceStateStatus == null || bedSpaceStateStatus.getID_BedSpaceStateStatus() == null) throw new CodingRuntimeException("bedSpaceStateStatus is null or id not provided in method getBedSpaceStateStatus"); return BedSpaceStateStatusVoAssembler.create((BedSpaceStateStatus) getDomainFactory().getDomainObject(bedSpaceStateStatus)); }
private void populateCloseBedTabFromData() { BedSpaceStateStatusVo voStatus = form.getLocalContext().getCloseBedStatus(); clearCloseTab(); if(form.getGlobalContext().Core.getSelectedBedSpaceStateIsNotNull() && form.getGlobalContext().Core.getSelectedBedSpaceState().getCurrentBedStatusIsNotNull()) { BedSpaceStateStatusLiteVo voBedSpaceStateStatus = form.getGlobalContext().Core.getSelectedBedSpaceState().getCurrentBedStatus(); if(voBedSpaceStateStatus.getSysInfoIsNotNull()) { String user = ""; if(voBedSpaceStateStatus.getSysInfo().getLastupdateUser() != null) user = voBedSpaceStateStatus.getSysInfo().getLastupdateUser(); else if(voBedSpaceStateStatus.getSysInfo().getCreationUser() != null) user = voBedSpaceStateStatus.getSysInfo().getCreationUser(); form.lyrDetail().tabCloseBed().cmbLastChangedUser().newRow(user,user); form.lyrDetail().tabCloseBed().cmbLastChangedUser().setValue(user); DateTime dtime = null; if(voBedSpaceStateStatus.getSysInfo().getLastupdateDateTime() != null) dtime = voBedSpaceStateStatus.getSysInfo().getLastupdateDateTime(); else if(voBedSpaceStateStatus.getSysInfo().getCreationDateTime() != null) dtime = voBedSpaceStateStatus.getSysInfo().getCreationDateTime(); form.lyrDetail().tabCloseBed().dtimLastChanged().setValue(dtime); } } if (voStatus != null) { if (voStatus.getSysInfoIsNotNull() && voStatus.getSysInfo().getCreationUser() != null) { form.lyrDetail().tabCloseBed().cmbUser().newRow(voStatus.getSysInfo().getCreationUser(), voStatus.getSysInfo().getCreationUser()); form.lyrDetail().tabCloseBed().cmbUser().setValue(voStatus.getSysInfo().getCreationUser()); } form.lyrDetail().tabCloseBed().cmbCloseReason().setValue(voStatus.getReasonForClosure()); form.lyrDetail().tabCloseBed().dtimClose().setValue(voStatus.getStatusDateTime()); form.lyrDetail().tabCloseBed().dtimEstReOpen().setValue(voStatus.getEstReopeningDateTime()); } else { form.lyrDetail().tabCloseBed().cmbUser().newRow(engine.getLoggedInUser().getUsername(), engine.getLoggedInUser().getUsername()); form.lyrDetail().tabCloseBed().cmbUser().setValue(engine.getLoggedInUser().getUsername()); form.lyrDetail().tabCloseBed().dtimClose().setValue(new DateTime()); } }