Class AttributeConverterMutabilityPlanImpl<T>
- java.lang.Object
-
- org.hibernate.type.descriptor.java.MutableMutabilityPlan<T>
-
- org.hibernate.type.descriptor.converter.AttributeConverterMutabilityPlanImpl<T>
-
- All Implemented Interfaces:
Serializable,MutabilityPlan<T>
public class AttributeConverterMutabilityPlanImpl<T> extends MutableMutabilityPlan<T>
The standard approach for defining a MutabilityPlan for converted (AttributeConverter) values is to always assume that they are immutable to make sure that dirty checking, deep copying and second-level caching all work properly no matter what. That was work done under https://hibernate.atlassian.net/browse/HHH-10111 However a series of approaches to tell Hibernate that the values are immutable were documented as part of https://hibernate.atlassian.net/browse/HHH-10127- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.hibernate.type.descriptor.java.MutableMutabilityPlan
INSTANCE
-
-
Constructor Summary
Constructors Constructor Description AttributeConverterMutabilityPlanImpl(JpaAttributeConverter converter, boolean mutable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tassemble(Serializable cached, SharedSessionContract session)Assemble a previously disassembled value.protected TdeepCopyNotNull(T value)Serializabledisassemble(T value, SharedSessionContract session)Return a disassembled representation of the value.booleanisMutable()Can the internal state of instances ofTbe changed?-
Methods inherited from class org.hibernate.type.descriptor.java.MutableMutabilityPlan
deepCopy
-
-
-
-
Constructor Detail
-
AttributeConverterMutabilityPlanImpl
public AttributeConverterMutabilityPlanImpl(JpaAttributeConverter converter, boolean mutable)
-
-
Method Detail
-
isMutable
public boolean isMutable()
Description copied from interface:MutabilityPlanCan the internal state of instances ofTbe changed?- Specified by:
isMutablein interfaceMutabilityPlan<T>- Overrides:
isMutablein classMutableMutabilityPlan<T>- Returns:
- True if the internal state can be changed; false otherwise.
-
deepCopyNotNull
protected T deepCopyNotNull(T value)
- Specified by:
deepCopyNotNullin classMutableMutabilityPlan<T>
-
disassemble
public Serializable disassemble(T value, SharedSessionContract session)
Description copied from interface:MutabilityPlanReturn a disassembled representation of the value. This is used to push values onto the second level cache. Compliment toMutabilityPlan.assemble(java.io.Serializable, org.hibernate.SharedSessionContract)- Specified by:
disassemblein interfaceMutabilityPlan<T>- Overrides:
disassemblein classMutableMutabilityPlan<T>- See Also:
MutabilityPlan.assemble(java.io.Serializable, org.hibernate.SharedSessionContract)
-
assemble
public T assemble(Serializable cached, SharedSessionContract session)
Description copied from interface:MutabilityPlanAssemble a previously disassembled value. This is used when pulling values from the second level cache. Compliment toMutabilityPlan.disassemble(T, org.hibernate.SharedSessionContract)- Specified by:
assemblein interfaceMutabilityPlan<T>- Overrides:
assemblein classMutableMutabilityPlan<T>- See Also:
MutabilityPlan.disassemble(T, org.hibernate.SharedSessionContract)
-
-