Class EnhancementAsProxyLazinessInterceptor
java.lang.Object
org.hibernate.bytecode.enhance.spi.interceptor.AbstractInterceptor
org.hibernate.bytecode.enhance.spi.interceptor.EnhancementAsProxyLazinessInterceptor
- All Implemented Interfaces:
BytecodeLazyAttributeInterceptor
,SessionAssociableInterceptor
,LazyPropertyInitializer.InterceptorImplementor
,PersistentAttributeInterceptor
public class EnhancementAsProxyLazinessInterceptor
extends AbstractInterceptor
implements BytecodeLazyAttributeInterceptor
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
This is an helper object to group all state which relates to a particular entity type, and which is needed for this interceptor. -
Constructor Summary
ConstructorsConstructorDescriptionEnhancementAsProxyLazinessInterceptor
(EnhancementAsProxyLazinessInterceptor.EntityRelatedState meta, EntityKey entityKey, SharedSessionContractImplementor session) -
Method Summary
Modifier and TypeMethodDescriptionvoid
attributeInitialized
(String name) Callback from the enhanced class that an attribute has been read or writtenforceInitialize
(Object target, String attributeName) forceInitialize
(Object target, String attributeName, SharedSessionContractImplementor session, boolean isTemporarySession) The name of the entity this interceptor is meant to interceptThe id of the entity instance this interceptor is associated withThe names of all lazy attributes which have been initializedprotected Object
handleRead
(Object target, String attributeName, Object value) Handle the case of reading an attribute.protected Object
handleWrite
(Object target, String attributeName, Object oldValue, Object newValue) Handle the case of writing an attribute.boolean
boolean
boolean
isAttributeLoaded
(String fieldName) Callback from the enhanced class that an attribute has been loadedprotected boolean
isIdentifier
(String attributeName) boolean
boolean
void
Methods inherited from class org.hibernate.bytecode.enhance.spi.interceptor.AbstractInterceptor
allowLoadOutsideTransaction, getLinkedSession, getSessionFactoryUuid, readBoolean, readByte, readChar, readDouble, readFloat, readInt, readLong, readObject, readShort, setSession, unsetSession, writeBoolean, writeByte, writeChar, writeDouble, writeFloat, writeInt, writeLong, writeObject, writeShort
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.hibernate.engine.spi.PersistentAttributeInterceptor
readBoolean, readByte, readChar, readDouble, readFloat, readInt, readLong, readObject, readShort, writeBoolean, writeByte, writeChar, writeDouble, writeFloat, writeInt, writeLong, writeObject, writeShort
Methods inherited from interface org.hibernate.bytecode.enhance.spi.interceptor.SessionAssociableInterceptor
allowLoadOutsideTransaction, getLinkedSession, getSessionFactoryUuid, setSession, unsetSession
-
Constructor Details
-
Method Details
-
getEntityName
Description copied from interface:BytecodeLazyAttributeInterceptor
The name of the entity this interceptor is meant to intercept- Specified by:
getEntityName
in interfaceBytecodeLazyAttributeInterceptor
-
getEntityKey
-
handleRead
Description copied from class:AbstractInterceptor
Handle the case of reading an attribute. The result is what is returned to the caller- Specified by:
handleRead
in classAbstractInterceptor
-
forceInitialize
-
handleWrite
Description copied from class:AbstractInterceptor
Handle the case of writing an attribute. The result is what is set as the entity state- Specified by:
handleWrite
in classAbstractInterceptor
-
getInitializedLazyAttributeNames
Description copied from interface:BytecodeLazyAttributeInterceptor
The names of all lazy attributes which have been initialized- Specified by:
getInitializedLazyAttributeNames
in interfaceBytecodeLazyAttributeInterceptor
- Specified by:
getInitializedLazyAttributeNames
in interfaceLazyPropertyInitializer.InterceptorImplementor
- Specified by:
getInitializedLazyAttributeNames
in interfacePersistentAttributeInterceptor
-
attributeInitialized
Description copied from interface:BytecodeLazyAttributeInterceptor
Callback from the enhanced class that an attribute has been read or written- Specified by:
attributeInitialized
in interfaceBytecodeLazyAttributeInterceptor
- Specified by:
attributeInitialized
in interfaceLazyPropertyInitializer.InterceptorImplementor
- Specified by:
attributeInitialized
in interfacePersistentAttributeInterceptor
-
isAttributeLoaded
Description copied from interface:PersistentAttributeInterceptor
Callback from the enhanced class that an attribute has been loaded- Specified by:
isAttributeLoaded
in interfaceBytecodeLazyAttributeInterceptor
- Specified by:
isAttributeLoaded
in interfacePersistentAttributeInterceptor
- Parameters:
fieldName
-- Returns:
- true id the attribute is loaded false otherwise
-
hasAnyUninitializedAttributes
public boolean hasAnyUninitializedAttributes()- Specified by:
hasAnyUninitializedAttributes
in interfaceBytecodeLazyAttributeInterceptor
-
getIdentifier
Description copied from interface:BytecodeLazyAttributeInterceptor
The id of the entity instance this interceptor is associated with- Specified by:
getIdentifier
in interfaceBytecodeLazyAttributeInterceptor
-
isInitializing
public boolean isInitializing() -
setInitializing
public void setInitializing() -
isInitialized
public boolean isInitialized() -
hasWrittenFieldNames
public boolean hasWrittenFieldNames() -
isIdentifier
-