|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LazyInitializer
Handles fetching of the underlying entity for a proxy
Method Summary | |
---|---|
java.lang.String |
getEntityName()
The entity-name of the entity our owning proxy represents. |
java.io.Serializable |
getIdentifier()
Retrieve the identifier value for the enity our owning proxy represents. |
java.lang.Object |
getImplementation()
Return the underlying persistent object, initializing if necessary |
java.lang.Object |
getImplementation(SessionImplementor session)
Return the underlying persistent object in the given session, or null if not contained in this session's persistence context. |
java.lang.Class |
getPersistentClass()
Get the actual class of the entity. |
SessionImplementor |
getSession()
Get the session to which this proxy is associated, or null if it is not attached. |
void |
initialize()
Initialize the proxy, fetching the target entity if necessary. |
boolean |
isUninitialized()
Is the proxy uninitialzed? |
boolean |
isUnwrap()
|
void |
setIdentifier(java.io.Serializable id)
Set the identifier value for the enity our owning proxy represents. |
void |
setImplementation(java.lang.Object target)
Initialize the proxy manually by injecting its target. |
void |
setSession(SessionImplementor session)
Associate the proxy with the given session. |
void |
setUnwrap(boolean unwrap)
|
void |
unsetSession()
Unset this initializer's reference to session. |
Method Detail |
---|
void initialize() throws HibernateException
HibernateException
- Indicates a problem initializing the proxy.java.io.Serializable getIdentifier()
void setIdentifier(java.io.Serializable id)
id
- The identifier value.java.lang.String getEntityName()
java.lang.Class getPersistentClass()
getEntityName()
should be used instead.
boolean isUninitialized()
java.lang.Object getImplementation()
java.lang.Object getImplementation(SessionImplementor session) throws HibernateException
session
- The session to check
HibernateException
- Indicates problem locating the target.void setImplementation(java.lang.Object target)
target
- The proxy target (the actual entity being proxied).SessionImplementor getSession()
void setSession(SessionImplementor session) throws HibernateException
session
- The session
HibernateException
- Indicates that the proxy was still contained in the persistence context of the
"previous session".void unsetSession()
Session.evict(java.lang.Object)
and
Session.clear()
processing; most other use-cases should call setSession(org.hibernate.engine.SessionImplementor)
instead.
void setUnwrap(boolean unwrap)
boolean isUnwrap()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |