Package org.hibernate.metamodel.mapping
Class DiscriminatorConverter<O,R>
- java.lang.Object
-
- org.hibernate.metamodel.mapping.DiscriminatorConverter<O,R>
-
- All Implemented Interfaces:
BasicValueConverter<O,R>
- Direct Known Subclasses:
DefaultDiscriminatorConverter
,MappedDiscriminatorConverter
public abstract class DiscriminatorConverter<O,R> extends Object implements BasicValueConverter<O,R>
-
-
Constructor Summary
Constructors Constructor Description DiscriminatorConverter(NavigableRole discriminatorRole, JavaType<O> domainJavaType, JavaType<R> relationalJavaType)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
forEachValueDetail(Consumer<DiscriminatorValueDetails> consumer)
abstract <X> X
fromValueDetails(Function<DiscriminatorValueDetails,X> handler)
abstract DiscriminatorValueDetails
getDetailsForDiscriminatorValue(Object relationalForm)
abstract DiscriminatorValueDetails
getDetailsForEntityName(String entityName)
DiscriminatorValueDetails
getDetailsForRelationalForm(R relationalForm)
JavaType<O>
getDomainJavaType()
Descriptor for the Java type for the domain portion of this converterNavigableRole
getNavigableRole()
JavaType<R>
getRelationalJavaType()
Descriptor for the Java type for the relational portion of this converterO
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 JDBCString
toString()
-
-
-
Constructor Detail
-
DiscriminatorConverter
public DiscriminatorConverter(NavigableRole discriminatorRole, JavaType<O> domainJavaType, JavaType<R> relationalJavaType)
-
-
Method Detail
-
getNavigableRole
public NavigableRole getNavigableRole()
-
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>
-
getDetailsForRelationalForm
public DiscriminatorValueDetails getDetailsForRelationalForm(R relationalForm)
-
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>
-
getDetailsForDiscriminatorValue
public abstract DiscriminatorValueDetails getDetailsForDiscriminatorValue(Object relationalForm)
-
getDetailsForEntityName
public abstract DiscriminatorValueDetails getDetailsForEntityName(String entityName)
-
forEachValueDetail
public abstract void forEachValueDetail(Consumer<DiscriminatorValueDetails> consumer)
-
fromValueDetails
public abstract <X> X fromValueDetails(Function<DiscriminatorValueDetails,X> handler)
-
-