public PrintAgentVo savePrintAgent(PrintAgentVo printAgent) throws StaleObjectException { if (!printAgent.isValidated()) { throw new DomainRuntimeException("PrintAgentVo has not been validated"); } DomainFactory factory = getDomainFactory(); PrintAgent doPrintAgent = PrintAgentVoAssembler.extractPrintAgent(factory, printAgent); Iterator it = doPrintAgent.getTemplatePrinters().iterator(); while (it.hasNext()) factory.save((TemplatePrinter) it.next()); factory.save(doPrintAgent); return PrintAgentVoAssembler.create(doPrintAgent); }
/** * savePrintAgent */ public ims.admin.vo.PrintAgentVo savePrintAgent(ims.admin.vo.PrintAgentVo printAgent) throws ims.domain.exceptions.StaleObjectException { if (!printAgent.isValidated()) { throw new DomainRuntimeException("PrintAgentVo has not been validated"); } DomainFactory factory = getDomainFactory(); PrintAgent doPrintAgent = PrintAgentVoAssembler.extractPrintAgent(factory, printAgent); Iterator it = doPrintAgent.getTemplatePrinters().iterator(); while (it.hasNext()) factory.save((TemplatePrinter) it.next()); factory.save(doPrintAgent); return PrintAgentVoAssembler.create(doPrintAgent); }
public PrintAgentVoCollection listPrintAgents() { DomainFactory factory = getDomainFactory(); List list = factory.find("from PrintAgent pa order by pa.description"); //wdev-11600 return PrintAgentVoAssembler.createPrintAgentVoCollectionFromPrintAgent(list); //wdev-11600 }
public PrintAgentVo getPrintAgent(Integer jobId) { DomainFactory factory = getDomainFactory(); PrintAgent obj = (PrintAgent) factory.getDomainObject(PrintAgent.class, jobId); factory.refresh(obj); return PrintAgentVoAssembler.create(obj); }
/** * listPrintAgents */ public ims.admin.vo.PrintAgentVoCollection listPrintAgents() { DomainFactory factory = getDomainFactory(); //we list CARE_UK jobs only List list = factory.find("from PrintAgent pa where pa.jobType.id in (-1593) order by pa.id"); return PrintAgentVoAssembler.createPrintAgentVoCollectionFromPrintAgent(list).sort(); }
/** * getPrintAgent */ public ims.admin.vo.PrintAgentVo getPrintAgent(Integer jobId) { DomainFactory factory = getDomainFactory(); PrintAgent obj = (PrintAgent) factory.getDomainObject(PrintAgent.class, jobId); factory.refresh(obj); return PrintAgentVoAssembler.create(obj); }