|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hibernate.proxy.AbstractLazyInitializer
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 Summary | |
protected |
AbstractLazyInitializer(String entityName,
Serializable id,
SessionImplementor session)
|
Method Summary | |
String |
getEntityName()
Get the entity name |
Serializable |
getIdentifier()
Get the identifier held by the proxy |
Object |
getImplementation()
Return the underlying persistent object, initializing if necessary |
Object |
getImplementation(SessionImplementor s)
Return the underlying persistent object in the given Session, or null, do not initialize the proxy |
SessionImplementor |
getSession()
Get the session, if this proxy is attached |
protected Object |
getTarget()
|
void |
initialize()
Initialize the proxy, fetching the target entity if necessary |
protected boolean |
isConnectedToSession()
|
boolean |
isUninitialized()
Is the proxy uninitialzed? |
boolean |
isUnwrap()
|
void |
setIdentifier(Serializable id)
Set the identifier property of the proxy |
void |
setImplementation(Object target)
Initialize the proxy manually |
void |
setSession(SessionImplementor s)
Attach the proxy to a session |
void |
setUnwrap(boolean unwrap)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.hibernate.proxy.LazyInitializer |
getPersistentClass |
Constructor Detail |
protected AbstractLazyInitializer(String entityName, Serializable id, SessionImplementor session)
Method Detail |
public final Serializable getIdentifier()
LazyInitializer
getIdentifier
in interface LazyInitializer
public final void setIdentifier(Serializable id)
LazyInitializer
setIdentifier
in interface LazyInitializer
public final String getEntityName()
LazyInitializer
getEntityName
in interface LazyInitializer
public final boolean isUninitialized()
LazyInitializer
isUninitialized
in interface LazyInitializer
public final SessionImplementor getSession()
LazyInitializer
getSession
in interface LazyInitializer
public final void initialize() throws HibernateException
LazyInitializer
initialize
in interface LazyInitializer
HibernateException
public final void setSession(SessionImplementor s) throws HibernateException
LazyInitializer
setSession
in interface LazyInitializer
HibernateException
protected final boolean isConnectedToSession()
public final void setImplementation(Object target)
LazyInitializer
setImplementation
in interface LazyInitializer
public final Object getImplementation()
getImplementation
in interface LazyInitializer
public final Object getImplementation(SessionImplementor s) throws HibernateException
getImplementation
in interface LazyInitializer
HibernateException
protected final Object getTarget()
public boolean isUnwrap()
isUnwrap
in interface LazyInitializer
public void setUnwrap(boolean unwrap)
setUnwrap
in interface LazyInitializer
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |