@SuppressWarnings("unchecked") public AppFormVoCollection listFormsByName(String formName) { // Similar to FormHelpImpl method, though this includes dialogs if (formName == null) throw new CodingRuntimeException("Cannot search on null Form Name!"); DomainFactory factory = getDomainFactory(); /* String hql = " from AppForm app where app.isAlias != true and app.isComponent != true and app.namespace is not null " + " and app.name like :formName";*/ String hql = " from AppForm app where app.isComponent != true and app.namespace is not null " + " and upper(app.name) like upper(:formName)"; if (formName.indexOf("%") == -1) formName += "%"; List lst = factory.find(hql, new String[]{"formName"}, new Object[]{formName}); return AppFormVoAssembler.createAppFormVoCollectionFromAppForm(lst); }
public ims.admin.vo.AppFormVoCollection listForms(String form, Boolean includeAliases, Boolean includeDialogs) { DomainFactory factory = getDomainFactory(); IMSCriteria imsc = new IMSCriteria(AppForm.class,factory); imsc.like(AppForm.FieldNames.Name, "%" + form + "%"); // Include aliases if (!Boolean.TRUE.equals(includeAliases)) { imsc.equal(AppForm.FieldNames.IsAlias, false); } // Include dialogs if (!Boolean.TRUE.equals(includeDialogs)) { imsc.equal(AppForm.FieldNames.IsDialog, false); } List<AppForm> forms = imsc.find(); if (forms != null && forms.size() > 0) return AppFormVoAssembler.createAppFormVoCollectionFromAppForm(forms); return null; }
public AppFormVoCollection listForms(String nameFilter) { DomainFactory factory = getDomainFactory(); String hql = " from AppForm af where upper(af.name) like :name and af.isComponent = :isComp and af.isAlias = :isAlias"; String filter = "%" + nameFilter.trim().toUpperCase() + "%"; return AppFormVoAssembler.createAppFormVoCollectionFromAppForm(factory.find(hql, new String[]{"name", "isComp", "isAlias"}, new Object[]{filter, Boolean.FALSE, Boolean.FALSE})).sort(); }
public ims.admin.vo.AppFormVo getAppForm(Integer id) { if (id == null ) return null; DomainFactory factory = (DomainFactory) getDomainFactory(); AppForm appDO = (AppForm)factory.getDomainObject(AppForm.class,id); return AppFormVoAssembler.create(appDO); }
public AppFormVoCollection listFormByName(String formName) { if (formName == null) throw new CodingRuntimeException("Cannot search on null Form Name!"); DomainFactory factory = getDomainFactory(); String hql = " from AppForm app where app.isComponent != true " + " and upper(app.name) like :formName"; if (formName.indexOf("%") == -1) formName += "%"; List lst = factory.find(hql, new String[]{"formName"}, new Object[]{formName.toUpperCase()}); return AppFormVoAssembler.createAppFormVoCollectionFromAppForm(lst); }
public AppFormVoCollection listFormsWithHelpUrl() { DomainFactory factory = getDomainFactory(); String hql = " from AppForm app where app.isComponent != true " + " and app.helpLink != null"; List lst = factory.find(hql); return AppFormVoAssembler.createAppFormVoCollectionFromAppForm(lst); }
public IAppForm getForm(int formId) { DomainFactory factory = getDomainFactory(); AppForm domForm = (AppForm)factory.getDomainObject(AppForm.class, formId); return AppFormVoAssembler.create(domForm); }
public IAppForm[] getAllForms() { DomainFactory factory = getDomainFactory(); List l = factory.find("from AppForm", 5000); return AppFormVoAssembler.createAppFormVoCollectionFromAppForm(l).toIAppFormArray(); }
public AppFormVo getForm(AppFormRefVo form) { return AppFormVoAssembler.create((AppForm)getDomainFactory().getDomainObject(form)); }
public AppFormVoCollection listNavigableForms() { String hql = " from AppForm af where af.isDialog = :isDialog and af.isComponent = :isComponent and af.canBeInNavigation = :canBeInNavigation"; return AppFormVoAssembler.createAppFormVoCollectionFromAppForm(getDomainFactory().find(hql, new String[]{"isDialog","isComponent","canBeInNavigation"}, new Object[]{Boolean.FALSE, Boolean.FALSE, Boolean.TRUE},500)).sort(); }
public AppFormVo getAppForm(Integer formId) { return AppFormVoAssembler.create((AppForm)getDomainFactory().getDomainObject(AppForm.class, formId)); }