public GeneratedEntry addInteractorWithAc(String ac) { Interactor interactor = intactContext.getDataContext().getDaoFactory() .getInteractorDao().getByAc(ac); checkResult(interactor, ac, "interactor"); return addInteractor(interactor); }
public GeneratedEntry addInteractorWithShortLabel(String shortLabel) { Interactor interactor = intactContext.getDataContext().getDaoFactory() .getInteractorDao().getByShortLabel(shortLabel); checkResult(interactor, shortLabel, "interactor"); return addInteractor(interactor); }
public void exportEntries() throws IndexerException { int current = 0; log.debug( "Starting export of " + count + " interactor(s)." ); while ( current < count ) { DaoFactory daoFactory = IntactContext.getCurrentInstance().getDataContext().getDaoFactory(); InteractorDao pdao = daoFactory.getInteractorDao(); IntactContext.getCurrentInstance().getDataContext().beginTransaction(); List<Interactor> interactors = pdao.getInteractorInvolvedInInteraction( current, CHUNK_SIZE ); if ( log.isDebugEnabled() ) { log.debug( "Exporting interactor range " + current + ".." + Math.min( count, current + CHUNK_SIZE ) + " out of " + count ); } for ( Interactor interactor : interactors ) { current++; exportEntry( interactor ); } try { IntactContext.getCurrentInstance().getDataContext().commitTransaction(); } catch ( IntactTransactionException e ) { throw new IndexerException( "Error when closing transaction.", e ); } } }
.getInteractorDao().getColByPropertyName("shortLabel", intactObject.getShortLabel());
public int getEntryCount() throws IndexerException { if ( count == null ) { DaoFactory daoFactory = IntactContext.getCurrentInstance().getDataContext().getDaoFactory(); InteractorDao<InteractorImpl> interactorDao = daoFactory.getInteractorDao(); IntactContext.getCurrentInstance().getDataContext().beginTransaction(); count = interactorDao.countInteractorInvolvedInInteraction(); try { IntactContext.getCurrentInstance().getDataContext().commitTransaction(); } catch ( IntactTransactionException e ) { throw new IndexerException( "Error while closing transaction.", e ); } } return count; }