public BedSpaceStateStatusLiteVo getBedSpaceStateStatus(BedSpaceRefVo bedSpaceref) { if (bedSpaceref == null || bedSpaceref.getID_BedSpace() == null) throw new CodingRuntimeException("Cannot get BedSpaceStateStatus on null bedSpaceRef"); String hql = "select bss.currentBedStatus from BedSpaceState as bss left join bss.bedSpace as bs where bs.id = " + bedSpaceref.getID_BedSpace(); List bedSpaces = getDomainFactory().find(hql); BedSpaceStateStatusLiteVoCollection voColl = BedSpaceStateStatusLiteVoAssembler.createBedSpaceStateStatusLiteVoCollectionFromBedSpaceStateStatus((bedSpaces)); if (voColl != null && voColl.size() > 0) return voColl.get(0); return null; }
public BedSpaceStateStatusLiteVo getBedSpaceStateStatus(BedSpaceRefVo bedSpaceref) { if (bedSpaceref == null || bedSpaceref.getID_BedSpace() == null) throw new CodingRuntimeException("Cannot get BedSpaceStateStatus on null bedSpaceRef"); String hql = "select bss.currentBedStatus from BedSpaceState as bss left join bss.bedSpace as bs where bs.id = " + bedSpaceref.getID_BedSpace(); List<?> bedSpaces = getDomainFactory().find(hql); BedSpaceStateStatusLiteVoCollection voColl = BedSpaceStateStatusLiteVoAssembler.createBedSpaceStateStatusLiteVoCollectionFromBedSpaceStateStatus((bedSpaces)); if (voColl != null && voColl.size() > 0) return voColl.get(0); return null; }