Top Description Methods
org.hibernate.metamodel.mapping

public Interface DiscriminatorMapping

extends VirtualModelPart, BasicValuedModelPart, Fetchable
Known Direct Subinterfaces
org.hibernate.metamodel.mapping.EntityDiscriminatorMapping
Known Direct Implementers
org.hibernate.metamodel.mapping.internal.AnyDiscriminatorPart
Imports
org.hibernate.spi.NavigablePath, org.hibernate.sql.ast.spi.SqlAstCreationState, org.hibernate.sql.ast.tree.expression.Expression, org.hibernate.sql.ast.tree.from.TableGroup, org.hibernate.sql.results.graph.Fetchable, org.hibernate.type.descriptor.java.JavaType

Mapping of a discriminator, for either entity or association (ANY) discrimination.

Represents a composition of

Author
Steve Ebersole

Method Summary

Modifier and TypeMethod and Description
public default JavaType<?>
getDomainJavaType()

The domain Java form, which is either JavaType<Class> (entity class) or JavaType<String> (entity name).

public default JavaType<?>
getRelationalJavaType()

The relational Java form.

public JdbcMapping
public DiscriminatorConverter<?, ?>
getValueConverter()

Information about the value mappings

public Expression
resolveSqlExpression(NavigablePath navigablePath, JdbcMapping
The JDBC mapping to use. This allows opting between the "domain result type" (aka Class) and the "underlying type" (Integer, String, etc)
jdbcMappingToUse
,
TableGroup tableGroup, SqlAstCreationState creationState)

Create the appropriate SQL expression for this discriminator

Inherited from org.hibernate.metamodel.mapping.BasicValuedModelPart:
forEachSelectableforEachSelectablegetJdbcMappinggetJdbcTypeCountgetPartMappingTypegetSelectablegetSingleJdbcMappinghasPartitionedSelectionMapping
Inherited from org.hibernate.metamodel.mapping.VirtualModelPart:
isVirtual
Inherited from org.hibernate.sql.results.graph.Fetchable:
asAttributeMappinggenerateFetchgetFetchableKeygetFetchableNamegetMappedFetchOptionsincrementFetchDepthisSelectableresolveCircularFetch

Method Detail

getDomainJavaTypeback to summary
public default JavaType<?> getDomainJavaType()

The domain Java form, which is either JavaType<Class> (entity class) or JavaType<String> (entity name).

getRelationalJavaTypeback to summary
public default JavaType<?> getRelationalJavaType()

The relational Java form. This will typically be some form of integer or character value.

getUnderlyingJdbcMappingback to summary
public JdbcMapping getUnderlyingJdbcMapping()
getValueConverterback to summary
public DiscriminatorConverter<?, ?> getValueConverter()

Information about the value mappings

resolveSqlExpressionback to summary
public Expression resolveSqlExpression(NavigablePath navigablePath, JdbcMapping jdbcMappingToUse, TableGroup tableGroup, SqlAstCreationState creationState)

Create the appropriate SQL expression for this discriminator

Parameters
jdbcMappingToUse:JdbcMapping

The JDBC mapping to use. This allows opting between the "domain result type" (aka Class) and the "underlying type" (Integer, String, etc)