Class AttributeConverterBean<O,R>
java.lang.Object
org.hibernate.type.descriptor.converter.internal.AttributeConverterBean<O,R>
- All Implemented Interfaces:
BasicValueConverter<O,,R> JpaAttributeConverter<O,R>
Standard implementation of
JpaAttributeConverter backed by
a ManagedBean.
JPA requires support for injection into AttributeConverter
instances via CDI.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAttributeConverterBean(ManagedBean<? extends AttributeConverter<O, R>> attributeConverterBean, JavaType<? extends AttributeConverter<O, R>> converterJavaType, Class<O> domainJavaType, Class<R> jdbcJavaType, JpaAttributeConverterCreationContext context) AttributeConverterBean(ManagedBean<? extends AttributeConverter<O, R>> attributeConverterBean, JavaType<? extends AttributeConverter<O, R>> converterJavaType, JavaType<O> domainJavaType, JavaType<R> jdbcJavaType) -
Method Summary
Modifier and TypeMethodDescriptionbooleanManagedBean<? extends AttributeConverter<O, R>> AManagedBeanrepresenting the JPAAttributeConverter, in the case that the converter is a managed bean, e.g., a CDI bean.JavaType<? extends AttributeConverter<O, R>> AJavaTyperepresenting the JPAAttributeConverter.Descriptor for the Java type for the domain portion of this converterDescriptor for the Java type for the relational portion of this converterinthashCode()toDomainValue(R relationalForm) Convert the relational form just retrieved from JDBC ResultSet into the domain form.toRelationalValue(O domainForm) Convert the domain form into the relational form in preparation for storage into JDBC
-
Constructor Details
-
AttributeConverterBean
public AttributeConverterBean(ManagedBean<? extends AttributeConverter<O, R>> attributeConverterBean, JavaType<? extends AttributeConverter<O, R>> converterJavaType, JavaType<O> domainJavaType, JavaType<R> jdbcJavaType) -
AttributeConverterBean
public AttributeConverterBean(ManagedBean<? extends AttributeConverter<O, R>> attributeConverterBean, JavaType<? extends AttributeConverter<O, R>> converterJavaType, Class<O> domainJavaType, Class<R> jdbcJavaType, JpaAttributeConverterCreationContext context)
-
-
Method Details
-
getConverterBean
Description copied from interface:JpaAttributeConverterAManagedBeanrepresenting the JPAAttributeConverter, in the case that the converter is a managed bean, e.g., a CDI bean.- Specified by:
getConverterBeanin interfaceJpaAttributeConverter<O,R>
-
toDomainValue
Description copied from interface:BasicValueConverterConvert the relational form just retrieved from JDBC ResultSet into the domain form.- Specified by:
toDomainValuein interfaceBasicValueConverter<O,R>
-
toRelationalValue
Description copied from interface:BasicValueConverterConvert the domain form into the relational form in preparation for storage into JDBC- Specified by:
toRelationalValuein interfaceBasicValueConverter<O,R>
-
getConverterJavaType
Description copied from interface:JpaAttributeConverterAJavaTyperepresenting the JPAAttributeConverter.- Specified by:
getConverterJavaTypein interfaceJpaAttributeConverter<O,R>
-
getDomainJavaType
Description copied from interface:BasicValueConverterDescriptor for the Java type for the domain portion of this converter- Specified by:
getDomainJavaTypein interfaceBasicValueConverter<O,R>
-
getRelationalJavaType
Description copied from interface:BasicValueConverterDescriptor for the Java type for the relational portion of this converter- Specified by:
getRelationalJavaTypein interfaceBasicValueConverter<O,R>
-
equals
-
hashCode
public int hashCode()
-