Best code examples for Hibernate ORM CollectionType class (org.hibernate.type.CollectionType)

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

Hibernate ORM CollectionType examples from Open Source projects
This code example shows how to use the following methods: getRole, hasHolder, wrap
	final Object processArrayOrNewCollection(Object collection, CollectionType collectionType) 
	throws HibernateException { 
 
		final SessionImplementor session = getSession(); 
 
		if (collection==null) { 
			//do nothing 
			return null; 
		} 
		else { 
			CollectionPersister persister = session.getFactory().getCollectionPersister( collectionType.getRole() ); 
 
			final PersistenceContext persistenceContext = session.getPersistenceContext(); 
			//TODO: move into collection type, so we can use polymorphism! 
			if ( collectionType.hasHolder() ) { 
 
				if (collection==CollectionType.UNFETCHED_COLLECTION) return null; 
 
				PersistentCollection ah = persistenceContext.getCollectionHolder(collection); 
				if (ah==null) { 

6
CodeRank
This code example shows how to use the following methods: getRole, hasHolder
			return null; 
		} 
 
		if (collection!=null) { 
			final PersistentCollection coll;
			if ( type.hasHolder() ) {
				coll = getSession().getPersistenceContext().getCollectionHolder(collection);
			} 
			else { 
				coll = (PersistentCollection) collection;
			} 
 
			Collections.processReachableCollection( coll, type, owner, getSession() );
		} 
 
		return null; 
 
	} 
 
	FlushVisitor(EventSource session, Object owner) {

5
CodeRank
This code example shows how to use the following methods: getRole
		try { 
			return ( QueryableCollection ) factory.getCollectionPersister( role );
		} 
		catch ( ClassCastException cce ) {
			throw new QueryException( "collection role is not queryable: " + role );
		} 
		catch ( Exception e ) {
			throw new QueryException( "collection role not found: " + role );
		} 
	} 
 
	public final TypedValue[] getTypedValues(Criteria criteria, CriteriaQuery criteriaQuery)
	        throws HibernateException {
		return NO_VALUES;
	} 
 
	public final String toString() {
		return propertyName + ( excludeEmpty() ? " is not empty" : " is empty" );
	} 
} 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getRole
This code example shows how to use the following methods: hasHolder
		return null; 
	} 
	public void evictCollection(Object value, CollectionType type) { 
 
		final Object pc; 
		if ( type.hasHolder() ) { 
			pc = getSession().getPersistenceContext().removeCollectionHolder(value); 
		} 
		else if ( value instanceof PersistentCollection ) { 
			pc = value; 
		} 
		else { 
			return; //EARLY EXIT! 
		} 
 
		PersistentCollection collection = (PersistentCollection) pc; 
		if ( collection.unsetSession( getSession() ) ) evictCollection(collection); 
	} 
 
	private void evictCollection(PersistentCollection collection) { 
Full Snippet Info
5
CodeRank