下面列出了怎么用org.hibernate.type.descriptor.java.ImmutableMutabilityPlan的API类实例代码及写法,或者点击链接到github查看源代码。
@SuppressWarnings("unchecked")
public AttributeConverterTypeAdapter(
String name,
String description,
JpaAttributeConverter<? extends T,?> attributeConverter,
SqlTypeDescriptor sqlTypeDescriptorAdapter,
Class modelType,
Class jdbcType,
JavaTypeDescriptor<T> entityAttributeJavaTypeDescriptor) {
super( sqlTypeDescriptorAdapter, entityAttributeJavaTypeDescriptor );
this.name = name;
this.description = description;
this.modelType = modelType;
this.jdbcType = jdbcType;
this.attributeConverter = attributeConverter;
this.mutabilityPlan = entityAttributeJavaTypeDescriptor.getMutabilityPlan().isMutable()
? new AttributeConverterMutabilityPlanImpl<T>( attributeConverter )
: ImmutableMutabilityPlan.INSTANCE;
log.debug( "Created AttributeConverterTypeAdapter -> " + name );
}
@Override
@SuppressWarnings({ "unchecked" })
protected MutabilityPlan<T> getMutabilityPlan() {
return ImmutableMutabilityPlan.INSTANCE;
}
public InstantTypeDescriptor() {
super(Instant.class, ImmutableMutabilityPlan.INSTANCE);
}
public InstantTypeDescriptor() {
super(Instant.class, ImmutableMutabilityPlan.INSTANCE);
}
public LocalDateStringJavaDescriptor() {
super(LocalDate.class, ImmutableMutabilityPlan.INSTANCE);
}
public LocalDateStringJavaDescriptor() {
super(LocalDate.class, ImmutableMutabilityPlan.INSTANCE);
}