public TaxonomyUploadVo saveCodeLoaderDef(TaxonomyUploadVo codeLoaderDef) throws DomainInterfaceException, StaleObjectException, ForeignKeyViolationException { if (!codeLoaderDef.isValidated()) { throw new DomainRuntimeException("Column Map VO has not been validated."); } DomainFactory factory = getDomainFactory(); TaxonomyUpload tmBo = TaxonomyUploadVoAssembler.extractTaxonomyUpload(factory, codeLoaderDef); if (codeLoaderDef.getID_TaxonomyUploadIsNotNull()) { //update factory.update(tmBo); } else { //insert factory.save(tmBo); } return TaxonomyUploadVoAssembler.create(tmBo); }
@Override protected void onImbUploadClick() throws PresentationLogicException { TaxonomyUploadVo vo = null; //First check a definition is set up if (form.getLocalContext().getcodeLoaderDefIsNotNull()) { //do a get again to make sure the loader def is up to date try { vo = domain.getCodeLoaderDef(form.getLocalContext().getcodeLoaderDef()); } catch (DomainInterfaceException e) { } if (vo != null) { form.getLocalContext().setcodeLoaderDef(vo); //Upload Taxonomy uploadTaxonomy(); } else engine.showMessage("Error getting Coade Loader Definition."); return; } }
public TaxonomyUploadVo getCodeLoaderDef(TaxonomyUploadRefVo codeLoaderDefRef) throws DomainInterfaceException { if(codeLoaderDefRef == null || codeLoaderDefRef.getBoId() == null) throw new DomainInterfaceException("Invalid TaxonomyUpload reference"); return TaxonomyUploadVoAssembler.create((TaxonomyUpload)getDomainFactory().getDomainObject(codeLoaderDefRef)); }
public TaxonomyUploadVo getCodeLoaderDef(Integer externalCodeTypeId, Integer taxonomyElementId) throws DomainInterfaceException { if(externalCodeTypeId == null) throw new DomainInterfaceException("Invalid TaxonomyUpload reference"); DomainFactory factory = getDomainFactory(); String hql = " from TaxonomyUpload as ct where ct.taxonomyCode = " + externalCodeTypeId + " and ct.taxonomyElement = " + taxonomyElementId; List taxMap = factory.find(hql); if (taxMap != null && taxMap.size() > 0) return TaxonomyUploadVoAssembler.create((TaxonomyUpload)taxMap.get(0)); return null; }
@Override protected void onImbUploadClick() throws PresentationLogicException { TaxonomyUploadVo vo = null; //First check a definition is set up if (form.getLocalContext().getcodeLoaderDefIsNotNull()) { //do a get again to make sure the loader def is up to date try { vo = domain.getCodeLoaderDef(form.getLocalContext().getcodeLoaderDef()); } catch (DomainInterfaceException e) { } if (vo != null) { form.getLocalContext().setcodeLoaderDef(vo); //Upload Taxonomy uploadTaxonomy(); } else engine.showMessage("Error getting Code Loader Definition."); return; } }