Class CaseStatementDiscriminatorMappingImpl
- java.lang.Object
-
- org.hibernate.metamodel.mapping.internal.AbstractDiscriminatorMapping
-
- org.hibernate.metamodel.mapping.internal.CaseStatementDiscriminatorMappingImpl
-
- All Implemented Interfaces:
BasicValuedMapping
,BasicValuedModelPart
,Bindable
,DiscriminatorMapping
,EntityDiscriminatorMapping
,JdbcMappingContainer
,MappingModelExpressible
,ModelPart
,SelectableMapping
,SelectableMappings
,SqlExpressible
,SqlTypedMapping
,ValuedModelPart
,ValueMapping
,VirtualModelPart
,Fetchable
,FetchOptions
,FetchStyleAccess
,FetchTimingAccess
,JavaTypedExpressible
public class CaseStatementDiscriminatorMappingImpl extends AbstractDiscriminatorMapping
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
CaseStatementDiscriminatorMappingImpl.CaseStatementDiscriminatorExpression
-
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
-
-
Field Summary
-
Fields inherited from interface org.hibernate.metamodel.mapping.EntityDiscriminatorMapping
DISCRIMINATOR_ROLE_NAME, LEGACY_DISCRIMINATOR_NAME
-
-
Constructor Summary
Constructors Constructor Description CaseStatementDiscriminatorMappingImpl(JoinedSubclassEntityPersister entityDescriptor, String[] tableNames, int[] notNullColumnTableNumbers, String[] notNullColumnNames, String[] discriminatorValues, boolean[] discriminatorAbstract, DiscriminatorType<?> incomingDiscriminatorType, MappingModelCreationProcess creationProcess)
-
Method Summary
All Methods Instance Methods Concrete 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
getColumnDefinition()
String
getContainingTableExpression()
The table which contains the columns mapped by this valueString
getCustomReadExpression()
The selection's read expression accounting for formula treatment as well asColumnTransformer.read()
String
getCustomWriteExpression()
The selection's write expression accountingColumnTransformer.write()
Long
getLength()
Integer
getPrecision()
Integer
getScale()
String
getSelectionExpression()
The selection's expression.Integer
getTemporalPrecision()
boolean
hasPartitionedSelectionMapping()
boolean
hasPhysicalColumn()
Is the discriminator defined by a physical column?boolean
isFormula()
Is the mapping a formula instead of a physical column?boolean
isInsertable()
boolean
isNullable()
Is the mapping considered nullable?boolean
isPartitioned()
boolean
isUpdateable()
Expression
resolveSqlExpression(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, getEntityDescriptor, getJavaType, getJdbcMapping, getMappedType, getNavigableRole, getUnderlyingJdbcMapping, getValueConverter, resolveDiscriminatorValue
-
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
addToCacheKey
-
Methods inherited from interface org.hibernate.metamodel.mapping.BasicValuedModelPart
asBasicValuedModelPart, forEachSelectable, getJdbcMapping, getJdbcTypeCount, getPartMappingType, getSelectable, getSingleJdbcMapping
-
Methods inherited from interface org.hibernate.metamodel.mapping.Bindable
forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue, forEachJdbcValue, forEachJdbcValue, forEachJdbcValue
-
Methods inherited from interface org.hibernate.metamodel.mapping.DiscriminatorMapping
getDomainJavaType, getRelationalJavaType
-
Methods inherited from interface org.hibernate.metamodel.mapping.EntityDiscriminatorMapping
getFetchableKey, getFetchableName, getMappedFetchOptions, getPartName, getStyle, getTiming
-
Methods inherited from interface org.hibernate.sql.results.graph.Fetchable
asAttributeMapping, incrementFetchDepth, isSelectable, resolveCircularFetch
-
Methods inherited from interface org.hibernate.type.descriptor.java.JavaTypedExpressible
addToCacheKey
-
Methods inherited from interface org.hibernate.metamodel.mapping.ModelPart
areEqual, asEntityMappingType, breakDownJdbcValues, decompose, decompose, isEntityIdentifierMapping
-
Methods inherited from interface org.hibernate.metamodel.mapping.SelectableMapping
getSelectableName, getSelectablePath, getWriteExpression
-
Methods inherited from interface org.hibernate.metamodel.mapping.SqlTypedMapping
isLob, toSize
-
Methods inherited from interface org.hibernate.metamodel.mapping.ValuedModelPart
forEachInsertable, forEachNonFormula, forEachUpdatable
-
Methods inherited from interface org.hibernate.metamodel.mapping.ValueMapping
getExpressibleJavaType, treatAs
-
Methods inherited from interface org.hibernate.metamodel.mapping.VirtualModelPart
isVirtual
-
-
-
-
Constructor Detail
-
CaseStatementDiscriminatorMappingImpl
public CaseStatementDiscriminatorMappingImpl(JoinedSubclassEntityPersister entityDescriptor, String[] tableNames, int[] notNullColumnTableNumbers, String[] notNullColumnNames, String[] discriminatorValues, boolean[] discriminatorAbstract, DiscriminatorType<?> incomingDiscriminatorType, MappingModelCreationProcess creationProcess)
-
-
Method Detail
-
hasPhysicalColumn
public boolean hasPhysicalColumn()
Description copied from interface:EntityDiscriminatorMapping
Is the discriminator defined by a physical column?
-
generateFetch
public 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 interfaceEntityDiscriminatorMapping
- Specified by:
generateFetch
in interfaceFetchable
- Overrides:
generateFetch
in 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:EntityDiscriminatorMapping
Create 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()
Description copied from interface:SelectableMapping
The selection's read expression accounting for formula treatment as well asColumnTransformer.read()
-
getCustomWriteExpression
public String getCustomWriteExpression()
Description copied from interface:SelectableMapping
The selection's write expression accountingColumnTransformer.write()
-
getColumnDefinition
public String getColumnDefinition()
-
getLength
public Long getLength()
-
getPrecision
public Integer getPrecision()
-
getTemporalPrecision
public Integer getTemporalPrecision()
-
getScale
public Integer getScale()
-
isNullable
public boolean isNullable()
Description copied from interface:SelectableMapping
Is the mapping considered nullable?
-
isInsertable
public boolean isInsertable()
-
isUpdateable
public boolean isUpdateable()
-
isPartitioned
public boolean isPartitioned()
-
hasPartitionedSelectionMapping
public boolean hasPartitionedSelectionMapping()
-
getContainingTableExpression
public String getContainingTableExpression()
Description copied from interface:ValuedModelPart
The table which contains the columns mapped by this value
-
getSelectionExpression
public String getSelectionExpression()
Description copied from interface:SelectableMapping
The selection's expression. This is the column name or formula
-
isFormula
public boolean isFormula()
Description copied from interface:SelectableMapping
Is the mapping a formula instead of a physical column?
-
-