Examples of IdentityHashMap


Examples of java.util.IdentityHashMap

        //  Get the identity map by the entity class:
        Map entityMap = this.lookupMap(updatedEntity.getClass());
        // Look for the entity in the map and update it (if found):
        Object currentEntity = entityMap.get(id);
        if ((currentEntity != null) && (currentEntity.getClass().equals(updatedEntity.getClass()))) {
            IdentityHashMap localIdentityMap = (IdentityHashMap) DefaultPrevalentSystem.localIdentityMap.get();
            // If the object has still not been reached:
            if (localIdentityMap.get(currentEntity) == null) {
                // Add the actual entity to the thread local identity map, for tracking its traversal (an entity once traversed must not be tarversed again):
                localIdentityMap.put(currentEntity, new Integer(1));
                // Copy new into actual and do cascade persistence:
                this.doCascadePersistence(updatedEntity, currentEntity);
            }
            // Return the updated (original) entity:
            return currentEntity;
View Full Code Here

Examples of java.util.IdentityHashMap

   * @generated
   */
  public static ENamedElement getElement(IAdaptable hint) {
    Object type = hint.getAdapter(IElementType.class);
    if (elements == null) {
      elements = new IdentityHashMap();

      elements.put(Container_1000, OntoUML.OntoUMLPackage.eINSTANCE
          .getContainer());

      elements.put(Category_2001, OntoUML.OntoUMLPackage.eINSTANCE
View Full Code Here

Examples of java.util.IdentityHashMap

  /**
   * Create an IdentitySet with default sizing.
   */
  public IdentitySet() {
    this.map = new IdentityHashMap();
  }
View Full Code Here

Examples of java.util.IdentityHashMap

   * Create an IdentitySet with the given sizing.
   *
   * @param sizing The sizing of the set to create.
   */
  public IdentitySet(int sizing) {
    this.map = new IdentityHashMap( sizing );
  }
View Full Code Here

Examples of java.util.IdentityHashMap

   * @param event The create event to be handled.
   *
   * @throws HibernateException
   */
  public void onPersist(PersistEvent event) throws HibernateException {
    onPersist( event, new IdentityHashMap( 10 ) );
  }
View Full Code Here

Examples of java.util.IdentityHashMap

*/
public class DefaultRefreshEventListener implements RefreshEventListener {
  private static final CoreMessageLogger LOG = CoreLogging.messageLogger( DefaultRefreshEventListener.class );

  public void onRefresh(RefreshEvent event) throws HibernateException {
    onRefresh( event, new IdentityHashMap( 10 ) );
  }
View Full Code Here

Examples of java.util.IdentityHashMap

  protected CascadingAction getCascadingAction() {
    return CascadingAction.PERSIST_ON_FLUSH;
  }

  protected Object getAnything() {
    return new IdentityHashMap( 10 );
  }
View Full Code Here

Examples of java.util.IdentityHashMap

  protected CascadingAction getCascadingAction() {
    return CascadingAction.PERSIST_ON_FLUSH;
  }

  protected Object getAnything() {
    return new IdentityHashMap( 10 );
  }
View Full Code Here

Examples of java.util.IdentityHashMap

            if (t == Map.class || t == HashMap.class) {
                m = new HashMap();
            } else if (t == LinkedHashMap.class) {
                m = new LinkedHashMap();
            } else if (t == IdentityHashMap.class) {
                m = new IdentityHashMap();
            } else if (t == Hashtable.class) {
                m = new Hashtable();
            } else if (t == TreeMap.class || t == SortedMap.class) {
                m = new TreeMap();
            } else if (t == WeakHashMap.class) {
View Full Code Here

Examples of java.util.IdentityHashMap

    return CascadingActions.PERSIST_ON_FLUSH;
  }

  @Override
  protected Object getAnything() {
    return new IdentityHashMap( 10 );
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.