Tabnine Logo
IndirectList.getRemovedElements
Code IndexAdd Tabnine to your IDE (free)

How to use
getRemovedElements
method
in
org.eclipse.persistence.indirection.IndirectList

Best Java code snippets using org.eclipse.persistence.indirection.IndirectList.getRemovedElements (Showing top 12 results out of 315)

origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * PUBLIC:
 * @see java.util.Vector#contains(java.lang.Object)
 */
@Override
public boolean contains(Object element) {
  // PERF: Avoid instantiation if not required.
  if (hasAddedElements()) {
    if (getAddedElements().contains(element)) {
      return true;
    }
  }
  if (hasRemovedElements()) {
    if (getRemovedElements().contains(element)) {
      return false;
    }
  }
  return getDelegate().contains(element);
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * PUBLIC:
 * @see java.util.Vector#contains(java.lang.Object)
 */
public boolean contains(Object element) {
  // PERF: Avoid instantiation if not required.
  if (hasAddedElements()) {
    if (getAddedElements().contains(element)) {
      return true;
    }
  }
  if (hasRemovedElements()) {
    if (getRemovedElements().contains(element)) {
      return false;
    }
  }
  return getDelegate().contains(element);
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * PUBLIC:
 * @see java.util.Vector#contains(java.lang.Object)
 */
@Override
public boolean contains(Object element) {
  // PERF: Avoid instantiation if not required.
  if (hasAddedElements()) {
    if (getAddedElements().contains(element)) {
      return true;
    }
  }
  if (hasRemovedElements()) {
    if (getRemovedElements().contains(element)) {
      return false;
    }
  }
  return getDelegate().contains(element);
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * @see java.util.Vector#add(java.lang.Object)
 */
public boolean add(Object element) {
  if (!this.isRegistered) {
    return getDelegate().add(element);
  }
  boolean added = true;
  // PERF: If not instantiated just record the add to avoid the instantiation.
  if (shouldAvoidInstantiation()) {
    if (hasRemovedElements() && getRemovedElements().contains(element)) {
      getRemovedElements().remove(element);
    } else if (getAddedElements().contains(element)) {
      // Must avoid recursion for relationship maintenance.
      return false;
    } else {
      getAddedElements().add(element);
    }
  } else {
    added = getDelegate().add(element);
  }
  raiseAddChangeEvent(element, null);
  return added;
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * @see java.util.Vector#add(java.lang.Object)
 */
@Override
public boolean add(E element) {
  if (!this.isRegistered) {
    return getDelegate().add(element);
  }
  boolean added = true;
  // PERF: If not instantiated just record the add to avoid the instantiation.
  if (shouldAvoidInstantiation()) {
    if (hasRemovedElements() && getRemovedElements().contains(element)) {
      getRemovedElements().remove(element);
    } else if (isRelationshipMaintenanceRequired() && getAddedElements().contains(element)) {
      // Must avoid recursion for relationship maintenance.
      return false;
    } else {
      getAddedElements().add(element);
    }
  } else {
    added = getDelegate().add(element);
  }
  raiseAddChangeEvent(element, null);
  return added;
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * @see java.util.Vector#add(java.lang.Object)
 */
@Override
public boolean add(E element) {
  if (!this.isRegistered) {
    return getDelegate().add(element);
  }
  boolean added = true;
  // PERF: If not instantiated just record the add to avoid the instantiation.
  if (shouldAvoidInstantiation()) {
    if (hasRemovedElements() && getRemovedElements().contains(element)) {
      getRemovedElements().remove(element);
    } else if (isRelationshipMaintenanceRequired() && getAddedElements().contains(element)) {
      // Must avoid recursion for relationship maintenance.
      return false;
    } else {
      getAddedElements().add(element);
    }
  } else {
    added = getDelegate().add(element);
  }
  raiseAddChangeEvent(element, null);
  return added;
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * @see java.util.Vector#remove(java.lang.Object)
 */
public boolean remove(Object element) {
  if (!this.isRegistered) {
    return getDelegate().remove(element);
  }
  // PERF: If not instantiated just record the removal to avoid the instantiation.
  if (shouldAvoidInstantiation()) {
    if (hasAddedElements() && getAddedElements().contains(element)) {
      getAddedElements().remove(element);
    } else if (getRemovedElements().contains(element)) {
      // Must avoid recursion for relationship maintenance.
      return false;
    } else {
      getRemovedElements().add(element);
    }
    this.raiseRemoveChangeEvent(element, null);
    return true;
  } else { 
    int index = this.getDelegate().indexOf(element);
    if(index > -1) {
      this.getDelegate().remove(index);
      this.raiseRemoveChangeEvent(element, index);
      return true;
    }
  }  
  return false;
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * @see java.util.Vector#remove(java.lang.Object)
 */
@Override
public boolean remove(Object element) {
  if (!this.isRegistered) {
    return getDelegate().remove(element);
  }
  // PERF: If not instantiated just record the removal to avoid the instantiation.
  if (shouldAvoidInstantiation()) {
    if (hasAddedElements() && getAddedElements().contains(element)) {
      getAddedElements().remove(element);
    } else if (getRemovedElements().contains(element)) {
      // Must avoid recursion for relationship maintenance.
      return false;
    } else {
      getRemovedElements().add((E) element);
    }
    this.raiseRemoveChangeEvent(element, null);
    return true;
  } else {
    int index = this.getDelegate().indexOf(element);
    if(index > -1) {
      this.getDelegate().remove(index);
      this.raiseRemoveChangeEvent(element, index);
      return true;
    }
  }
  return false;
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * @see java.util.Vector#remove(java.lang.Object)
 */
@Override
public boolean remove(Object element) {
  if (!this.isRegistered) {
    return getDelegate().remove(element);
  }
  // PERF: If not instantiated just record the removal to avoid the instantiation.
  if (shouldAvoidInstantiation()) {
    if (hasAddedElements() && getAddedElements().contains(element)) {
      getAddedElements().remove(element);
    } else if (getRemovedElements().contains(element)) {
      // Must avoid recursion for relationship maintenance.
      return false;
    } else {
      getRemovedElements().add(element);
    }
    this.raiseRemoveChangeEvent(element, null);
    return true;
  } else { 
    int index = this.getDelegate().indexOf(element);
    if(index > -1) {
      this.getDelegate().remove(index);
      this.raiseRemoveChangeEvent(element, index);
      return true;
    }
  }  
  return false;
}
origin: com.haulmont.thirdparty/eclipselink

int size = getRemovedElements().size();
for (int index = 0; index < size; index++) {
  delegate.remove(((List)getRemovedElements()).get(index));
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

int size = getRemovedElements().size();
for (int index = 0; index < size; index++) {
  delegate.remove(((List)getRemovedElements()).get(index));
origin: org.eclipse.persistence/org.eclipse.persistence.core

for (E element: getRemovedElements()) {
  newDelegate.remove(element);
org.eclipse.persistence.indirectionIndirectListgetRemovedElements

Javadoc

INTERNAL: Return the elements that have been removed before instantiation.

Popular methods of IndirectList

  • <init>
    PUBLIC: Construct an IndirectList containing the elements of the specified collection, in the order
  • _persistence_getPropertyChangeListener
    INTERNAL: Return the property change listener for change tracking.
  • add
  • buildDelegate
    INTERNAL: Return the freshly-built delegate.
  • getAddedElements
    INTERNAL: Return the elements that have been added before instantiation.
  • getDelegate
    INTERNAL: Check whether the contents have been read from the database. If they have not, read them a
  • getTrackedAttributeName
    INTERNAL: Return the mapping attribute name, used to raise change events.
  • getValueHolder
    INTERNAL: Return the valueHolder. This method used to be synchronized, which caused deadlock.
  • hasAddedElements
    INTERNAL: Return if any elements that have been added before instantiation.
  • hasBeenRegistered
    INTERNAL: return whether this IndirectList has been registered with the UnitOfWork
  • hasRemovedElements
    INTERNAL: Return if any elements that have been removed before instantiation.
  • hasTrackedPropertyChangeListener
    INTERNAL: Return if the collection has a property change listener for change tracking.
  • hasRemovedElements,
  • hasTrackedPropertyChangeListener,
  • isInstantiated,
  • isListOrderBrokenInDb,
  • iterator,
  • listIterator,
  • raiseAddChangeEvent,
  • raiseRemoveChangeEvent,
  • remove

Popular in Java

  • Making http post requests using okhttp
  • addToBackStack (FragmentTransaction)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • startActivity (Activity)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • String (java.lang)
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • JLabel (javax.swing)
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now