public WardBayConfigVo getWardBayConfigByWard(LocationRefVo ward) { if (ward == null || ward.getID_Location() == null) throw new CodingRuntimeException("ward is null or id not provided in method getWardBayConfigByWard"); DomainFactory factory = getDomainFactory(); List lstWbc = factory.find("from WardBayConfig wbc where wbc.ward.id = '" + ward.getID_Location() + "'"); if(lstWbc != null && lstWbc.size() == 1) return WardBayConfigVoAssembler.create((WardBayConfig) lstWbc.get(0)); return null; }
public WardBayConfigVo getWardBayConfigByWard(LocationRefVo ward) { if (ward == null || ward.getID_Location() == null) throw new CodingRuntimeException("ward is null or id not provided in method getWardBayConfigByWard"); DomainFactory factory = getDomainFactory(); List<?> lstWbc = factory.find("from WardBayConfig wbc where wbc.ward.id = '" + ward.getID_Location() + "'"); if(lstWbc != null && lstWbc.size() == 1) return WardBayConfigVoAssembler.create((WardBayConfig) lstWbc.get(0)); return null; }