Best code examples for Hibernate ORM CollectionKey class (org.hibernate.engine.spi.CollectionKey)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM CollectionKey class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Hibernate ORM CollectionKey examples from Open Source projects
This code example shows how to use the following methods:
					new CollectionKey( ce.getLoadedPersister(), ce.getLoadedKey() ) 
			); 
		} 
	} 
} 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods:
 
	/** 
	 * Add an collection to the cache, with a given collection entry. 
	 * 
	 * @param coll The collection for which we are adding an entry. 
	 * @param entry The entry representing the collection. 
	 * @param key The key of the collection's entry. 
	 */ 
	private void addCollection(PersistentCollection coll, CollectionEntry entry, Serializable key) { 
		collectionEntries.put( coll, entry ); 
		CollectionKey collectionKey = new CollectionKey( entry.getLoadedPersister(), key ); 
		PersistentCollection old = ( PersistentCollection ) collectionsByKey.put( collectionKey, coll ); 
		if ( old != null ) { 
			if ( old == coll ) { 
				throw new AssertionFailure("bug adding collection twice"); 
			} 
			// or should it actually throw an exception? 
			old.unsetSession( session ); 
			collectionEntries.remove( old ); 
			// watch out for a case where old is still referenced 
Full Snippet Info
2
CodeRank