protected Key keyForExperiment(Experiment experiment) { return new Key(new ExperimentKeyCalculator().calculateExperimentKey(experiment)); }
protected void copyLifecycleEvent( LifecycleEvent source, LifecycleEvent target ) { copyProperty(source, "event", target); copyProperty(source, "who", target); copyProperty(source, "when", target); copyProperty(source, "publication", target); copyProperty(source, "note", target); }
private void synchronizeInstitution( Institution institution, boolean synchronyzeCommonAttributes ) { if (synchronyzeCommonAttributes){ synchronizeAnnotatedObjectCommons( institution ); } }
protected Key keyForFeature(Feature feature) { if (feature.getComponent() == null) { throw new IllegalArgumentException("Cannot create a feature key for feature without component: " + feature); } Key componentKey = keyFor(feature.getComponent()); return new Key(new FeatureKeyCalculator().calculateFeatureKey(feature) + "___" + componentKey.getUniqueString()); // return new Key( keyForAnnotatedObject( feature ).getUniqueString() + "___" + componentKey.getUniqueString() ); }
/** * Imports an IntactEntry into intact * * @param entry the intact entry to import * * @return report of the import * * @throws PersisterException thrown if there are problems persisting the data in the intact-model database */ public void importIntoIntact(IntactEntry entry) throws PersisterException { corePersister.saveOrUpdate(entry); }
/** * Checks is the given object already synchronized with the persistence session. * @param intactObject object to be synced. * @return a response that contains the answer. */ protected final SyncTransientResponse<T> syncIfTransientResponse(T intactObject) { T refreshedObject = syncIfTransient(intactObject); if (refreshedObject.getAc() != null) { return new SyncTransientResponse<T>(true, refreshedObject); } return new SyncTransientResponse<T>(false, syncAttributes(intactObject)); }
public PersisterUnexpectedException(String message, Throwable cause) { super(message, cause); PersisterContext.getInstance().clear(); } }
/** * Mandatory method to execute the actual data persister in the database. */ public final void commit() { PersisterContext.getInstance().persistAll(); }
protected boolean isCollectionClonable(Collection col) { return IntactCore.isInitialized(col); } }
@Override protected PersisterContext initialValue() { return new PersisterContext(); } };
@Override protected SyncContext initialValue() { return new SyncContext(); } };
protected Key keyForFeature(Feature feature) { if (feature.getComponent() == null) { throw new IllegalArgumentException("Cannot create a feature key for feature without component: " + feature); } Key componentKey = keyFor(feature.getComponent()); return new Key(new FeatureKeyCalculator().calculateFeatureKey(feature) + "___" + componentKey.getUniqueString()); // return new Key( keyForAnnotatedObject( feature ).getUniqueString() + "___" + componentKey.getUniqueString() ); }
protected Key keyForExperiment(Experiment experiment) { return new Key(new ExperimentKeyCalculator().calculateExperimentKey(experiment)); }
protected void copyBioSource( BioSource source, BioSource target ) { copyProperty(source, "taxId", target); copyProperty(source, "cvTissue", target); copyProperty(source, "cvCellType", target); }
public PersisterException(String message, Throwable cause) { super(message, cause); PersisterContext.getInstance().clear(); } }
private void synchronizeInstitution( Institution institution, boolean synchronyzeCommonAttributes ) { if (synchronyzeCommonAttributes){ synchronizeAnnotatedObjectCommons( institution ); } }
protected void copyLifecycleEvent( LifecycleEvent source, LifecycleEvent target ) { copyProperty(source, "event", target); copyProperty(source, "who", target); copyProperty(source, "when", target); copyProperty(source, "publication", target); copyProperty(source, "note", target); }
public PersisterUnexpectedException(String message) { super(message); PersisterContext.getInstance().clear(); }
protected void copyBioSource( BioSource source, BioSource target ) { copyProperty(source, "taxId", target); copyProperty(source, "cvTissue", target); copyProperty(source, "cvCellType", target); }
protected void copyInstitution( Institution source, Institution target ) { copyProperty(source, "url", target); copyProperty(source, "postalAddress", target); }