Package org.hibernate.metamodel.mapping
Interface DiscriminatorMapping
- All Superinterfaces:
BasicValuedMapping
,BasicValuedModelPart
,Bindable
,Fetchable
,JavaTypedExpressible
,JdbcMappingContainer
,MappingModelExpressible
,ModelPart
,SelectableMapping
,SelectableMappings
,SqlExpressible
,SqlTypedMapping
,ValuedModelPart
,ValueMapping
,VirtualModelPart
- All Known Subinterfaces:
EmbeddableDiscriminatorMapping
,EntityDiscriminatorMapping
- All Known Implementing Classes:
AbstractDiscriminatorMapping
,AnyDiscriminatorPart
,CaseStatementDiscriminatorMappingImpl
,ExplicitColumnDiscriminatorMappingImpl
Mapping of a discriminator, for either entity or
association (ANY) discrimination.
Represents a composition of
- a converter between the domain and relational form
- a JDBC mapping to read and write the relational values
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.Bindable
Bindable.JdbcValuesBiConsumer<X,
Y>, Bindable.JdbcValuesConsumer Nested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.ModelPart
ModelPart.JdbcValueBiConsumer<X,
Y>, ModelPart.JdbcValueConsumer -
Method Summary
Modifier and TypeMethodDescriptionBasicFetch<?>
generateFetch
(FetchParent fetchParent, NavigablePath fetchablePath, FetchTiming fetchTiming, boolean selected, String resultVariable, DomainResultCreationState creationState) Generates a Fetch of this fetchabledefault JavaType<?>
The domain Java form, which is eitherJavaType<Class>
(entity class) orJavaType<String>
(entity name).default JavaType<?>
The relational Java form.Information about the value mappingsdefault DiscriminatorValueDetails
resolveDiscriminatorValue
(Object discriminatorValue) Retrieve the details for a particular discriminator value.resolveSqlExpression
(NavigablePath navigablePath, JdbcMapping jdbcMappingToUse, TableGroup tableGroup, SqlAstCreationState creationState) Create the appropriate SQL expression for this discriminatorMethods inherited from interface org.hibernate.metamodel.mapping.BasicValuedMapping
addToCacheKey, disassemble, getJdbcMapping
Methods inherited from interface org.hibernate.metamodel.mapping.BasicValuedModelPart
asBasicValuedModelPart, forEachSelectable, forEachSelectable, getJdbcMapping, getJdbcTypeCount, getPartMappingType, getSelectable, getSingleJdbcMapping, hasPartitionedSelectionMapping
Methods inherited from interface org.hibernate.metamodel.mapping.Bindable
forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue, forEachJdbcValue, forEachJdbcValue, forEachJdbcValue
Methods inherited from interface org.hibernate.sql.results.graph.Fetchable
asAttributeMapping, getFetchableKey, getFetchableName, getMappedFetchOptions, incrementFetchDepth, isSelectable, resolveCircularFetch
Methods inherited from interface org.hibernate.type.descriptor.java.JavaTypedExpressible
addToCacheKey
Methods inherited from interface org.hibernate.metamodel.mapping.JdbcMappingContainer
forEachJdbcType
Methods inherited from interface org.hibernate.metamodel.mapping.ModelPart
applySqlSelections, applySqlSelections, areEqual, asEntityMappingType, breakDownJdbcValues, breakDownJdbcValues, createDomainResult, decompose, decompose, findContainingEntityMapping, getJavaType, getNavigableRole, getPartName, isEntityIdentifierMapping
Methods inherited from interface org.hibernate.metamodel.mapping.SelectableMapping
getContainingTableExpression, getCustomReadExpression, getCustomWriteExpression, getSelectableName, getSelectablePath, getSelectionExpression, getWriteExpression, isFormula, isInsertable, isNullable, isPartitioned, isUpdateable
Methods inherited from interface org.hibernate.metamodel.mapping.SqlTypedMapping
getColumnDefinition, getJdbcMapping, getLength, getPrecision, getScale, getTemporalPrecision, isLob, toSize
Methods inherited from interface org.hibernate.metamodel.mapping.ValuedModelPart
forEachInsertable, forEachNonFormula, forEachUpdatable, getContainingTableExpression
Methods inherited from interface org.hibernate.metamodel.mapping.ValueMapping
getExpressibleJavaType, getMappedType, treatAs
Methods inherited from interface org.hibernate.metamodel.mapping.VirtualModelPart
isVirtual
-
Method Details
-
getValueConverter
DiscriminatorConverter<?,?> getValueConverter()Information about the value mappings -
resolveDiscriminatorValue
Retrieve the details for a particular discriminator value.- Throws:
HibernateException
- if there is value matching the provided one
-
getUnderlyingJdbcMapping
JdbcMapping getUnderlyingJdbcMapping() -
getDomainJavaType
The domain Java form, which is eitherJavaType<Class>
(entity class) orJavaType<String>
(entity name). -
getRelationalJavaType
The relational Java form. This will typically be some form of integer or character value.
-