Tabnine Logo
IndirectMap.put
Code IndexAdd Tabnine to your IDE (free)

How to use
put
method
in
org.eclipse.persistence.indirection.IndirectMap

Best Java code snippets using org.eclipse.persistence.indirection.IndirectMap.put (Showing top 9 results out of 315)

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

/**
 * @see java.util.Hashtable#putAll(java.util.Map)
 */
@Override
public synchronized void putAll(Map<? extends K,? extends V> t) {
  // Must trigger add events if tracked or uow.
  if (hasTrackedPropertyChangeListener()) {
    t.entrySet().stream().forEach((newEntry) -> {
      this.put(newEntry.getKey(), newEntry.getValue());
    });
  }else{
    this.getDelegate().putAll(t);
  }
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * @see java.util.Hashtable#putAll(java.util.Map)
 */
@Override
public synchronized void putAll(Map<? extends K,? extends V> t) {
  // Must trigger add events if tracked or uow.
  if (hasTrackedPropertyChangeListener()) {
    Iterator<? extends K> objects = t.keySet().iterator();
    while (objects.hasNext()) {
      K key = objects.next();
      this.put(key, t.get(key));
    }
  }else{
    this.getDelegate().putAll(t);
  }
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * @see java.util.Hashtable#putAll(java.util.Map)
 */
public synchronized void putAll(Map t) {
  // Must trigger add events if tracked or uow.
  if (hasTrackedPropertyChangeListener()) {
    Iterator objects = t.keySet().iterator();
    while (objects.hasNext()) {
      Object key = objects.next();
      this.put(key, t.get(key));
    }
  }else{
    this.getDelegate().putAll(t);
  }
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

@Override
public synchronized boolean replace(K key, V oldValue, V newValue) {
  // Must trigger add events if tracked or uow.
  if (hasTrackedPropertyChangeListener()) {
    Map<K, V> del = getDelegate();
    if (del.containsKey(key) && Objects.equals(del.get(key), oldValue)) {
      put(key, newValue);
      return true;
    }
    return false;
  }
  return getDelegate().replace(key, oldValue, newValue);
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

@Override
public synchronized V compute(K key, BiFunction<? super K,? super V,? extends V> remappingFunction) {
  // Must trigger add events if tracked or uow.
  if (hasTrackedPropertyChangeListener()) {
    V oldValue = get(key);
    V newValue = remappingFunction.apply(key, oldValue);
    if (oldValue != null ) {
      if (newValue != null) {
       put(key, newValue);
       return newValue;
      }
      remove(key);
    } else {
      if (newValue != null) {
       put(key, newValue);
       return newValue;
      }
    }
    return null;
  }
  return getDelegate().compute(key, remappingFunction);
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

@Override
public synchronized V replace(K key, V value) {
  // Must trigger add events if tracked or uow.
  if (hasTrackedPropertyChangeListener()) {
    Map<K, V> del = getDelegate();
    if (del.containsKey(key)) {
      return put(key, value);
    }
    return null;
  }
  return getDelegate().replace(key, value);
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

@Override
public synchronized V computeIfAbsent(K key, Function<? super K,? extends V> mappingFunction) {
  // Must trigger add events if tracked or uow.
  if (hasTrackedPropertyChangeListener()) {
    V oldValue = get(key);
    if (oldValue == null) {
      V newValue = mappingFunction.apply(key);
      if (newValue != null) {
        put(key, newValue);
      }
      return newValue;
    }
    return oldValue;
  }
  return getDelegate().computeIfAbsent(key, mappingFunction);
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

@Override
public synchronized V merge(K key, V value, BiFunction<? super V,? super V,? extends V> remappingFunction) {
  // Must trigger add events if tracked or uow.
  if (hasTrackedPropertyChangeListener()) {
    V oldValue = get(key);
    V newValue = (oldValue == null) ? value : remappingFunction.apply(oldValue, value);
    if (newValue == null) {
      remove(key);
    } else {
      put(key, newValue);
    }
    return newValue;
  }
  return getDelegate().merge(key, value, remappingFunction);
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

@Override
public synchronized V computeIfPresent(K key, BiFunction<? super K,? super V,? extends V> remappingFunction) {
  // Must trigger add events if tracked or uow.
  if (hasTrackedPropertyChangeListener()) {
    if (get(key) != null) {
      V oldValue = get(key);
      V newValue = remappingFunction.apply(key, oldValue);
      if (newValue != null) {
        put(key, newValue);
        return newValue;
      }
      remove(key);
    }
    return null;
  }
  return getDelegate().computeIfPresent(key, remappingFunction);
}
org.eclipse.persistence.indirectionIndirectMapput

Popular methods of IndirectMap

  • _persistence_getPropertyChangeListener
    Return the property change listener for change tracking.
  • buildDelegate
    Return the freshly-built delegate.
  • clear
  • get
  • 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
    PUBLIC: Return the valueHolder. This method used to be synchronized, which caused deadlock.
  • hasTrackedPropertyChangeListener
    INTERNAL: Return if the collection has a property change listener for change tracking.
  • initialize
    Initialize the instance.
  • isInstantiated
    PUBLIC: Return whether the contents have been read from the database.
  • keySet
  • raiseAddChangeEvent
    Raise the add change event and relationship maintainence.
  • keySet,
  • raiseAddChangeEvent,
  • raiseRemoveChangeEvent,
  • <init>,
  • remove,
  • entrySet

Popular in Java

  • Updating database using SQL prepared statement
  • setRequestProperty (URLConnection)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • onCreateOptionsMenu (Activity)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Permission (java.security)
    Legacy security code; do not use.
  • Notification (javax.management)
  • JFileChooser (javax.swing)
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • From CI to AI: The AI layer in your organization
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