Package org.hibernate.metamodel.mapping
Interface EntityDiscriminatorMapping
-
- All Superinterfaces:
BasicValuedMapping
,BasicValuedModelPart
,Bindable
,Fetchable
,FetchOptions
,FetchStyleAccess
,FetchTimingAccess
,JavaTypedExpressible
,JdbcMappingContainer
,MappingModelExpressible
,ModelPart
,SelectableMapping
,SqlExpressible
,SqlTypedMapping
,ValueMapping
,VirtualModelPart
- All Known Implementing Classes:
AbstractDiscriminatorMapping
,CaseStatementDiscriminatorMappingImpl
,ExplicitColumnDiscriminatorMappingImpl
public interface EntityDiscriminatorMapping extends VirtualModelPart, BasicValuedModelPart, FetchOptions
- See Also:
DiscriminatorColumn
,DiscriminatorValue
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.Bindable
Bindable.JdbcValuesConsumer
-
Nested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.ModelPart
ModelPart.JdbcValueConsumer
-
-
Field Summary
Fields Modifier and Type Field Description static String
LEGACY_HQL_ROLE_NAME
static String
ROLE_NAME
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description BasicFetch
generateFetch(FetchParent fetchParent, NavigablePath fetchablePath, FetchTiming fetchTiming, boolean selected, String resultVariable, DomainResultCreationState creationState)
Generates a Fetch of this fetchableString
getConcreteEntityNameForDiscriminatorValue(Object value)
default String
getFetchableName()
The name of the fetchabledefault FetchOptions
getMappedFetchOptions()
The configured fetch timing and styledefault String
getPartName()
default FetchStyle
getStyle()
default FetchTiming
getTiming()
boolean
isPhysical()
static boolean
matchesRoleName(String name)
Expression
resolveSqlExpression(NavigablePath navigablePath, JdbcMapping jdbcMappingToUse, TableGroup tableGroup, SqlAstCreationState creationState)
Create the appropriate SQL expression for this discriminator-
Methods inherited from interface org.hibernate.metamodel.mapping.BasicValuedMapping
getJdbcMapping, getJdbcMappings, getJdbcTypeCount
-
Methods inherited from interface org.hibernate.metamodel.mapping.BasicValuedModelPart
getPartMappingType
-
Methods inherited from interface org.hibernate.metamodel.mapping.Bindable
disassemble, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue, forEachJdbcValue
-
Methods inherited from interface org.hibernate.sql.results.graph.Fetchable
asAttributeMapping, incrementFetchDepth, resolveCircularFetch
-
Methods inherited from interface org.hibernate.metamodel.mapping.JdbcMappingContainer
forEachJdbcType
-
Methods inherited from interface org.hibernate.metamodel.mapping.ModelPart
applySqlSelections, applySqlSelections, areEqual, breakDownJdbcValues, createDomainResult, findContainingEntityMapping, forEachSelectable, forEachSelectable, getJavaType, getNavigableRole
-
Methods inherited from interface org.hibernate.metamodel.mapping.SelectableMapping
getContainingTableExpression, getCustomReadExpression, getCustomWriteExpression, getSelectionExpression, isFormula
-
Methods inherited from interface org.hibernate.metamodel.mapping.SqlTypedMapping
getColumnDefinition, getJdbcMapping, getLength, getPrecision, getScale
-
Methods inherited from interface org.hibernate.metamodel.mapping.ValueMapping
getExpressibleJavaType, getMappedType, treatAs
-
-
-
-
Field Detail
-
ROLE_NAME
static final String ROLE_NAME
- See Also:
- Constant Field Values
-
LEGACY_HQL_ROLE_NAME
static final String LEGACY_HQL_ROLE_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
matchesRoleName
static boolean matchesRoleName(String name)
-
getPartName
default String getPartName()
- Specified by:
getPartName
in interfaceModelPart
-
getFetchableName
default String getFetchableName()
Description copied from interface:Fetchable
The name of the fetchable- Specified by:
getFetchableName
in interfaceFetchable
-
getConcreteEntityNameForDiscriminatorValue
String getConcreteEntityNameForDiscriminatorValue(Object value)
-
isPhysical
boolean isPhysical()
-
resolveSqlExpression
Expression resolveSqlExpression(NavigablePath navigablePath, JdbcMapping jdbcMappingToUse, TableGroup tableGroup, SqlAstCreationState creationState)
Create the appropriate SQL expression for this discriminator- Parameters:
jdbcMappingToUse
- The JDBC mapping to use. This allows opting between the "domain result type" (aka Class) and the "underlying type" (Integer, String, etc)
-
generateFetch
BasicFetch generateFetch(FetchParent fetchParent, NavigablePath fetchablePath, FetchTiming fetchTiming, boolean selected, String resultVariable, DomainResultCreationState creationState)
Description copied from interface:Fetchable
Generates a Fetch of this fetchable- Specified by:
generateFetch
in interfaceFetchable
- Parameters:
fetchParent
- The parent of the Fetch we are generatingfetchablePath
- The overall path within the graphfetchTiming
- The requested fetch timing
-
getMappedFetchOptions
default FetchOptions getMappedFetchOptions()
Description copied from interface:Fetchable
The configured fetch timing and style- Specified by:
getMappedFetchOptions
in interfaceFetchable
-
getStyle
default FetchStyle getStyle()
- Specified by:
getStyle
in interfaceFetchStyleAccess
-
getTiming
default FetchTiming getTiming()
- Specified by:
getTiming
in interfaceFetchTimingAccess
-
-