Class JpaAttributeConverterImpl<O,R>
- java.lang.Object
-
- org.hibernate.type.descriptor.converter.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 ofJpaAttributeConverter
.- See Also:
AttributeConverterMutabilityPlanImpl
-
-
Constructor Summary
Constructors Constructor Description JpaAttributeConverterImpl(ManagedBean<? extends AttributeConverter<O,R>> attributeConverterBean, JavaType<? extends AttributeConverter<O,R>> converterJtd, Class<O> domainJavaType, Class<R> jdbcJavaType, JpaAttributeConverterCreationContext context)
JpaAttributeConverterImpl(ManagedBean<? extends AttributeConverter<O,R>> attributeConverterBean, JavaType<? extends AttributeConverter<O,R>> converterJtd, JavaType<O> domainJtd, JavaType<R> jdbcJtd)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
String
getCheckCondition(String columnName, JdbcType sqlType, Dialect dialect)
The check constraint that should be added to the column definition in generated DDL.ManagedBean<? extends AttributeConverter<O,R>>
getConverterBean()
JavaType<? extends 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 converterString
getSpecializedTypeDeclaration(JdbcType jdbcType, Dialect dialect)
int
hashCode()
O
toDomainValue(R relationalForm)
Convert the relational form just retrieved from JDBC ResultSet into the domain form.R
toRelationalValue(O domainForm)
Convert the domain form into the relational form in preparation for storage into JDBC
-
-
-
Constructor Detail
-
JpaAttributeConverterImpl
public JpaAttributeConverterImpl(ManagedBean<? extends AttributeConverter<O,R>> attributeConverterBean, JavaType<? extends AttributeConverter<O,R>> converterJtd, JavaType<O> domainJtd, JavaType<R> jdbcJtd)
-
JpaAttributeConverterImpl
public JpaAttributeConverterImpl(ManagedBean<? extends AttributeConverter<O,R>> attributeConverterBean, JavaType<? extends AttributeConverter<O,R>> converterJtd, Class<O> domainJavaType, Class<R> jdbcJavaType, JpaAttributeConverterCreationContext context)
-
-
Method Detail
-
getConverterBean
public ManagedBean<? extends AttributeConverter<O,R>> getConverterBean()
- Specified by:
getConverterBean
in interfaceJpaAttributeConverter<O,R>
-
toDomainValue
public O toDomainValue(R relationalForm)
Description copied from interface:BasicValueConverter
Convert the relational form just retrieved from JDBC ResultSet into the domain form.- Specified by:
toDomainValue
in interfaceBasicValueConverter<O,R>
-
toRelationalValue
public R toRelationalValue(O domainForm)
Description copied from interface:BasicValueConverter
Convert the domain form into the relational form in preparation for storage into JDBC- Specified by:
toRelationalValue
in interfaceBasicValueConverter<O,R>
-
getCheckCondition
public String getCheckCondition(String columnName, JdbcType sqlType, Dialect dialect)
Description copied from interface:BasicValueConverter
The check constraint that should be added to the column definition in generated DDL.- Specified by:
getCheckCondition
in interfaceBasicValueConverter<O,R>
- Parameters:
columnName
- the name of the columnsqlType
- theJdbcType
of the mapped columndialect
- the SQLDialect
- Returns:
- a check constraint condition or null
-
getSpecializedTypeDeclaration
public String getSpecializedTypeDeclaration(JdbcType jdbcType, Dialect dialect)
- Specified by:
getSpecializedTypeDeclaration
in interfaceBasicValueConverter<O,R>
-
getConverterJavaType
public JavaType<? extends AttributeConverter<O,R>> getConverterJavaType()
- Specified by:
getConverterJavaType
in interfaceJpaAttributeConverter<O,R>
-
getDomainJavaType
public JavaType<O> getDomainJavaType()
Description copied from interface:BasicValueConverter
Descriptor for the Java type for the domain portion of this converter- Specified by:
getDomainJavaType
in interfaceBasicValueConverter<O,R>
-
getRelationalJavaType
public JavaType<R> getRelationalJavaType()
Description copied from interface:BasicValueConverter
Descriptor for the Java type for the relational portion of this converter- Specified by:
getRelationalJavaType
in interfaceBasicValueConverter<O,R>
-
-