Class JpaAttributeConverterImpl<O,R>
- java.lang.Object
-
- org.hibernate.metamodel.model.convert.internal.JpaAttributeConverterImpl<O,R>
-
- All Implemented Interfaces:
BasicValueConverter<O,R>,JpaAttributeConverter<O,R>
public class JpaAttributeConverterImpl<O,R> extends Object implements JpaAttributeConverter<O,R>
Standard implementation of JpaAttributeConverter
-
-
Constructor Summary
Constructors Constructor Description JpaAttributeConverterImpl(ManagedBean<? extends jakarta.persistence.AttributeConverter<O,R>> attributeConverterBean, JavaType<? extends jakarta.persistence.AttributeConverter<O,R>> converterJtd, Class<O> domainJavaType, Class<R> jdbcJavaType, JpaAttributeConverterCreationContext context)JpaAttributeConverterImpl(ManagedBean<? extends jakarta.persistence.AttributeConverter<O,R>> attributeConverterBean, JavaType<? extends jakarta.persistence.AttributeConverter<O,R>> converterJtd, JavaType<O> domainJtd, JavaType<R> jdbcJtd)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)StringgetCheckCondition(String columnName, JdbcType sqlType, Dialect dialect)The check constraint that should be added to the column definition in generated DDL.ManagedBean<? extends jakarta.persistence.AttributeConverter<O,R>>getConverterBean()JavaType<? extends jakarta.persistence.AttributeConverter<O,R>>getConverterJavaType()JavaType<O>getDomainJavaType()Descriptor for the Java type for the domain portion of this converterJavaType<R>getRelationalJavaType()Descriptor for the Java type for the relational portion of this converterStringgetSpecializedTypeDeclaration(JdbcType jdbcType, Dialect dialect)inthashCode()OtoDomainValue(R relationalForm)Convert the relational form just retrieved from JDBC ResultSet into the domain form.RtoRelationalValue(O domainForm)Convert the domain form into the relational form in preparation for storage into JDBC
-
-
-
Constructor Detail
-
JpaAttributeConverterImpl
public JpaAttributeConverterImpl(ManagedBean<? extends jakarta.persistence.AttributeConverter<O,R>> attributeConverterBean, JavaType<? extends jakarta.persistence.AttributeConverter<O,R>> converterJtd, JavaType<O> domainJtd, JavaType<R> jdbcJtd)
-
JpaAttributeConverterImpl
public JpaAttributeConverterImpl(ManagedBean<? extends jakarta.persistence.AttributeConverter<O,R>> attributeConverterBean, JavaType<? extends jakarta.persistence.AttributeConverter<O,R>> converterJtd, Class<O> domainJavaType, Class<R> jdbcJavaType, JpaAttributeConverterCreationContext context)
-
-
Method Detail
-
getConverterBean
public ManagedBean<? extends jakarta.persistence.AttributeConverter<O,R>> getConverterBean()
- Specified by:
getConverterBeanin interfaceJpaAttributeConverter<O,R>
-
toDomainValue
public O toDomainValue(R relationalForm)
Description copied from interface:BasicValueConverterConvert the relational form just retrieved from JDBC ResultSet into the domain form.- Specified by:
toDomainValuein interfaceBasicValueConverter<O,R>
-
toRelationalValue
public R toRelationalValue(O domainForm)
Description copied from interface:BasicValueConverterConvert the domain form into the relational form in preparation for storage into JDBC- Specified by:
toRelationalValuein interfaceBasicValueConverter<O,R>
-
getCheckCondition
public String getCheckCondition(String columnName, JdbcType sqlType, Dialect dialect)
Description copied from interface:BasicValueConverterThe check constraint that should be added to the column definition in generated DDL.- Specified by:
getCheckConditionin interfaceBasicValueConverter<O,R>- Parameters:
columnName- the name of the columnsqlType- theJdbcTypeof the mapped columndialect- the SQLDialect- Returns:
- a check constraint condition or null
-
getSpecializedTypeDeclaration
public String getSpecializedTypeDeclaration(JdbcType jdbcType, Dialect dialect)
- Specified by:
getSpecializedTypeDeclarationin interfaceBasicValueConverter<O,R>
-
getConverterJavaType
public JavaType<? extends jakarta.persistence.AttributeConverter<O,R>> getConverterJavaType()
- Specified by:
getConverterJavaTypein interfaceJpaAttributeConverter<O,R>
-
getDomainJavaType
public JavaType<O> getDomainJavaType()
Description copied from interface:BasicValueConverterDescriptor for the Java type for the domain portion of this converter- Specified by:
getDomainJavaTypein interfaceBasicValueConverter<O,R>
-
getRelationalJavaType
public JavaType<R> getRelationalJavaType()
Description copied from interface:BasicValueConverterDescriptor for the Java type for the relational portion of this converter- Specified by:
getRelationalJavaTypein interfaceBasicValueConverter<O,R>
-
-