Codota Logo
IntactCore.isInitializedAndDirty
Code IndexAdd Codota to your IDE (free)

How to use
isInitializedAndDirty
method
in
uk.ac.ebi.intact.core.persister.IntactCore

Best Java code snippets using uk.ac.ebi.intact.core.persister.IntactCore.isInitializedAndDirty (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
origin: uk.ac.ebi.intact.core/intact-core

private <X extends AnnotatedObject> Collection<X> synchronizeCollection( Collection<X> collection ) {
  if (!IntactCore.isInitializedAndDirty(collection)) {
    return collection;
  }
  Collection<X> synchedCollection = new ArrayList<X>( collection.size() );
  for ( X ao : collection ) {
    synchedCollection.add( synchronize( ao ) );
  }
  return synchedCollection;
}
origin: uk.ac.ebi.intact.core/intact-core-readonly

private <X extends AnnotatedObject> Collection<X> synchronizeCollection( Collection<X> collection ) {
  if (!IntactCore.isInitializedAndDirty(collection)) {
    return collection;
  }
  Collection<X> synchedCollection = new ArrayList<X>( collection.size() );
  for ( X ao : collection ) {
    synchedCollection.add( synchronize( ao ) );
  }
  return synchedCollection;
}
origin: uk.ac.ebi.intact.core/intact-core

private void synchronizeCvObject( CvObject cvObject, boolean synchronizeAnnotatedAttributes ) {
  if (cvObject instanceof CvDagObject) {
    CvDagObject cvDagObject = (CvDagObject)cvObject;
    if (IntactCore.isInitializedAndDirty(cvDagObject.getChildren())){
      Collection<CvDagObject> children = synchronizeCollection(cvDagObject.getChildren());
      cvDagObject.getChildren().clear();
      cvDagObject.getChildren().addAll(children);
    }
    if (IntactCore.isInitializedAndDirty(cvDagObject.getParents())){
      Collection<CvDagObject> parents = synchronizeCollection(cvDagObject.getParents());
      cvDagObject.getParents().clear();
      cvDagObject.getParents().addAll(parents);
    }
  }
  if (synchronizeAnnotatedAttributes){
    synchronizeAnnotatedObjectCommons( cvObject );
  }
}
origin: uk.ac.ebi.intact.core/intact-core-readonly

private void synchronizeCvObject( CvObject cvObject, boolean synchronizeAnnotatedAttributes ) {
  if (cvObject instanceof CvDagObject) {
    CvDagObject cvDagObject = (CvDagObject)cvObject;
    if (IntactCore.isInitializedAndDirty(cvDagObject.getChildren())){
      Collection<CvDagObject> children = synchronizeCollection(cvDagObject.getChildren());
      cvDagObject.getChildren().clear();
      cvDagObject.getChildren().addAll(children);
    }
    if (IntactCore.isInitializedAndDirty(cvDagObject.getParents())){
      Collection<CvDagObject> parents = synchronizeCollection(cvDagObject.getParents());
      cvDagObject.getParents().clear();
      cvDagObject.getParents().addAll(parents);
    }
  }
  if (synchronizeAnnotatedAttributes){
    synchronizeAnnotatedObjectCommons( cvObject );
  }
}
origin: uk.ac.ebi.intact.core/intact-core

if (IntactCore.isInitializedAndDirty(ao.getXrefs())) {
  for ( Xref xref : ao.getXrefs() ) {
    synchedXrefs.add( synchronizeXref( xref, ao ) );
if (IntactCore.isInitializedAndDirty(ao.getAliases())) {
  for ( Alias alias : ao.getAliases() ) {
    synchedAliases.add( synchronizeAlias( alias, ao ) );
if (IntactCore.isInitializedAndDirty(ao.getAnnotations())) {
  for ( Annotation annotation : ao.getAnnotations() ) {
    synchedAnnotations.add( synchronizeAnnotation( annotation, ao ) );
origin: uk.ac.ebi.intact.core/intact-core-readonly

if (IntactCore.isInitializedAndDirty(ao.getXrefs())) {
  for ( Xref xref : ao.getXrefs() ) {
    synchedXrefs.add( synchronizeXref( xref, ao ) );
if (IntactCore.isInitializedAndDirty(ao.getAliases())) {
  for ( Alias alias : ao.getAliases() ) {
    synchedAliases.add( synchronizeAlias( alias, ao ) );
if (IntactCore.isInitializedAndDirty(ao.getAnnotations())) {
  for ( Annotation annotation : ao.getAnnotations() ) {
    synchedAnnotations.add( synchronizeAnnotation( annotation, ao ) );
origin: uk.ac.ebi.intact.core/intact-core

private void synchronizePublication( Publication publication, boolean synchronizeAnnotatedAttributes ) {
  if (IntactCore.isInitializedAndDirty(publication.getExperiments())){
    Collection<Experiment> experiments = synchronizeCollection(publication.getExperiments());
    publication.getExperiments().clear();
    publication.getExperiments().addAll(experiments);
  }
  publication.setStatus( synchronize( publication.getStatus() ) );
  publication.setCurrentOwner( synchronizeUser(publication.getCurrentOwner()) );
  publication.setCurrentReviewer( synchronizeUser(publication.getCurrentReviewer()) );
  final List<LifecycleEvent> events = publication.getLifecycleEvents();
  if (IntactCore.isInitializedAndDirty( events )){
    Collection<LifecycleEvent> synchedEvents = new ArrayList<LifecycleEvent>( events.size() );
    for ( LifecycleEvent event : events ) {
      synchedEvents.add( synchronizeEvent(event) );
    }
    events.clear();
    events.addAll( synchedEvents );
  }
  if (synchronizeAnnotatedAttributes){
    synchronizeAnnotatedObjectCommons( publication );
  }
}
origin: uk.ac.ebi.intact.core/intact-core-readonly

private void synchronizePublication( Publication publication, boolean synchronizeAnnotatedAttributes ) {
  if (IntactCore.isInitializedAndDirty(publication.getExperiments())){
    Collection<Experiment> experiments = synchronizeCollection(publication.getExperiments());
    publication.getExperiments().clear();
    publication.getExperiments().addAll(experiments);
  }
  publication.setStatus( synchronize( publication.getStatus() ) );
  publication.setCurrentOwner( synchronizeUser(publication.getCurrentOwner()) );
  publication.setCurrentReviewer( synchronizeUser(publication.getCurrentReviewer()) );
  final List<LifecycleEvent> events = publication.getLifecycleEvents();
  if (IntactCore.isInitializedAndDirty( events )){
    Collection<LifecycleEvent> synchedEvents = new ArrayList<LifecycleEvent>( events.size() );
    for ( LifecycleEvent event : events ) {
      synchedEvents.add( synchronizeEvent(event) );
    }
    events.clear();
    events.addAll( synchedEvents );
  }
  if (synchronizeAnnotatedAttributes){
    synchronizeAnnotatedObjectCommons( publication );
  }
}
origin: uk.ac.ebi.intact.core/intact-core

if (IntactCore.isInitializedAndDirty( roles )){
  Collection<Role> synchedRoles = new ArrayList<Role>( roles.size() );
  for ( Role role : roles ) {
if (IntactCore.isInitializedAndDirty( prefs )){
  Collection<Preference> synchedPrefs = new ArrayList<Preference>( prefs.size() );
  for ( Preference p : prefs ) {
origin: uk.ac.ebi.intact.core/intact-core-readonly

if (IntactCore.isInitializedAndDirty( roles )){
  Collection<Role> synchedRoles = new ArrayList<Role>( roles.size() );
  for ( Role role : roles ) {
if (IntactCore.isInitializedAndDirty( prefs )){
  Collection<Preference> synchedPrefs = new ArrayList<Preference>( prefs.size() );
  for ( Preference p : prefs ) {
origin: uk.ac.ebi.intact.core/intact-core

private void synchronizeInteraction( Interaction interaction, boolean synchronizeAnnotatedAttributes ) {
  interaction.setCvInteractionType( synchronize( interaction.getCvInteractionType() ) );
  interaction.setCvInteractorType( synchronize( interaction.getCvInteractorType() ) );
  if (IntactCore.isInitializedAndDirty(interaction.getComponents())){
    Collection<Component> components = synchronizeCollection(interaction.getComponents());
    interaction.getComponents().clear();
    interaction.getComponents().addAll(components);
  }
  interaction.setBioSource( synchronize( interaction.getBioSource() ) );
  if (IntactCore.isInitializedAndDirty(interaction.getExperiments())){
    Collection<Experiment> experiment = synchronizeCollection(interaction.getExperiments());
    interaction.getExperiments().clear();
    interaction.getExperiments().addAll(experiment);
  }
  // cannot call setConfidences in interaction because of orphan relationship limitation
  if (IntactCore.isInitializedAndDirty(interaction.getConfidences())){
    Collection<Confidence> confidences = synchronizeConfidences(interaction.getConfidences(), interaction);
    interaction.getConfidences().clear();
    interaction.getConfidences().addAll(confidences);
  }
  // cannot call setParameters in interaction because of orphan relationship limitation
  if (IntactCore.isInitializedAndDirty(interaction.getParameters())){
    Collection<InteractionParameter> interactionParameters = synchronizeInteractionParameters(interaction.getParameters(), interaction);
    interaction.getParameters().clear();
    interaction.getParameters().addAll(interactionParameters);
  }
  if (synchronizeAnnotatedAttributes){
    synchronizeAnnotatedObjectCommons( interaction );
  }
}
origin: uk.ac.ebi.intact.core/intact-core

private void synchronizeInteractor( Interactor interactor, boolean synchronizeAnnotatedAtributes ) {
  if (IntactCore.isInitializedAndDirty(interactor.getActiveInstances())){
    Collection<Component> activeInstances = synchronizeCollection(interactor.getActiveInstances());
    interactor.getActiveInstances().clear();
    interactor.getActiveInstances().addAll(activeInstances);
  }
  interactor.setBioSource( synchronize( interactor.getBioSource() ) );
  interactor.setCvInteractorType( synchronize( interactor.getCvInteractorType() ) );
  if (synchronizeAnnotatedAtributes){
    synchronizeAnnotatedObjectCommons( interactor );
  }
}
origin: uk.ac.ebi.intact.core/intact-core-readonly

private void synchronizeInteractor( Interactor interactor, boolean synchronizeAnnotatedAtributes ) {
  if (IntactCore.isInitializedAndDirty(interactor.getActiveInstances())){
    Collection<Component> activeInstances = synchronizeCollection(interactor.getActiveInstances());
    interactor.getActiveInstances().clear();
    interactor.getActiveInstances().addAll(activeInstances);
  }
  interactor.setBioSource( synchronize( interactor.getBioSource() ) );
  interactor.setCvInteractorType( synchronize( interactor.getCvInteractorType() ) );
  if (synchronizeAnnotatedAtributes){
    synchronizeAnnotatedObjectCommons( interactor );
  }
}
origin: uk.ac.ebi.intact.core/intact-core-readonly

private void synchronizeInteraction( Interaction interaction, boolean synchronizeAnnotatedAttributes ) {
  interaction.setCvInteractionType( synchronize( interaction.getCvInteractionType() ) );
  interaction.setCvInteractorType( synchronize( interaction.getCvInteractorType() ) );
  if (IntactCore.isInitializedAndDirty(interaction.getComponents())){
    Collection<Component> components = synchronizeCollection(interaction.getComponents());
    interaction.getComponents().clear();
    interaction.getComponents().addAll(components);
  }
  interaction.setBioSource( synchronize( interaction.getBioSource() ) );
  if (IntactCore.isInitializedAndDirty(interaction.getExperiments())){
    Collection<Experiment> experiment = synchronizeCollection(interaction.getExperiments());
    interaction.getExperiments().clear();
    interaction.getExperiments().addAll(experiment);
  }
  // cannot call setConfidences in interaction because of orphan relationship limitation
  if (IntactCore.isInitializedAndDirty(interaction.getConfidences())){
    Collection<Confidence> confidences = synchronizeConfidences(interaction.getConfidences(), interaction);
    interaction.getConfidences().clear();
    interaction.getConfidences().addAll(confidences);
  }
  // cannot call setParameters in interaction because of orphan relationship limitation
  if (IntactCore.isInitializedAndDirty(interaction.getParameters())){
    Collection<InteractionParameter> interactionParameters = synchronizeInteractionParameters(interaction.getParameters(), interaction);
    interaction.getParameters().clear();
    interaction.getParameters().addAll(interactionParameters);
  }
  if (synchronizeAnnotatedAttributes){
    synchronizeAnnotatedObjectCommons( interaction );
  }
}
origin: uk.ac.ebi.intact.core/intact-core

private void synchronizeComponent( Component component, boolean synchronizeAnnotatedAttributes ) {
  if (IntactCore.isInitializedAndDirty(component.getFeatures())) {
    Collection<Feature> features = synchronizeCollection(component.getFeatures());
    component.getFeatures().clear();
  if (IntactCore.isInitializedAndDirty(component.getExperimentalRoles())) {
    Collection<CvExperimentalRole> roles = synchronizeCollection( component.getExperimentalRoles() );
    component.getExperimentalRoles().clear();
  component.setInteractor( synchronize( component.getInteractor() ) );
  if (IntactCore.isInitializedAndDirty(component.getParticipantDetectionMethods())) {
    Collection<CvIdentification> partDet = synchronizeCollection( component.getParticipantDetectionMethods());
    component.getParticipantDetectionMethods().clear();
  if (IntactCore.isInitializedAndDirty(component.getExperimentalPreparations())) {
    Collection<CvExperimentalPreparation> expPrep = synchronizeCollection( component.getExperimentalPreparations() );
    component.getExperimentalPreparations().clear();
  if (IntactCore.isInitializedAndDirty(component.getParameters())) {
    Collection<ComponentParameter> componentParameters = synchronizeComponentParameters(component.getParameters(), component);
    component.getParameters().clear();
  if (IntactCore.isInitializedAndDirty(component.getConfidences())) {
    Collection<ComponentConfidence> componentConfidences = synchronizeComponentConfidences(component.getConfidences(), component);
    component.getConfidences().clear();
origin: uk.ac.ebi.intact.core/intact-core-readonly

private void synchronizeComponent( Component component, boolean synchronizeAnnotatedAttributes ) {
  if (IntactCore.isInitializedAndDirty(component.getFeatures())) {
    Collection<Feature> features = synchronizeCollection(component.getFeatures());
    component.getFeatures().clear();
  if (IntactCore.isInitializedAndDirty(component.getExperimentalRoles())) {
    Collection<CvExperimentalRole> roles = synchronizeCollection( component.getExperimentalRoles() );
    component.getExperimentalRoles().clear();
  component.setInteractor( synchronize( component.getInteractor() ) );
  if (IntactCore.isInitializedAndDirty(component.getParticipantDetectionMethods())) {
    Collection<CvIdentification> partDet = synchronizeCollection( component.getParticipantDetectionMethods());
    component.getParticipantDetectionMethods().clear();
  if (IntactCore.isInitializedAndDirty(component.getExperimentalPreparations())) {
    Collection<CvExperimentalPreparation> expPrep = synchronizeCollection( component.getExperimentalPreparations() );
    component.getExperimentalPreparations().clear();
  if (IntactCore.isInitializedAndDirty(component.getParameters())) {
    Collection<ComponentParameter> componentParameters = synchronizeComponentParameters(component.getParameters(), component);
    component.getParameters().clear();
  if (IntactCore.isInitializedAndDirty(component.getConfidences())) {
    Collection<ComponentConfidence> componentConfidences = synchronizeComponentConfidences(component.getConfidences(), component);
    component.getConfidences().clear();
origin: uk.ac.ebi.intact.core/intact-core

private void synchronizeFeature( Feature feature, boolean synchronizeAnnotatedAttributes ) {
  feature.setBoundDomain( synchronize( feature.getBoundDomain() ) );
  feature.setComponent( synchronize( feature.getComponent() ) );
  feature.setCvFeatureIdentification( synchronize( feature.getCvFeatureIdentification() ) );
  feature.setCvFeatureType( synchronize( feature.getCvFeatureType() ) );
  // cannot call setRanges in interaction because of orphan relationship limitation
  if (IntactCore.isInitializedAndDirty(feature.getRanges())){
    Collection<Range> ranges = synchronizeRanges(feature.getRanges(), feature);
    feature.getRanges().clear();
    feature.getRanges().addAll(ranges);
  }
  if (synchronizeAnnotatedAttributes){
    synchronizeAnnotatedObjectCommons( feature );
  }
}
origin: uk.ac.ebi.intact.core/intact-core-readonly

private void synchronizeExperiment( Experiment experiment, boolean synchronizeAnnotatedAttributes ) {
  experiment.setPublication( synchronize( experiment.getPublication() ) );
  if (IntactCore.isInitializedAndDirty(experiment.getInteractions())){
    Collection<Interaction> interactions = synchronizeCollection(experiment.getInteractions());
    experiment.getInteractions().clear();
    experiment.getInteractions().addAll(interactions);
  }
  experiment.setCvIdentification(synchronize(experiment.getCvIdentification()));
  experiment.setCvInteraction( synchronize( experiment.getCvInteraction() ) );
  experiment.setBioSource( synchronize( experiment.getBioSource() ) );
  if (synchronizeAnnotatedAttributes){
    synchronizeAnnotatedObjectCommons( experiment );
  }
}
origin: uk.ac.ebi.intact.core/intact-core

private void synchronizeExperiment( Experiment experiment, boolean synchronizeAnnotatedAttributes ) {
  experiment.setPublication( synchronize( experiment.getPublication() ) );
  if (IntactCore.isInitializedAndDirty(experiment.getInteractions())){
    Collection<Interaction> interactions = synchronizeCollection(experiment.getInteractions());
    experiment.getInteractions().clear();
    experiment.getInteractions().addAll(interactions);
  }
  experiment.setCvIdentification(synchronize(experiment.getCvIdentification()));
  experiment.setCvInteraction( synchronize( experiment.getCvInteraction() ) );
  experiment.setBioSource( synchronize( experiment.getBioSource() ) );
  if (synchronizeAnnotatedAttributes){
    synchronizeAnnotatedObjectCommons( experiment );
  }
}
origin: uk.ac.ebi.intact.core/intact-core-readonly

private void synchronizeFeature( Feature feature, boolean synchronizeAnnotatedAttributes ) {
  feature.setBoundDomain( synchronize( feature.getBoundDomain() ) );
  feature.setComponent( synchronize( feature.getComponent() ) );
  feature.setCvFeatureIdentification( synchronize( feature.getCvFeatureIdentification() ) );
  feature.setCvFeatureType( synchronize( feature.getCvFeatureType() ) );
  // cannot call setRanges in interaction because of orphan relationship limitation
  if (IntactCore.isInitializedAndDirty(feature.getRanges())){
    Collection<Range> ranges = synchronizeRanges(feature.getRanges(), feature);
    feature.getRanges().clear();
    feature.getRanges().addAll(ranges);
  }
  if (synchronizeAnnotatedAttributes){
    synchronizeAnnotatedObjectCommons( feature );
  }
}
uk.ac.ebi.intact.core.persisterIntactCoreisInitializedAndDirty

Javadoc

Returns true if the collection has been initialized by hibernate and has pending changes. Modifying a property of an object of the collection will NOT mark as dirty the collection itself.

Popular methods of IntactCore

  • ensureInitializedAliases
    Retrieves the aliases from an AnnotatedObject, initializing them if necessary.
  • ensureInitializedAnnotations
    Retrieves the annotations from an AnnotatedObject, initializing them if necessary.
  • ensureInitializedComponentConfidences
    Retrieves the confidences from a participant, initializing them if necessary. Do not set the initial
  • ensureInitializedComponentParameters
    Retrieves the parameters from a participant, initializing them if necessary. Do not set the initiali
  • ensureInitializedConfidences
    Retrieves the confidences from an interaction, initializing them if necessary. Do not set the initia
  • ensureInitializedExperimentalPreparations
    Retrieves the experimental preparations from a participant, initializing them if necessary. Do not s
  • ensureInitializedExperimentalRoles
    Retrieves the experimental roles from a participant, initializing them if necessary. Do not set the
  • ensureInitializedExperiments
    Retrieves the experiment from a publication, initializing them if necessary.
  • ensureInitializedFeatures
    Retrieves the features from a participant, initializing them if necessary. Do not set the initialize
  • ensureInitializedInteractionParameters
    Retrieves the parameters from an interaction, initializing them if necessary. Do not set the initial
  • ensureInitializedParticipantIdentificationMethods
    Retrieves the participant detection methods from a participant, initializing them if necessary. Do n
  • ensureInitializedParticipants
    Retrieves the components from an interaction, initializing them if necessary. Do not set the initial
  • ensureInitializedParticipantIdentificationMethods,
  • ensureInitializedParticipants,
  • ensureInitializedRanges,
  • ensureInitializedXrefs,
  • ensureInitializedInteractions,
  • ensureInitializedLifecycleEvents,
  • ensureInitializedPreferences,
  • ensureInitializedRoles,
  • initialize,
  • initializeAnnotatedObject

Popular in Java

  • Start an intent from android
  • compareTo (BigDecimal)
  • setContentView (Activity)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • JFileChooser (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now