try { Collection bioSources = IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getBioSourceDao().getByShortLabelLike(shortlabel);
Collection<BioSource> bioSources = getDaoFactory().getBioSourceDao().getByTaxonId( taxId );
BioSource result = getDaoFactory().getBioSourceDao().getByAc( ac ); if ( result == null ) {
.getBioSourceDao().getByTaxonId(taxid); IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getCurrentInstance(IntactContext.getCurrentInstance()).getBioSourceDao().persist( bs ); .getBioSourceDao().update( bs );
IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getBioSourceDao().update( bioSource );
/** * TODO: uniqueness - taxid,celltype,tissue */ protected BioSource fetchFromDataSource(BioSource intactObject) { if (intactObject.getTaxId() == null) { throw new IllegalArgumentException("Organism without a tax id"); } // TODO: this will fail with specific celltype return getIntactContext().getDataContext().getDaoFactory() .getBioSourceDao().getByTaxonIdUnique(intactObject.getTaxId()); }
sourceDao.saveOrUpdate( bioSource );
.getBioSourceDao().getByTaxonId(taxid); IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getCurrentInstance(IntactContext.getCurrentInstance()).getBioSourceDao().persist( bs ); .getBioSourceDao().update( bs );
BioSource biosource = bsDao.getByTaxonIdUnique( taxid );
.getBioSourceDao().getByTaxonId(taxid); IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getCurrentInstance(IntactContext.getCurrentInstance()).getBioSourceDao().persist( bs ); .getBioSourceDao().update( bs );
try { Collection bioSources = IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getBioSourceDao().getByShortLabelLike(shortlabel);
Collection<BioSource> bioSources = getDaoFactory().getBioSourceDao().getByTaxonId( taxId );
BioSource result = getDaoFactory().getBioSourceDao().getByAc(ac); if ( result == null ) {
try { Collection bioSources = IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getBioSourceDao().getByShortLabelLike(shortlabel);
Collection<BioSource> bioSources = getDaoFactory().getBioSourceDao().getByTaxonId( taxId );