Interface MutabilityPlan<T>
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
ArrayMutabilityPlan
,AttributeConverterMutabilityPlanImpl
,BlobJavaType.BlobMutabilityPlan
,CalendarJavaType.CalendarMutabilityPlan
,ClobJavaType.ClobMutabilityPlan
,ComponentArrayMutabilityPlan
,CompositeUserTypeJavaTypeWrapper.MutabilityPlanWrapper
,DateJavaType.DateMutabilityPlan
,DiscriminatedAssociationAttributeMapping.MutabilityPlanImpl
,ImmutableMutabilityPlan
,JdbcDateJavaType.DateMutabilityPlan
,JdbcTimeJavaType.TimeMutabilityPlan
,JdbcTimestampJavaType.TimestampMutabilityPlan
,MutableMutabilityPlan
,NClobJavaType.NClobMutabilityPlan
,SerializableJavaType.SerializableMutabilityPlan
,UserTypeJavaTypeWrapper.MutabilityPlanWrapper
,UserTypeMutabilityPlanAdapter
public interface MutabilityPlan<T> extends Serializable
Describes the mutability aspects of a given Java type.The term "mutability" refers to the fact that, generally speaking, the aspects described by this contract are determined by whether the Java type's internal state is mutable or immutable. For example, for an immutable Java class,
deepCopy(Object)
may simply return its argument.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
assemble(Serializable cached, SharedSessionContract session)
Assemble a previously disassembled value.T
deepCopy(T value)
Return a deep copy of the value.Serializable
disassemble(T value, SharedSessionContract session)
Return a disassembled representation of the value.boolean
isMutable()
Can the internal state of instances ofT
be changed?
-
-
-
Method Detail
-
isMutable
boolean isMutable()
Can the internal state of instances ofT
be changed?- Returns:
- True if the internal state can be changed; false otherwise.
-
deepCopy
T deepCopy(T value)
Return a deep copy of the value.- Parameters:
value
- The value to deep copy- Returns:
- The deep copy.
-
disassemble
Serializable disassemble(T value, SharedSessionContract session)
Return a disassembled representation of the value. Called before storing a value in the second-level cache. Complementary toassemble(java.io.Serializable, org.hibernate.SharedSessionContract)
.
-
assemble
T assemble(Serializable cached, SharedSessionContract session)
Assemble a previously disassembled value. Called after reading a value from the second level cache. Complementary todisassemble(T, org.hibernate.SharedSessionContract)
.
-
-