Class ImmutableMutabilityPlan<T>
java.lang.Object
org.hibernate.type.descriptor.java.ImmutableMutabilityPlan<T>
- All Implemented Interfaces:
Serializable
,MutabilityPlan<T>
Mutability plan for immutable objects
- See Also:
- API Note:
- For use with
Mutability
, users should instead useImmutability
as the type parameterization here does not work with the parameterization defined onMutability.value()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ImmutableMutabilityPlan
Deprecated, for removal: This API element is subject to removal in a future version. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionassemble
(Serializable cached, SharedSessionContract session) Assemble a previously disassembled value.Return a deep copy of the value.disassemble
(T value, SharedSessionContract session) Return a disassembled representation of the value.static <X> ImmutableMutabilityPlan<X>
instance()
boolean
Can the internal state of instances ofT
be changed?
-
Field Details
-
INSTANCE
Deprecated, for removal: This API element is subject to removal in a future version.in favor ofinstance()
Singleton access
-
-
Constructor Details
-
ImmutableMutabilityPlan
public ImmutableMutabilityPlan()
-
-
Method Details
-
instance
-
isMutable
public boolean isMutable()Description copied from interface:MutabilityPlan
Can the internal state of instances ofT
be changed?- Specified by:
isMutable
in interfaceMutabilityPlan<T>
- Returns:
- True if the internal state can be changed; false otherwise.
-
deepCopy
Description copied from interface:MutabilityPlan
Return a deep copy of the value.- Specified by:
deepCopy
in interfaceMutabilityPlan<T>
- Parameters:
value
- The value to deep copy- Returns:
- The deep copy.
-
instance()