Class AbstractInterceptor
- java.lang.Object
-
- org.hibernate.bytecode.enhance.spi.interceptor.AbstractInterceptor
-
- All Implemented Interfaces:
SessionAssociableInterceptor,LazyPropertyInitializer.InterceptorImplementor,PersistentAttributeInterceptor
- Direct Known Subclasses:
AbstractLazyLoadInterceptor
public abstract class AbstractInterceptor extends java.lang.Object implements SessionAssociableInterceptor
-
-
Constructor Summary
Constructors Constructor Description AbstractInterceptor(java.lang.String entityName)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanallowLoadOutsideTransaction()java.lang.StringgetEntityName()SharedSessionContractImplementorgetLinkedSession()java.lang.StringgetSessionFactoryUuid()protected abstract java.lang.ObjecthandleRead(java.lang.Object target, java.lang.String attributeName, java.lang.Object value)Handle the case of reading an attribute.protected abstract 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.booleanreadBoolean(java.lang.Object obj, java.lang.String name, boolean oldValue)bytereadByte(java.lang.Object obj, java.lang.String name, byte oldValue)charreadChar(java.lang.Object obj, java.lang.String name, char oldValue)doublereadDouble(java.lang.Object obj, java.lang.String name, double oldValue)floatreadFloat(java.lang.Object obj, java.lang.String name, float oldValue)intreadInt(java.lang.Object obj, java.lang.String name, int oldValue)longreadLong(java.lang.Object obj, java.lang.String name, long oldValue)java.lang.ObjectreadObject(java.lang.Object obj, java.lang.String name, java.lang.Object oldValue)shortreadShort(java.lang.Object obj, java.lang.String name, short oldValue)voidsetSession(SharedSessionContractImplementor session)voidunsetSession()booleanwriteBoolean(java.lang.Object obj, java.lang.String name, boolean oldValue, boolean newValue)bytewriteByte(java.lang.Object obj, java.lang.String name, byte oldValue, byte newValue)charwriteChar(java.lang.Object obj, java.lang.String name, char oldValue, char newValue)doublewriteDouble(java.lang.Object obj, java.lang.String name, double oldValue, double newValue)floatwriteFloat(java.lang.Object obj, java.lang.String name, float oldValue, float newValue)intwriteInt(java.lang.Object obj, java.lang.String name, int oldValue, int newValue)longwriteLong(java.lang.Object obj, java.lang.String name, long oldValue, long newValue)java.lang.ObjectwriteObject(java.lang.Object obj, java.lang.String name, java.lang.Object oldValue, java.lang.Object newValue)shortwriteShort(java.lang.Object obj, java.lang.String name, short oldValue, short newValue)-
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
attributeInitialized, getInitializedLazyAttributeNames, isAttributeLoaded
-
-
-
-
Method Detail
-
getEntityName
public java.lang.String getEntityName()
-
getLinkedSession
public SharedSessionContractImplementor getLinkedSession()
- Specified by:
getLinkedSessionin interfaceSessionAssociableInterceptor
-
setSession
public void setSession(SharedSessionContractImplementor session)
- Specified by:
setSessionin interfaceSessionAssociableInterceptor
-
unsetSession
public void unsetSession()
- Specified by:
unsetSessionin interfaceSessionAssociableInterceptor
-
allowLoadOutsideTransaction
public boolean allowLoadOutsideTransaction()
- Specified by:
allowLoadOutsideTransactionin interfaceSessionAssociableInterceptor
-
getSessionFactoryUuid
public java.lang.String getSessionFactoryUuid()
- Specified by:
getSessionFactoryUuidin interfaceSessionAssociableInterceptor
-
handleRead
protected abstract java.lang.Object handleRead(java.lang.Object target, java.lang.String attributeName, java.lang.Object value)Handle the case of reading an attribute. The result is what is returned to the caller
-
handleWrite
protected abstract java.lang.Object handleWrite(java.lang.Object target, java.lang.String attributeName, java.lang.Object oldValue, java.lang.Object newValue)Handle the case of writing an attribute. The result is what is set as the entity state
-
readBoolean
public boolean readBoolean(java.lang.Object obj, java.lang.String name, boolean oldValue)- Specified by:
readBooleanin interfacePersistentAttributeInterceptor
-
writeBoolean
public boolean writeBoolean(java.lang.Object obj, java.lang.String name, boolean oldValue, boolean newValue)- Specified by:
writeBooleanin interfacePersistentAttributeInterceptor
-
readByte
public byte readByte(java.lang.Object obj, java.lang.String name, byte oldValue)- Specified by:
readBytein interfacePersistentAttributeInterceptor
-
writeByte
public byte writeByte(java.lang.Object obj, java.lang.String name, byte oldValue, byte newValue)- Specified by:
writeBytein interfacePersistentAttributeInterceptor
-
readChar
public char readChar(java.lang.Object obj, java.lang.String name, char oldValue)- Specified by:
readCharin interfacePersistentAttributeInterceptor
-
writeChar
public char writeChar(java.lang.Object obj, java.lang.String name, char oldValue, char newValue)- Specified by:
writeCharin interfacePersistentAttributeInterceptor
-
readShort
public short readShort(java.lang.Object obj, java.lang.String name, short oldValue)- Specified by:
readShortin interfacePersistentAttributeInterceptor
-
writeShort
public short writeShort(java.lang.Object obj, java.lang.String name, short oldValue, short newValue)- Specified by:
writeShortin interfacePersistentAttributeInterceptor
-
readInt
public int readInt(java.lang.Object obj, java.lang.String name, int oldValue)- Specified by:
readIntin interfacePersistentAttributeInterceptor
-
writeInt
public int writeInt(java.lang.Object obj, java.lang.String name, int oldValue, int newValue)- Specified by:
writeIntin interfacePersistentAttributeInterceptor
-
readFloat
public float readFloat(java.lang.Object obj, java.lang.String name, float oldValue)- Specified by:
readFloatin interfacePersistentAttributeInterceptor
-
writeFloat
public float writeFloat(java.lang.Object obj, java.lang.String name, float oldValue, float newValue)- Specified by:
writeFloatin interfacePersistentAttributeInterceptor
-
readDouble
public double readDouble(java.lang.Object obj, java.lang.String name, double oldValue)- Specified by:
readDoublein interfacePersistentAttributeInterceptor
-
writeDouble
public double writeDouble(java.lang.Object obj, java.lang.String name, double oldValue, double newValue)- Specified by:
writeDoublein interfacePersistentAttributeInterceptor
-
readLong
public long readLong(java.lang.Object obj, java.lang.String name, long oldValue)- Specified by:
readLongin interfacePersistentAttributeInterceptor
-
writeLong
public long writeLong(java.lang.Object obj, java.lang.String name, long oldValue, long newValue)- Specified by:
writeLongin interfacePersistentAttributeInterceptor
-
readObject
public java.lang.Object readObject(java.lang.Object obj, java.lang.String name, java.lang.Object oldValue)- Specified by:
readObjectin interfacePersistentAttributeInterceptor
-
writeObject
public java.lang.Object writeObject(java.lang.Object obj, java.lang.String name, java.lang.Object oldValue, java.lang.Object newValue)- Specified by:
writeObjectin interfacePersistentAttributeInterceptor
-
-