The ILazyInitializer type exposes the following members.

Methods

  NameDescription
Public methodGetImplementation()()()()
Return the underlying persistent object, initializing if necessary.
Public methodGetImplementation(ISessionImplementor)
Return the underlying persistent object in a given ISession, or null.
Public methodInitialize
Perform an ImmediateLoad of the actual object for the Proxy.
Public methodSetImplementation
Initialize the proxy manually by injecting its target.
Public methodSetSession
Associate the proxy with the given session. Care should be given to make certain that the proxy is added to the session's persistence context as well to maintain the symmetry of the association. That must be done seperately as this method simply sets an internal reference. We do also check that if there is already an associated session that the proxy reference was removed from that previous session's persistence context.
Public methodUnsetSession
Unset this initializer's reference to session. It is assumed that the caller is also taking care or cleaning up the owning proxy's reference in the persistence context. Generally speaking this is intended to be called only during Evict(Object) and Clear()()()() processing; most other use-cases should call SetSession(ISessionImplementor) instead.

See Also