| Modifier and Type | Field and Description |
|---|---|
| private String | |
| private Serializable | |
| private boolean | |
| private boolean | |
| private Boolean | |
| private transient SessionImplementor | |
| private Object | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected | AbstractLazyInitializer(String
The name of the entity being proxied. entityName, Serializable The identifier of the entity being proxied. id, SessionImplementor The session owning the proxy. session)Main constructor. |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private void | |
| private static EntityKey | |
| public final String | getEntityName()
Implements org. |
| public final Serializable | getIdentifier()
Implements org. |
| public final Object | getImplementation()
Implements org. |
| public final Object | getImplementation(SessionImplementor
The session to check s)Implements org. |
| private Object | |
| public final SessionImplementor | getSession()
Implements org. |
| protected final Object | |
| public final void | initialize()
Implements org. |
| protected final boolean | Returns: Value for property 'connectedToSession'.Getter for property 'connectedToSession'. |
| public final boolean | |
| protected final Boolean | Returns: null, if the default setting should be used; true, for read-only; false, for modifiableGet the read-only/modifiable setting that should be put in affect when it is attached to a session. |
| public final boolean | isReadOnlySettingAvailable()
Implements org. |
| public final boolean | isUninitialized()
Implements org. |
| public boolean | |
| public final void | setIdentifier(Serializable
The identifier value. id)Implements org. |
| public final void | setImplementation(Object
The proxy target (the actual entity being proxied). target)Implements org. |
| public final void | setReadOnly(boolean
if true, the associated proxy is made read-only;
if false, the associated proxy is made modifiable. readOnly)Implements org. |
| pack-priv final void | setReadOnlyBeforeAttachedToSession(Boolean
the read-only/modifiable setting to use when
associated with a session; null indicates that the default should be used. readOnlyBeforeAttachedToSession)Set the read-only/modifiable setting that should be put in affect when it is attached to a session. |
| public final void | setSession(SessionImplementor
The session s)Implements org. |
| public void | |
| public final void | unsetSession()
Implements org. |
| entityName | back to summary |
|---|---|
| private String entityName | |
| id | back to summary |
|---|---|
| private Serializable id | |
| initialized | back to summary |
|---|---|
| private boolean initialized | |
| readOnly | back to summary |
|---|---|
| private boolean readOnly | |
| readOnlyBeforeAttachedToSession | back to summary |
|---|---|
| private Boolean readOnlyBeforeAttachedToSession | |
| session | back to summary |
|---|---|
| private transient SessionImplementor session | |
| target | back to summary |
|---|---|
| private Object target | |
| unwrap | back to summary |
|---|---|
| private boolean unwrap | |
| AbstractLazyInitializer | back to summary |
|---|---|
| protected AbstractLazyInitializer() For serialization from the non-pojo initializers (HHH-3309) | |
| AbstractLazyInitializer | back to summary |
|---|---|
| protected AbstractLazyInitializer(String entityName, Serializable id, SessionImplementor session) Main constructor.
| |
| checkTargetState | back to summary |
|---|---|
| private void checkTargetState() | |
| errorIfReadOnlySettingNotAvailable | back to summary |
|---|---|
| private void errorIfReadOnlySettingNotAvailable() | |
| generateEntityKeyOrNull | back to summary |
|---|---|
| private static EntityKey generateEntityKeyOrNull(Serializable id, SessionImplementor s, String entityName) | |
| getEntityName | back to summary |
|---|---|
| public final String getEntityName() Implements org. Doc from org. The entity-name of the entity our owning proxy represents.
| |
| getIdentifier | back to summary |
|---|---|
| public final Serializable getIdentifier() Implements org. Doc from org. Retrieve the identifier value for the enity our owning proxy represents.
| |
| getImplementation | back to summary |
|---|---|
| public final Object getImplementation() Implements org. Return the underlying persistent object, initializing if necessary
| |
| getImplementation | back to summary |
|---|---|
| public final Object getImplementation(SessionImplementor s) throws HibernateException Implements org. Return the underlying persistent object in the given Session, or null, do not initialize the proxy
| |
| getProxyOrNull | back to summary |
|---|---|
| private Object getProxyOrNull() | |
| getSession | back to summary |
|---|---|
| public final SessionImplementor getSession() Implements org. Doc from org. Get the session to which this proxy is associated, or null if it is not attached.
| |
| getTarget | back to summary |
|---|---|
| protected final Object getTarget() Getter for property 'target'.
Same as
| |
| initialize | back to summary |
|---|---|
| public final void initialize() throws HibernateException Implements org. Doc from org. Initialize the proxy, fetching the target entity if necessary.
| |
| isConnectedToSession | back to summary |
|---|---|
| protected final boolean isConnectedToSession() Getter for property 'connectedToSession'.
| |
| isReadOnly | back to summary |
|---|---|
| public final boolean isReadOnly() Implements org. Doc from org. Is the proxy read-only?. The read-only/modifiable setting is not available when the proxy is detached or its associated session is closed. To check if the read-only/modifiable setting is available:
| |
| isReadOnlyBeforeAttachedToSession | back to summary |
|---|---|
| protected final Boolean isReadOnlyBeforeAttachedToSession() Get the read-only/modifiable setting that should be put in affect when it is attached to a session. This method should only be called during serialization when read-only/modifiable setting is not available (i.e., isReadOnlySettingAvailable() == false)
| |
| isReadOnlySettingAvailable | back to summary |
|---|---|
| public final boolean isReadOnlySettingAvailable() Implements org. Doc from org. Is the proxy's read-only/modifiable setting available?
| |
| isUninitialized | back to summary |
|---|---|
| public final boolean isUninitialized() Implements org. Doc from org. Is the proxy uninitialzed?
| |
| isUnwrap | back to summary |
|---|---|
| public boolean isUnwrap() Implements org. | |
| setIdentifier | back to summary |
|---|---|
| public final void setIdentifier(Serializable id) Implements org. Doc from org. Set the identifier value for the enity our owning proxy represents.
| |
| setImplementation | back to summary |
|---|---|
| public final void setImplementation(Object target) Implements org. Doc from org. Initialize the proxy manually by injecting its target.
| |
| setReadOnly | back to summary |
|---|---|
| public final void setReadOnly(boolean readOnly) Implements org. Doc from org. Set an associated modifiable proxy to read-only mode, or a read-only proxy to modifiable mode. If the proxy is currently initialized, its implementation will be set to the same mode; otherwise, when the proxy is initialized, its implementation will have the same read-only/ modifiable setting as the proxy. In read-only mode, no snapshot is maintained and the instance is never dirty checked. If the associated proxy already has the specified read-only/modifiable setting, then this method does nothing.
| |
| setReadOnlyBeforeAttachedToSession | back to summary |
|---|---|
| pack-priv final void setReadOnlyBeforeAttachedToSession(Boolean readOnlyBeforeAttachedToSession) Set the read-only/modifiable setting that should be put in affect when it is attached to a session. This method should only be called during deserialization, before associating the proxy with a session.
| |
| setSession | back to summary |
|---|---|
| public final void setSession(SessionImplementor s) throws HibernateException Implements org. Doc from org. 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 symetry 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 contet.
| |
| setUnwrap | back to summary |
|---|---|
| public void setUnwrap(boolean unwrap) Implements org. | |
| unsetSession | back to summary |
|---|---|
| public final void unsetSession() Implements org. Doc from org. 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 | |