Code example for SessionImplementor

Methods: getPersistenceContext

0
		//orphan delete not supported for EntityMode.DOM4J 
		return CollectionHelper.EMPTY_COLLECTION; 
	} 
 
	public PersistentElementHolder(SessionImplementor session, CollectionPersister persister, Serializable key) 
	throws HibernateException { 
		super(session); 
		Element owner = (Element) session.getPersistenceContext().getCollectionOwner(key, persister); 
		if (owner==null) throw new AssertionFailure("null owner"); 
		//element = XMLHelper.generateDom4jElement( persister.getNodeName() ); 
		final String nodeName = persister.getNodeName(); 
		if ( ".".equals(nodeName) ) { 
			element = owner; 
		} 
		else { 
			element = owner.element( nodeName ); 
			if (element==null) element = owner.addElement( nodeName ); 
		} 
	}