throw new PersisterException("Problem copying property '"+propertyName+"' from "+source.getClass().getSimpleName()+" "+sourceInfo, e);
throw new PersisterException("Problem copying property '"+propertyName+"' from "+source.getClass().getSimpleName()+" "+sourceInfo, e);
protected void copyInteractorCommons( Interactor source, Interactor target ) { if ( target.getBioSource() != null && source.getBioSource() == null ) { throw new PersisterException( "Operation not permitted: nullifying biosource of a " + target.getClass().getSimpleName() + " (" + target.getShortLabel() + ") - " + " current biosource is " + target.getBioSource().getShortLabel() ); } copyProperty(source, "bioSource", target); copyProperty(source, "cvInteractorType", target); }
protected void copyInteractorCommons( Interactor source, Interactor target ) { if ( target.getBioSource() != null && source.getBioSource() == null ) { throw new PersisterException( "Operation not permitted: nullifying biosource of a " + target.getClass().getSimpleName() + " (" + target.getShortLabel() + ") - " + " current biosource is " + target.getBioSource().getShortLabel() ); } copyProperty(source, "bioSource", target); copyProperty(source, "cvInteractorType", target); }
throw new PersisterException(ao.getClass().getSimpleName() + " without AC couldn't be reloaded because " + "no equivalent object was found in the database: " + ao); BeanUtils.copyProperties(ao, dbObject); } catch (Exception e) { throw new PersisterException("Problem refreshing state for object: "+ao, e);
/** * <p>Returns true if two annotated objects are equal. The generic way to do the check * is:</p> * a) If they have the same AC, consider them equal<br/> * b) Otherwise, clone both objects (excluding the ACs) and invoke equals() on them */ protected boolean areEqual(AnnotatedObject source, AnnotatedObject target) { if (source instanceof CvObject && areCvObjectsEqual((CvObject)source, (CvObject)target)) { return true; } else if (source instanceof Interaction && areInteractionsEqual((Interaction)source, (Interaction)target)) { return true; } // clone both source and target to try a perfect equals on them try { if (clone(source).equals(clone(target))) { return true; } } catch (IntactClonerException e) { throw new PersisterException("Problem cloning source or target, to check if they are equal", e); } return false; }
/** * <p>Returns true if two annotated objects are equal. The generic way to do the check * is:</p> * a) If they have the same AC, consider them equal<br/> * b) Otherwise, clone both objects (excluding the ACs) and invoke equals() on them */ protected boolean areEqual(AnnotatedObject source, AnnotatedObject target) { if (source instanceof CvObject && areCvObjectsEqual((CvObject)source, (CvObject)target)) { return true; } else if (source instanceof Interaction && areInteractionsEqual((Interaction)source, (Interaction)target)) { return true; } // clone both source and target to try a perfect equals on them try { if (clone(source).equals(clone(target))) { return true; } } catch (IntactClonerException e) { throw new PersisterException("Problem cloning source or target, to check if they are equal", e); } return false; }
daoFactory.getBaseDao().persist( ao ); } catch (Exception e) { throw new PersisterException("Problem persisting: "+ao, e); throw new PersisterException("Problem persisting this entity because it contains transient members (invoke saveOrUpdate(transientObject) on those first): ac:"+ac+" - "+entry.getKey(), ise); throw new PersisterException(ise); } else { throw new PersisterException("Problem flushing the entity manager", ise); sb.append(" - No data about the entities (statistics are disabled)"); throw new PersisterException( sb.toString(), t ); } finally { annotatedObjectsToMerge.clear();
throw new PersisterException(ao.getClass().getSimpleName() + " without AC couldn't be reloaded because " + "no equivalent object was found in the database: " + ao); BeanUtils.copyProperties(ao, dbObject); } catch (Exception e) { throw new PersisterException("Problem refreshing state for object: "+ao, e);
daoFactory.getBaseDao().persist( ao ); } catch (Exception e) { throw new PersisterException("Problem persisting: "+ao, e); throw new PersisterException("Problem persisting this entity because it contains transient members (invoke saveOrUpdate(transientObject) on those first): ac:"+ac+" - "+entry.getKey(), ise); throw new PersisterException(ise); } else { throw new PersisterException("Problem flushing the entity manager", ise); sb.append(" - No data about the entities (statistics are disabled)"); throw new PersisterException( sb.toString(), t ); } finally { annotatedObjectsToMerge.clear();
copied = entityStateCopier.copy( ao, managedObject); } catch (Exception e) { throw new PersisterException("Problem copying state to managed object of type "+ao.getClass().getSimpleName()+" and AC "+ao.getAc()+", from object: "+ao, e); copyAnnotatedObjectAttributeAcs(managedObject, ao); } catch (Exception e) { throw new PersisterException("Problem copying ACs from managed object of type "+ao.getClass().getSimpleName()+" and AC "+ao.getAc()+", to object: "+ao, e);
copied = entityStateCopier.copy( ao, managedObject); } catch (Exception e) { throw new PersisterException("Problem copying state to managed object of type "+ao.getClass().getSimpleName()+" and AC "+ao.getAc()+", from object: "+ao, e); copyAnnotatedObjectAttributeAcs(managedObject, ao); } catch (Exception e) { throw new PersisterException("Problem copying ACs from managed object of type "+ao.getClass().getSimpleName()+" and AC "+ao.getAc()+", to object: "+ao, e);
private static void commitTransactionAndRollbackIfNecessary() throws PersisterException { try { IntactContext.getCurrentInstance().getDataContext().commitTransaction(); } catch (IntactTransactionException e) { try { IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getCurrentTransaction().rollback(); } catch (IntactTransactionException e1) { throw new PersisterException(e1); } } } }
throw new PersisterException("Problem converting PSI interaction: " + psiInteraction, e);
persisterHelper.save( obsoleteTopic ); } catch ( Throwable t ) { throw new PersisterException( "An error occurred while saving CvTopic( '"+ obsoleteTopic.getShortLabel() +"', '"+ obsoleteTopic.getIdentifier() +"' )", t );
throw new PersisterException( "Cannot convert the range " + r.toString() + ". " + FeatureUtils.getBadRangeInfo(r, seq) );