Package org.hibernate.metamodel.mapping
Class DefaultDiscriminatorConverter<O,R>
- java.lang.Object
-
- org.hibernate.metamodel.mapping.DiscriminatorConverter<O,R>
-
- org.hibernate.metamodel.mapping.DefaultDiscriminatorConverter<O,R>
-
- All Implemented Interfaces:
BasicValueConverter<O,R>
public class DefaultDiscriminatorConverter<O,R> extends DiscriminatorConverter<O,R>
Implements the default discriminator assignment strategy defined by JPA, that is, the discriminator value is the JPA (unqualified) entity name. This strategy is used when no explicit discriminator mapping is specified.
-
-
Constructor Summary
Constructors Constructor Description DefaultDiscriminatorConverter(NavigableRole discriminatorRole, JavaType<O> domainJavaType, JavaType<R> relationalJavaType, MappingMetamodelImplementor mappingMetamodel)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
forEachValueDetail(Consumer<DiscriminatorValueDetails> consumer)
static <O,R>
DefaultDiscriminatorConverter<O,R>fromMappingMetamodel(NavigableRole role, JavaType<O> domainJavaType, BasicType<R> underlyingJdbcMapping, MappingMetamodelImplementor mappingMetamodel)
<X> X
fromValueDetails(Function<DiscriminatorValueDetails,X> handler)
DiscriminatorValueDetails
getDetailsForDiscriminatorValue(Object value)
DiscriminatorValueDetails
getDetailsForEntityName(String entityName)
DiscriminatorValueDetails
getDetailsForRelationalForm(R relationalForm)
-
Methods inherited from class org.hibernate.metamodel.mapping.DiscriminatorConverter
getDomainJavaType, getNavigableRole, getRelationalJavaType, toDomainValue, toRelationalValue, toString
-
-
-
-
Constructor Detail
-
DefaultDiscriminatorConverter
public DefaultDiscriminatorConverter(NavigableRole discriminatorRole, JavaType<O> domainJavaType, JavaType<R> relationalJavaType, MappingMetamodelImplementor mappingMetamodel)
-
-
Method Detail
-
fromMappingMetamodel
public static <O,R> DefaultDiscriminatorConverter<O,R> fromMappingMetamodel(NavigableRole role, JavaType<O> domainJavaType, BasicType<R> underlyingJdbcMapping, MappingMetamodelImplementor mappingMetamodel)
-
getDetailsForRelationalForm
public DiscriminatorValueDetails getDetailsForRelationalForm(R relationalForm)
- Overrides:
getDetailsForRelationalForm
in classDiscriminatorConverter<O,R>
-
getDetailsForEntityName
public DiscriminatorValueDetails getDetailsForEntityName(String entityName)
- Specified by:
getDetailsForEntityName
in classDiscriminatorConverter<O,R>
-
getDetailsForDiscriminatorValue
public DiscriminatorValueDetails getDetailsForDiscriminatorValue(Object value)
- Specified by:
getDetailsForDiscriminatorValue
in classDiscriminatorConverter<O,R>
-
forEachValueDetail
public void forEachValueDetail(Consumer<DiscriminatorValueDetails> consumer)
- Specified by:
forEachValueDetail
in classDiscriminatorConverter<O,R>
-
fromValueDetails
public <X> X fromValueDetails(Function<DiscriminatorValueDetails,X> handler)
- Specified by:
fromValueDetails
in classDiscriminatorConverter<O,R>
-
-