Save This Page
Home » Hibernate-3.3.2.GA » org.hibernate » proxy » [javadoc | source]
org.hibernate.proxy
abstract public class: AbstractLazyInitializer [javadoc | source]
java.lang.Object
   org.hibernate.proxy.AbstractLazyInitializer

All Implemented Interfaces:
    LazyInitializer

Direct Known Subclasses:
    BasicLazyInitializer, BasicLazyInitializer, JavassistLazyInitializer, Dom4jLazyInitializer, CGLIBLazyInitializer, CGLIBLazyInitializer, Dom4jLazyInitializer, MapLazyInitializer, MapLazyInitializer

Convenience base class for lazy initialization handlers. Centralizes the basic plumbing of doing lazy initialization freeing subclasses to acts as essentially adapters to their intended entity mode and/or proxy generation strategy.
Constructor:
 protected AbstractLazyInitializer() 
 protected AbstractLazyInitializer(String entityName,
    Serializable id,
    SessionImplementor session) 
    Main constructor.
    Parameters:
    entityName - The name of the entity being proxied.
    id - The identifier of the entity being proxied.
    session - The session owning the proxy.
Method from org.hibernate.proxy.AbstractLazyInitializer Summary:
getEntityName,   getIdentifier,   getImplementation,   getImplementation,   getSession,   getTarget,   initialize,   isConnectedToSession,   isUninitialized,   isUnwrap,   setIdentifier,   setImplementation,   setSession,   setUnwrap,   unsetSession
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.hibernate.proxy.AbstractLazyInitializer Detail:
 public final String getEntityName() 
    {@inheritDoc}
 public final Serializable getIdentifier() 
    {@inheritDoc}
 public final Object getImplementation() 
    Return the underlying persistent object, initializing if necessary
 public final Object getImplementation(SessionImplementor s) throws HibernateException 
    Return the underlying persistent object in the given Session, or null, do not initialize the proxy
 public final SessionImplementor getSession() 
    {@inheritDoc}
 protected final Object getTarget() 
    Getter for property 'target'.

    Same as #getImplementation() except that this method will not force initialization.

 public final  void initialize() throws HibernateException 
    {@inheritDoc}
 protected final boolean isConnectedToSession() 
    Getter for property 'connectedToSession'.
 public final boolean isUninitialized() 
    {@inheritDoc}
 public boolean isUnwrap() 
    {@inheritDoc}
 public final  void setIdentifier(Serializable id) 
    {@inheritDoc}
 public final  void setImplementation(Object target) 
    {@inheritDoc}
 public final  void setSession(SessionImplementor s) throws HibernateException 
    {@inheritDoc}
 public  void setUnwrap(boolean unwrap) 
    {@inheritDoc}
 public  void unsetSession() 
    {@inheritDoc}