public IdentitySet() { this.map = IdentityMap.instantiate( 10 ); }
/** * Constructs a PersistentContext, bound to the given session. * * @param session The session "owning" this context. */ public StatefulPersistenceContext(SessionImplementor session) { this.session = session; entitiesByKey = new HashMap( INIT_COLL_SIZE ); entitiesByUniqueKey = new HashMap( INIT_COLL_SIZE ); proxiesByKey = new ReferenceMap( ReferenceMap.HARD, ReferenceMap.WEAK ); entitySnapshotsByKey = new HashMap( INIT_COLL_SIZE ); entityEntries = IdentityMap.instantiateSequenced( INIT_COLL_SIZE ); collectionEntries = IdentityMap.instantiateSequenced( INIT_COLL_SIZE ); collectionsByKey = new HashMap( INIT_COLL_SIZE ); arrayHolders = IdentityMap.instantiate( INIT_COLL_SIZE ); nullifiableEntityKeys = new HashSet(); initTransientState(); }
protected Object getAnything() { return IdentityMap.instantiate( 10 ); }
/** * Constructs a PersistentContext, bound to the given session. * * @param session The session "owning" this context. */ public PersistenceContext(SessionImplementor session) { this.session = session; entitiesByKey = new HashMap(INIT_MAP_SIZE); entitiesByUniqueKey = new HashMap(INIT_MAP_SIZE); proxiesByKey = new ReferenceMap(ReferenceMap.HARD, ReferenceMap.WEAK); entitySnapshotsByKey = new HashMap(INIT_MAP_SIZE); //nonExistantEntityKeys = new HashSet(INIT_MAP_SIZE); //nonExistentEntityUniqueKeys = new HashSet(INIT_MAP_SIZE); entityEntries = IdentityMap.instantiateSequenced(INIT_MAP_SIZE); collectionEntries = IdentityMap.instantiateSequenced(INIT_MAP_SIZE); collectionsByKey = new HashMap(INIT_MAP_SIZE); arrayHolders = IdentityMap.instantiate(INIT_MAP_SIZE); initTransientState(); }
protected Object getAnything() { return IdentityMap.instantiate( 10 ); }
protected Object getAnything() { return IdentityMap.instantiate( 10 ); }
protected Object getAnything() { return IdentityMap.instantiate( 10 ); }
public static Map invert(Map map) { Map result = instantiate( map.size() ); Iterator iter = map.entrySet().iterator(); while ( iter.hasNext() ) { Map.Entry me = (Map.Entry) iter.next(); result.put( me.getValue(), me.getKey() ); } return result; }
/** * Handle the given merge event. * * @param event The merge event to be handled. * @return The result (i.e., the copied entity). * @throws HibernateException */ public Object onMerge(MergeEvent event) throws HibernateException { return onMerge( event, IdentityMap.instantiate(10) ); }
/** * Handle the given create event. * * @param event The create event to be handled. * @throws HibernateException */ public void onPersist(PersistEvent event) throws HibernateException { onPersist( event, IdentityMap.instantiate(10) ); }
/** * @see RefreshEventListener#onRefresh(RefreshEvent) */ @SuppressWarnings("unchecked") public void onRefresh(RefreshEvent event) throws HibernateException { onRefresh(event, IdentityMap.instantiate(10)); }
/** * Handle the given create event. * * @param event The create event to be handled. * @throws HibernateException */ public void onPersist(PersistEvent event) throws HibernateException { onPersist( event, IdentityMap.instantiate(10) ); }
/** * Handle the given merge event. * * @param event The merge event to be handled. * @throws HibernateException */ public void onMerge(MergeEvent event) throws HibernateException { onMerge( event, IdentityMap.instantiate(10) ); }
public void onRefresh(RefreshEvent event) throws HibernateException { onRefresh( event, IdentityMap.instantiate(10) ); }