public FloorBedSpaceLayoutVo listLayoutForCurrentBay(ILocation location) { if(location == null ) throw new DomainRuntimeException("Invalid ILocation"); String hql = "select layout from BayConfig as bc left join bc.bay as bay left join bc.floorBedSpaceLayout as layout where layout.status.id = " + PreActiveActiveInactiveStatus.ACTIVE.getID() + " and bay.id = " + location.getID(); List layout = getDomainFactory().find(hql); FloorBedSpaceLayoutVoCollection voColl = FloorBedSpaceLayoutVoAssembler.createFloorBedSpaceLayoutVoCollectionFromFloorBedSpaceLayout(layout); if (voColl != null && voColl.size() > 0) return voColl.get(voColl.size()-1); return null; }
public FloorBedSpaceLayoutVo listLayoutForCurrentBay(ILocation selectedBay) { if(selectedBay == null ) throw new DomainRuntimeException("Invalid ILocation"); String hql = "select layout from BayConfig as bc left join bc.bay as bay left join bc.floorBedSpaceLayout as layout where layout.status.id = " + PreActiveActiveInactiveStatus.ACTIVE.getID() + " and bay.id = " + selectedBay.getID(); List layout = getDomainFactory().find(hql); FloorBedSpaceLayoutVoCollection voColl = FloorBedSpaceLayoutVoAssembler.createFloorBedSpaceLayoutVoCollectionFromFloorBedSpaceLayout(layout); if (voColl != null && voColl.size() > 0) return voColl.get(voColl.size()-1); return null; }
public FloorBedSpaceLayoutVo listLayoutForCurrentBay(ILocation location) { if(location == null ) throw new DomainRuntimeException("Invalid ILocation"); String hql = "select layout from BayConfig as bc left join bc.bay as bay left join bc.floorBedSpaceLayout as layout where layout.status.id = " + PreActiveActiveInactiveStatus.ACTIVE.getID() + " and bay.id = " + location.getID(); List<?> layout = getDomainFactory().find(hql); FloorBedSpaceLayoutVoCollection voColl = FloorBedSpaceLayoutVoAssembler.createFloorBedSpaceLayoutVoCollectionFromFloorBedSpaceLayout(layout); if (voColl != null && voColl.size() > 0) return voColl.get(voColl.size()-1); return null; }