Class CaseStatementDiscriminatorMappingImpl
- java.lang.Object
-
- org.hibernate.metamodel.mapping.internal.AbstractDiscriminatorMapping
-
- org.hibernate.metamodel.mapping.internal.CaseStatementDiscriminatorMappingImpl
-
- All Implemented Interfaces:
BasicValuedMapping,BasicValuedModelPart,Bindable,EntityDiscriminatorMapping,JdbcMappingContainer,MappingModelExpressible,ModelPart,SelectableMapping,SqlExpressible,SqlTypedMapping,ValueMapping,VirtualModelPart,Fetchable,FetchOptions,FetchStyleAccess,FetchTimingAccess,JavaTypedExpressible
public class CaseStatementDiscriminatorMappingImpl extends AbstractDiscriminatorMapping
-
-
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 inherited from interface org.hibernate.metamodel.mapping.EntityDiscriminatorMapping
LEGACY_HQL_ROLE_NAME, ROLE_NAME
-
-
Constructor Summary
Constructors Constructor Description CaseStatementDiscriminatorMappingImpl(JoinedSubclassEntityPersister entityDescriptor, String[] tableNames, int[] notNullColumnTableNumbers, String[] notNullColumnNames, String[] discriminatorValues, Map<String,String> subEntityNameByTableName, DiscriminatorType<?> incomingDiscriminatorType, MappingModelCreationProcess creationProcess)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BasicFetchgenerateFetch(FetchParent fetchParent, NavigablePath fetchablePath, FetchTiming fetchTiming, boolean selected, String resultVariable, DomainResultCreationState creationState)Generates a Fetch of this fetchableStringgetColumnDefinition()StringgetContainingTableExpression()StringgetCustomReadExpression()StringgetCustomWriteExpression()LonggetLength()IntegergetPrecision()IntegergetScale()StringgetSelectionExpression()booleanisFormula()booleanisPhysical()ExpressionresolveSqlExpression(NavigablePath navigablePath, JdbcMapping jdbcMappingToUse, TableGroup tableGroup, SqlAstCreationState creationState)Create the appropriate SQL expression for this discriminator-
Methods inherited from class org.hibernate.metamodel.mapping.internal.AbstractDiscriminatorMapping
applySqlSelections, applySqlSelections, breakDownJdbcValues, createDomainResult, disassemble, findContainingEntityMapping, forEachDisassembledJdbcValue, forEachJdbcType, forEachSelectable, getConcreteEntityNameForDiscriminatorValue, getEntityDescriptor, getJavaType, getJdbcMapping, getMappedType, getNavigableRole, getSessionFactory, getUnderlyingJdbcMappingType
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.metamodel.mapping.BasicValuedMapping
getJdbcMappings, getJdbcTypeCount
-
Methods inherited from interface org.hibernate.metamodel.mapping.BasicValuedModelPart
getPartMappingType
-
Methods inherited from interface org.hibernate.metamodel.mapping.Bindable
forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue, forEachJdbcValue
-
Methods inherited from interface org.hibernate.metamodel.mapping.EntityDiscriminatorMapping
getFetchableName, getMappedFetchOptions, getPartName, getStyle, getTiming
-
Methods inherited from interface org.hibernate.sql.results.graph.Fetchable
asAttributeMapping, incrementFetchDepth, resolveCircularFetch
-
Methods inherited from interface org.hibernate.metamodel.mapping.ModelPart
areEqual, forEachSelectable
-
Methods inherited from interface org.hibernate.metamodel.mapping.ValueMapping
getExpressibleJavaType, treatAs
-
-
-
-
Constructor Detail
-
CaseStatementDiscriminatorMappingImpl
public CaseStatementDiscriminatorMappingImpl(JoinedSubclassEntityPersister entityDescriptor, String[] tableNames, int[] notNullColumnTableNumbers, String[] notNullColumnNames, String[] discriminatorValues, Map<String,String> subEntityNameByTableName, DiscriminatorType<?> incomingDiscriminatorType, MappingModelCreationProcess creationProcess)
-
-
Method Detail
-
isPhysical
public boolean isPhysical()
-
generateFetch
public BasicFetch generateFetch(FetchParent fetchParent, NavigablePath fetchablePath, FetchTiming fetchTiming, boolean selected, String resultVariable, DomainResultCreationState creationState)
Description copied from interface:FetchableGenerates a Fetch of this fetchable- Specified by:
generateFetchin interfaceEntityDiscriminatorMapping- Specified by:
generateFetchin interfaceFetchable- Overrides:
generateFetchin classAbstractDiscriminatorMapping- Parameters:
fetchParent- The parent of the Fetch we are generatingfetchablePath- The overall path within the graphfetchTiming- The requested fetch timing
-
resolveSqlExpression
public Expression resolveSqlExpression(NavigablePath navigablePath, JdbcMapping jdbcMappingToUse, TableGroup tableGroup, SqlAstCreationState creationState)
Description copied from interface:EntityDiscriminatorMappingCreate the appropriate SQL expression for this discriminatorjdbcMappingToUse- The JDBC mapping to use. This allows opting between the "domain result type" (aka Class) and the "underlying type" (Integer, String, etc)
-
getCustomReadExpression
public String getCustomReadExpression()
-
getCustomWriteExpression
public String getCustomWriteExpression()
-
getColumnDefinition
public String getColumnDefinition()
-
getLength
public Long getLength()
-
getPrecision
public Integer getPrecision()
-
getScale
public Integer getScale()
-
getContainingTableExpression
public String getContainingTableExpression()
-
getSelectionExpression
public String getSelectionExpression()
-
isFormula
public boolean isFormula()
-
-