Code example for LazyInitializer

Methods: setIdentifier

0
 
		if ( value instanceof HibernateProxy ) { 
            LOG.debugf("Setting proxy identifier: %s", id); 
			HibernateProxy proxy = (HibernateProxy) value; 
			LazyInitializer li = proxy.getHibernateLazyInitializer(); 
			li.setIdentifier(id); 
			reassociateProxy(li, proxy); 
		} 
	} 
 
	/** 
	 * Associate a proxy that was instantiated by another session with this session 
	 * 
	 * @param li The proxy initializer. 
	 * @param proxy The proxy to reassociate. 
	 */ 
	private void reassociateProxy(LazyInitializer li, HibernateProxy proxy) { 
		if ( li.getSession() != this.getSession() ) { 
			final EntityPersister persister = session.getFactory().getEntityPersister( li.getEntityName() ); 
			final EntityKey key = session.generateEntityKey( li.getIdentifier(), persister ); 
Connect your IDE to all the code out there  Get Codota for Java