public ims.ocrr.vo.DFTCollectionTypesConfigVo save(ims.ocrr.vo.DFTCollectionTypesConfigVo record) throws ims.domain.exceptions.StaleObjectException, ims.domain.exceptions.UniqueKeyViolationException { if( record == null ) throw new CodingRuntimeException("DFTCollectionTypesConfigVo not provided "); if( record.getID_DFTCollectionTypesConfig() == null) { if( getDFTCollectionTypesConfigVo() != null ) { throw new UniqueKeyViolationException(); } } DomainFactory factory = getDomainFactory(); DFTCollectionTypesConfig doDFTCollectionTypesConfig = DFTCollectionTypesConfigVoAssembler.extractDFTCollectionTypesConfig(factory, record); factory.save(doDFTCollectionTypesConfig); return DFTCollectionTypesConfigVoAssembler.create(doDFTCollectionTypesConfig); }
public ims.ocrr.vo.DFTCollectionTypesConfigVo getDFTCollectionTypesConfigVo() { DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(); hql.append(" from DFTCollectionTypesConfig as d1_1 where (d1_1.isRIE is null ) "); List list = factory.find(hql.toString()); if( list != null && list.size() > 0) { ims.ocrr.vo.DFTCollectionTypesConfigVo dtftype = DFTCollectionTypesConfigVoAssembler.createDFTCollectionTypesConfigVoCollectionFromDFTCollectionTypesConfig(list).get(0); return dtftype; } return null; }
public DFTCollectionTypesConfigVo getDFTCollectionTypes() { String query = " from DFTCollectionTypesConfig as dftConfig where (dftConfig.isRIE is null )"; return DFTCollectionTypesConfigVoAssembler.create((DFTCollectionTypesConfig) getDomainFactory().findFirst(query)); }