public ims.core.vo.FloorBedSpaceLayoutLiteVoCollection listFloorBedLayouts() { DomainFactory factory = getDomainFactory(); String hql = " from FloorBedSpaceLayout fl"; ArrayList markers = new ArrayList(); ArrayList values = new ArrayList(); hql += " where fl.status.id = :status"; markers.add("status"); values.add(PreActiveActiveInactiveStatus.ACTIVE.getID()); hql += " and fl.isTemplate = :isTemplate"; markers.add("isTemplate"); values.add(Boolean.TRUE); //hql += " and fl.id not in ( select distinct fl.id from BayConfig as bc left join bc.floorBedSpaceLayout as fl ) "; FloorBedSpaceLayoutLiteVoCollection voCollFloorBedLayout = FloorBedSpaceLayoutLiteVoAssembler.createFloorBedSpaceLayoutLiteVoCollectionFromFloorBedSpaceLayout(factory.find(hql, markers, values)); return voCollFloorBedLayout; }
public ims.core.vo.FloorBedSpaceLayoutLiteVoCollection listFloorBedLayouts() { DomainFactory factory = getDomainFactory(); String hql = " from FloorBedSpaceLayout fl"; ArrayList<String> markers = new ArrayList<String>(); ArrayList<Object> values = new ArrayList<Object>(); hql += " where fl.status.id = :status"; markers.add("status"); values.add(PreActiveActiveInactiveStatus.ACTIVE.getID()); hql += " and fl.isTemplate = :isTemplate"; markers.add("isTemplate"); values.add(Boolean.TRUE); //hql += " and fl.id not in ( select distinct fl.id from BayConfig as bc left join bc.floorBedSpaceLayout as fl ) "; FloorBedSpaceLayoutLiteVoCollection voCollFloorBedLayout = FloorBedSpaceLayoutLiteVoAssembler.createFloorBedSpaceLayoutLiteVoCollectionFromFloorBedSpaceLayout(factory.find(hql, markers, values)); return voCollFloorBedLayout; }
@SuppressWarnings("unchecked") public FloorBedSpaceLayoutLiteVoCollection listFloorBedLayouts() { DomainFactory factory = getDomainFactory(); String hql = " from FloorBedSpaceLayout fl"; ArrayList markers = new ArrayList(); ArrayList values = new ArrayList(); hql += " where fl.status.id = :status"; markers.add("status"); values.add(PreActiveActiveInactiveStatus.ACTIVE.getID()); return FloorBedSpaceLayoutLiteVoAssembler.createFloorBedSpaceLayoutLiteVoCollectionFromFloorBedSpaceLayout(factory.find(hql, markers, values)); }
/** * Lists all floor layouts */ public ims.core.vo.FloorBedSpaceLayoutLiteVoCollection list(Boolean templatesOnly, PreActiveActiveInactiveStatus status) { if (templatesOnly == null) throw new CodingRuntimeException("templatesOnly is null or id not provided in method list"); DomainFactory factory = getDomainFactory(); String hql = " from FloorBedSpaceLayout fbl "; ArrayList markers = new ArrayList(); ArrayList values = new ArrayList(); StringBuffer sb = new StringBuffer(); String andStr = ""; if(templatesOnly) { sb.append(andStr + "fbl.isTemplate = :isTemplate"); markers.add("isTemplate"); values.add(templatesOnly); andStr = " and "; } if(status != null) { sb.append(andStr + "fbl.status = :activeStatus"); markers.add("activeStatus"); values.add(getDomLookup(status)); andStr = " and "; } if(markers.size() > 0) { hql += "where "; hql += sb.toString(); } return FloorBedSpaceLayoutLiteVoAssembler.createFloorBedSpaceLayoutLiteVoCollectionFromFloorBedSpaceLayout(factory.find(hql, markers, values)); }
/** * Lists all floor layouts */ public ims.core.vo.FloorBedSpaceLayoutLiteVoCollection list() { DomainFactory factory = getDomainFactory(); String hql = " from FloorBedLayout fbl where fbl.status.id = " + PreActiveActiveInactiveStatus.ACTIVE.getID(); return FloorBedSpaceLayoutLiteVoAssembler.createFloorBedSpaceLayoutLiteVoCollectionFromFloorBedSpaceLayout(factory.find(hql)).sort(); }