类 LazyAttributeLoadingInterceptor
- java.lang.Object
-
- org.hibernate.bytecode.enhance.spi.interceptor.AbstractInterceptor
-
- org.hibernate.bytecode.enhance.spi.interceptor.AbstractLazyLoadInterceptor
-
- org.hibernate.bytecode.enhance.spi.interceptor.LazyAttributeLoadingInterceptor
-
- 所有已实现的接口:
BytecodeLazyAttributeInterceptor,SessionAssociableInterceptor,LazyPropertyInitializer.InterceptorImplementor,PersistentAttributeInterceptor
public class LazyAttributeLoadingInterceptor extends AbstractLazyLoadInterceptor
Interceptor that loads attributes lazily- 作者:
- Luis Barreiro, Steve Ebersole
-
-
构造器概要
构造器 构造器 说明 LazyAttributeLoadingInterceptor(String entityName, Object identifier, Set<String> lazyFields, SharedSessionContractImplementor session)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidattributeInitialized(String name)Callback from the enhanced class that an attribute has been read or writtenObjectfetchAttribute(Object target, String attributeName)Fetches the lazy attribute.ObjectgetIdentifier()The id of the entity instance this interceptor is associated withSet<String>getInitializedLazyAttributeNames()The names of all lazy attributes which have been initializedprotected ObjecthandleRead(Object target, String attributeName, Object value)Handle the case of reading an attribute.protected ObjecthandleWrite(Object target, String attributeName, Object oldValue, Object newValue)Handle the case of writing an attribute.booleanhasAnyUninitializedAttributes()booleanisAttributeLoaded(String fieldName)protected ObjectloadAttribute(Object target, String attributeName)StringtoString()-
从类继承的方法 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
-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
从接口继承的方法 org.hibernate.bytecode.enhance.spi.interceptor.BytecodeLazyAttributeInterceptor
getEntityName
-
从接口继承的方法 org.hibernate.engine.spi.PersistentAttributeInterceptor
readBoolean, readByte, readChar, readDouble, readFloat, readInt, readLong, readObject, readShort, writeBoolean, writeByte, writeChar, writeDouble, writeFloat, writeInt, writeLong, writeObject, writeShort
-
从接口继承的方法 org.hibernate.bytecode.enhance.spi.interceptor.SessionAssociableInterceptor
allowLoadOutsideTransaction, getLinkedSession, getSessionFactoryUuid, setSession, unsetSession
-
-
-
-
构造器详细资料
-
LazyAttributeLoadingInterceptor
public LazyAttributeLoadingInterceptor(String entityName, Object identifier, Set<String> lazyFields, SharedSessionContractImplementor session)
-
-
方法详细资料
-
getIdentifier
public Object getIdentifier()
从接口复制的说明:BytecodeLazyAttributeInterceptorThe id of the entity instance this interceptor is associated with
-
handleRead
protected Object handleRead(Object target, String attributeName, Object value)
从类复制的说明:AbstractInterceptorHandle the case of reading an attribute. The result is what is returned to the caller- 指定者:
handleRead在类中AbstractInterceptor
-
handleWrite
protected Object handleWrite(Object target, String attributeName, Object oldValue, Object newValue)
从类复制的说明:AbstractInterceptorHandle the case of writing an attribute. The result is what is set as the entity state- 指定者:
handleWrite在类中AbstractInterceptor
-
fetchAttribute
public Object fetchAttribute(Object target, String attributeName)
Fetches the lazy attribute. The attribute does not get associated with the entity. (To be used by hibernate methods)
-
isAttributeLoaded
public boolean isAttributeLoaded(String fieldName)
-
hasAnyUninitializedAttributes
public boolean hasAnyUninitializedAttributes()
-
attributeInitialized
public void attributeInitialized(String name)
从接口复制的说明:BytecodeLazyAttributeInterceptorCallback from the enhanced class that an attribute has been read or written
-
getInitializedLazyAttributeNames
public Set<String> getInitializedLazyAttributeNames()
从接口复制的说明:BytecodeLazyAttributeInterceptorThe names of all lazy attributes which have been initialized
-
-