protected void onFormDialogClosed(FormName formName, DialogResult result) throws PresentationLogicException { if (result.equals(DialogResult.OK)&& form.getLocalContext().getEditOrganisationLocalContext()==false) { form.getLocalContext().setLocalContextOrgPCTCode(form.getGlobalContext().Admin.getOrganisationPCTLinkConfigGlobalContext()); save(); } else if (result.equals(DialogResult.OK) && form.getLocalContext().getEditOrganisationLocalContext()==true) { OrganisationPCTLinkConfigVoCollection orgPCTCodeCollection = domain.gePCTCodeForOrganisation(form.treOrgPCTCode().getValue().toString()); for (int i=0;i<orgPCTCodeCollection.size();i++) { form.getLocalContext().setLocalContextOrgPCTCode(orgPCTCodeCollection.get(i)); form.getLocalContext().getLocalContextOrgPCTCode().setOrganisationCode(form.getGlobalContext().Admin.getOrganisationPCTLinkConfigGlobalContext().getOrganisationCode()); save(); } } open(); }
public ims.admin.vo.OrganisationPCTLinkConfigVoCollection listOrganisationPCTCode() { DomainFactory factory = getDomainFactory(); String query = "from OrganisationPCTLinkConfig as orgPctCode"; List<?> organisationPCTList = factory.find(query); return OrganisationPCTLinkConfigVoAssembler.createOrganisationPCTLinkConfigVoCollectionFromOrganisationPCTLinkConfig(organisationPCTList); }
public OrganisationPCTLinkConfigVoCollection gePCTCodeForOrganisation(String organisation) { DomainFactory factory = getDomainFactory(); String query = "from OrganisationPCTLinkConfig as orgPctCode where orgPctCode.organisationCode = :organisation"; List<?> organisationPCTList = factory.find(query,new String[]{"organisation"} , new Object[] {organisation}); return OrganisationPCTLinkConfigVoAssembler.createOrganisationPCTLinkConfigVoCollectionFromOrganisationPCTLinkConfig(organisationPCTList); }