public class LazyAttributeLoadingInterceptor extends AbstractLazyLoadInterceptor
Constructor and Description |
---|
LazyAttributeLoadingInterceptor(String entityName,
Object identifier,
Set<String> lazyFields,
SharedSessionContractImplementor session) |
Modifier and Type | Method and Description |
---|---|
void |
attributeInitialized(String name)
Callback from the enhanced class that an attribute has been read or written
|
Object |
fetchAttribute(Object target,
String attributeName)
Fetches the lazy attribute.
|
Object |
getIdentifier()
The id of the entity instance this interceptor is associated with
|
Set<String> |
getInitializedLazyAttributeNames()
The names of all lazy attributes which have been initialized
|
protected 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 |
hasAnyUninitializedAttributes() |
boolean |
isAttributeLoaded(String fieldName) |
protected Object |
loadAttribute(Object target,
String attributeName) |
String |
toString() |
allowLoadOutsideTransaction, getEntityName, getLinkedSession, getSessionFactoryUuid, readBoolean, readByte, readChar, readDouble, readFloat, readInt, readLong, readObject, readShort, setSession, unsetSession, writeBoolean, writeByte, writeChar, writeDouble, writeFloat, writeInt, writeLong, writeObject, writeShort
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getEntityName
allowLoadOutsideTransaction, getLinkedSession, getSessionFactoryUuid, setSession, unsetSession
readBoolean, readByte, readChar, readDouble, readFloat, readInt, readLong, readObject, readShort, writeBoolean, writeByte, writeChar, writeDouble, writeFloat, writeInt, writeLong, writeObject, writeShort
public LazyAttributeLoadingInterceptor(String entityName, Object identifier, Set<String> lazyFields, SharedSessionContractImplementor session)
public Object getIdentifier()
BytecodeLazyAttributeInterceptor
protected Object handleRead(Object target, String attributeName, Object value)
AbstractInterceptor
handleRead
in class AbstractInterceptor
protected Object handleWrite(Object target, String attributeName, Object oldValue, Object newValue)
AbstractInterceptor
handleWrite
in class AbstractInterceptor
public Object fetchAttribute(Object target, String attributeName)
public boolean isAttributeLoaded(String fieldName)
public boolean hasAnyUninitializedAttributes()
public void attributeInitialized(String name)
BytecodeLazyAttributeInterceptor
public Set<String> getInitializedLazyAttributeNames()
BytecodeLazyAttributeInterceptor
Copyright © 2001-2021 Red Hat, Inc. All Rights Reserved.