public class LazyAttributeLoadingInterceptor extends java.lang.Object implements PersistentAttributeInterceptor, LazyPropertyInitializer.InterceptorImplementor
Constructor and Description |
---|
LazyAttributeLoadingInterceptor(java.lang.String entityName,
java.util.Set<java.lang.String> lazyFields,
SharedSessionContractImplementor session) |
Modifier and Type | Method and Description |
---|---|
boolean |
allowLoadOutsideTransaction() |
void |
attributeInitialized(java.lang.String name) |
java.lang.Object |
fetchAttribute(java.lang.Object target,
java.lang.String attributeName)
Fetches the lazy attribute.
|
java.util.Set<java.lang.String> |
getInitializedLazyAttributeNames() |
SharedSessionContractImplementor |
getLinkedSession() |
java.lang.String |
getSessionFactoryUuid() |
boolean |
hasAnyUninitializedAttributes() |
protected java.lang.Object |
intercept(java.lang.Object target,
java.lang.String attributeName,
java.lang.Object value) |
boolean |
isAttributeLoaded(java.lang.String fieldName) |
protected java.lang.Object |
loadAttribute(java.lang.Object target,
java.lang.String attributeName) |
boolean |
readBoolean(java.lang.Object obj,
java.lang.String name,
boolean oldValue) |
byte |
readByte(java.lang.Object obj,
java.lang.String name,
byte oldValue) |
char |
readChar(java.lang.Object obj,
java.lang.String name,
char oldValue) |
double |
readDouble(java.lang.Object obj,
java.lang.String name,
double oldValue) |
float |
readFloat(java.lang.Object obj,
java.lang.String name,
float oldValue) |
int |
readInt(java.lang.Object obj,
java.lang.String name,
int oldValue) |
long |
readLong(java.lang.Object obj,
java.lang.String name,
long oldValue) |
java.lang.Object |
readObject(java.lang.Object obj,
java.lang.String name,
java.lang.Object oldValue) |
short |
readShort(java.lang.Object obj,
java.lang.String name,
short oldValue) |
void |
setSession(SharedSessionContractImplementor session) |
java.lang.String |
toString() |
void |
unsetSession() |
boolean |
writeBoolean(java.lang.Object obj,
java.lang.String name,
boolean oldValue,
boolean newValue) |
byte |
writeByte(java.lang.Object obj,
java.lang.String name,
byte oldValue,
byte newValue) |
char |
writeChar(java.lang.Object obj,
java.lang.String name,
char oldValue,
char newValue) |
double |
writeDouble(java.lang.Object obj,
java.lang.String name,
double oldValue,
double newValue) |
float |
writeFloat(java.lang.Object obj,
java.lang.String name,
float oldValue,
float newValue) |
int |
writeInt(java.lang.Object obj,
java.lang.String name,
int oldValue,
int newValue) |
long |
writeLong(java.lang.Object obj,
java.lang.String name,
long oldValue,
long newValue) |
java.lang.Object |
writeObject(java.lang.Object obj,
java.lang.String name,
java.lang.Object oldValue,
java.lang.Object newValue) |
short |
writeShort(java.lang.Object obj,
java.lang.String name,
short oldValue,
short newValue) |
public LazyAttributeLoadingInterceptor(java.lang.String entityName, java.util.Set<java.lang.String> lazyFields, SharedSessionContractImplementor session)
protected final java.lang.Object intercept(java.lang.Object target, java.lang.String attributeName, java.lang.Object value)
public java.lang.Object fetchAttribute(java.lang.Object target, java.lang.String attributeName)
protected java.lang.Object loadAttribute(java.lang.Object target, java.lang.String attributeName)
public final void setSession(SharedSessionContractImplementor session)
public final void unsetSession()
public boolean isAttributeLoaded(java.lang.String fieldName)
public boolean hasAnyUninitializedAttributes()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean readBoolean(java.lang.Object obj, java.lang.String name, boolean oldValue)
readBoolean
in interface PersistentAttributeInterceptor
public boolean writeBoolean(java.lang.Object obj, java.lang.String name, boolean oldValue, boolean newValue)
writeBoolean
in interface PersistentAttributeInterceptor
public byte readByte(java.lang.Object obj, java.lang.String name, byte oldValue)
readByte
in interface PersistentAttributeInterceptor
public byte writeByte(java.lang.Object obj, java.lang.String name, byte oldValue, byte newValue)
writeByte
in interface PersistentAttributeInterceptor
public char readChar(java.lang.Object obj, java.lang.String name, char oldValue)
readChar
in interface PersistentAttributeInterceptor
public char writeChar(java.lang.Object obj, java.lang.String name, char oldValue, char newValue)
writeChar
in interface PersistentAttributeInterceptor
public short readShort(java.lang.Object obj, java.lang.String name, short oldValue)
readShort
in interface PersistentAttributeInterceptor
public short writeShort(java.lang.Object obj, java.lang.String name, short oldValue, short newValue)
writeShort
in interface PersistentAttributeInterceptor
public int readInt(java.lang.Object obj, java.lang.String name, int oldValue)
readInt
in interface PersistentAttributeInterceptor
public int writeInt(java.lang.Object obj, java.lang.String name, int oldValue, int newValue)
writeInt
in interface PersistentAttributeInterceptor
public float readFloat(java.lang.Object obj, java.lang.String name, float oldValue)
readFloat
in interface PersistentAttributeInterceptor
public float writeFloat(java.lang.Object obj, java.lang.String name, float oldValue, float newValue)
writeFloat
in interface PersistentAttributeInterceptor
public double readDouble(java.lang.Object obj, java.lang.String name, double oldValue)
readDouble
in interface PersistentAttributeInterceptor
public double writeDouble(java.lang.Object obj, java.lang.String name, double oldValue, double newValue)
writeDouble
in interface PersistentAttributeInterceptor
public long readLong(java.lang.Object obj, java.lang.String name, long oldValue)
readLong
in interface PersistentAttributeInterceptor
public long writeLong(java.lang.Object obj, java.lang.String name, long oldValue, long newValue)
writeLong
in interface PersistentAttributeInterceptor
public java.lang.Object readObject(java.lang.Object obj, java.lang.String name, java.lang.Object oldValue)
readObject
in interface PersistentAttributeInterceptor
public java.lang.Object writeObject(java.lang.Object obj, java.lang.String name, java.lang.Object oldValue, java.lang.Object newValue)
writeObject
in interface PersistentAttributeInterceptor
public SharedSessionContractImplementor getLinkedSession()
public boolean allowLoadOutsideTransaction()
public java.lang.String getSessionFactoryUuid()
public void attributeInitialized(java.lang.String name)
attributeInitialized
in interface LazyPropertyInitializer.InterceptorImplementor
public java.util.Set<java.lang.String> getInitializedLazyAttributeNames()
getInitializedLazyAttributeNames
in interface LazyPropertyInitializer.InterceptorImplementor
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.