Class EnhancementAsProxyLazinessInterceptor
- java.lang.Object
-
- org.hibernate.bytecode.enhance.spi.interceptor.AbstractInterceptor
-
- org.hibernate.bytecode.enhance.spi.interceptor.AbstractLazyLoadInterceptor
-
- org.hibernate.bytecode.enhance.spi.interceptor.EnhancementAsProxyLazinessInterceptor
-
- All Implemented Interfaces:
BytecodeLazyAttributeInterceptor,SessionAssociableInterceptor,LazyPropertyInitializer.InterceptorImplementor,PersistentAttributeInterceptor
public class EnhancementAsProxyLazinessInterceptor extends AbstractLazyLoadInterceptor
-
-
Constructor Summary
Constructors Constructor Description EnhancementAsProxyLazinessInterceptor(java.lang.String entityName, java.util.Set<java.lang.String> identifierAttributeNames, CompositeType nonAggregatedCidMapper, EntityKey entityKey, SharedSessionContractImplementor session)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidattributeInitialized(java.lang.String name)Callback from the enhanced class that an attribute has been read or writtenjava.lang.ObjectforceInitialize(java.lang.Object target, java.lang.String attributeName)java.lang.ObjectforceInitialize(java.lang.Object target, java.lang.String attributeName, SharedSessionContractImplementor session, boolean isTemporarySession)EntityKeygetEntityKey()java.lang.ObjectgetIdentifier()The id of the entity instance this interceptor is associated withjava.util.Set<java.lang.String>getInitializedLazyAttributeNames()The names of all lazy attributes which have been initializedprotected java.lang.ObjecthandleRead(java.lang.Object target, java.lang.String attributeName, java.lang.Object value)Handle the case of reading an attribute.protected java.lang.ObjecthandleWrite(java.lang.Object target, java.lang.String attributeName, java.lang.Object oldValue, java.lang.Object newValue)Handle the case of writing an attribute.booleanhasAnyUninitializedAttributes()booleanhasWrittenFieldNames()booleanisAttributeLoaded(java.lang.String fieldName)Callback from the enhanced class that an attribute has been loadedbooleanisInitialized()booleanisInitializing()voidsetInitializing()-
Methods inherited from class org.hibernate.bytecode.enhance.spi.interceptor.AbstractInterceptor
allowLoadOutsideTransaction, getEntityName, 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.bytecode.enhance.spi.interceptor.BytecodeLazyAttributeInterceptor
getEntityName
-
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 Detail
-
EnhancementAsProxyLazinessInterceptor
public EnhancementAsProxyLazinessInterceptor(java.lang.String entityName, java.util.Set<java.lang.String> identifierAttributeNames, CompositeType nonAggregatedCidMapper, EntityKey entityKey, SharedSessionContractImplementor session)
-
-
Method Detail
-
getEntityKey
public EntityKey getEntityKey()
-
handleRead
protected java.lang.Object handleRead(java.lang.Object target, java.lang.String attributeName, java.lang.Object value)Description copied from class:AbstractInterceptorHandle the case of reading an attribute. The result is what is returned to the caller- Specified by:
handleReadin classAbstractInterceptor
-
forceInitialize
public java.lang.Object forceInitialize(java.lang.Object target, java.lang.String attributeName)
-
forceInitialize
public java.lang.Object forceInitialize(java.lang.Object target, java.lang.String attributeName, SharedSessionContractImplementor session, boolean isTemporarySession)
-
handleWrite
protected java.lang.Object handleWrite(java.lang.Object target, java.lang.String attributeName, java.lang.Object oldValue, java.lang.Object newValue)Description copied from class:AbstractInterceptorHandle the case of writing an attribute. The result is what is set as the entity state- Specified by:
handleWritein classAbstractInterceptor
-
getInitializedLazyAttributeNames
public java.util.Set<java.lang.String> getInitializedLazyAttributeNames()
Description copied from interface:BytecodeLazyAttributeInterceptorThe names of all lazy attributes which have been initialized
-
attributeInitialized
public void attributeInitialized(java.lang.String name)
Description copied from interface:BytecodeLazyAttributeInterceptorCallback from the enhanced class that an attribute has been read or written
-
isAttributeLoaded
public boolean isAttributeLoaded(java.lang.String fieldName)
Description copied from interface:PersistentAttributeInterceptorCallback from the enhanced class that an attribute has been loaded- Returns:
- true id the attribute is loaded false otherwise
-
hasAnyUninitializedAttributes
public boolean hasAnyUninitializedAttributes()
-
getIdentifier
public java.lang.Object getIdentifier()
Description copied from interface:BytecodeLazyAttributeInterceptorThe id of the entity instance this interceptor is associated with
-
isInitializing
public boolean isInitializing()
-
setInitializing
public void setInitializing()
-
isInitialized
public boolean isInitialized()
-
hasWrittenFieldNames
public boolean hasWrittenFieldNames()
-
-