Class ExplicitColumnDiscriminatorMappingImpl
- java.lang.Object
-
- org.hibernate.metamodel.mapping.internal.AbstractDiscriminatorMapping
-
- org.hibernate.metamodel.mapping.internal.ExplicitColumnDiscriminatorMappingImpl
-
- All Implemented Interfaces:
BasicValuedMapping
,BasicValuedModelPart
,Bindable
,DiscriminatorMapping
,EmbeddableDiscriminatorMapping
,EntityDiscriminatorMapping
,JdbcMappingContainer
,MappingModelExpressible
,ModelPart
,SelectableMapping
,SelectableMappings
,SqlExpressible
,SqlTypedMapping
,ValuedModelPart
,ValueMapping
,VirtualModelPart
,Fetchable
,FetchOptions
,FetchStyleAccess
,FetchTimingAccess
,JavaTypedExpressible
public class ExplicitColumnDiscriminatorMappingImpl extends AbstractDiscriminatorMapping implements EmbeddableDiscriminatorMapping
-
-
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
-
-
Field Summary
-
Fields inherited from interface org.hibernate.metamodel.mapping.EntityDiscriminatorMapping
DISCRIMINATOR_ROLE_NAME, LEGACY_DISCRIMINATOR_NAME
-
-
Constructor Summary
Constructors Constructor Description ExplicitColumnDiscriminatorMappingImpl(ManagedMappingType mappingType, String name, String tableExpression, String columnExpression, boolean isFormula, boolean isPhysical, boolean isUpdateable, String columnDefinition, String customReadExpression, Long length, Integer precision, Integer scale, DiscriminatorType<?> discriminatorType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
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()
DiscriminatorType
getMappedType()
Descriptor for the type of this mappingInteger
getPrecision()
Integer
getScale()
String
getSelectableName()
String
getSelectionExpression()
The selection's expression.Integer
getTemporalPrecision()
DiscriminatorConverter<?,?>
getValueConverter()
Information about the value mappingsboolean
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, generateFetch, getEntityDescriptor, getJavaType, getJdbcMapping, getNavigableRole, getUnderlyingJdbcMapping
-
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, disassemble, getJdbcMapping
-
Methods inherited from interface org.hibernate.metamodel.mapping.BasicValuedModelPart
asBasicValuedModelPart, forEachSelectable, forEachSelectable, getJdbcMapping, getJdbcTypeCount, getPartMappingType, getSelectable, getSingleJdbcMapping
-
Methods inherited from interface org.hibernate.metamodel.mapping.Bindable
forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue, forEachJdbcValue, forEachJdbcValue, forEachJdbcValue
-
Methods inherited from interface org.hibernate.metamodel.mapping.DiscriminatorMapping
generateFetch, getDomainJavaType, getRelationalJavaType, getUnderlyingJdbcMapping, resolveDiscriminatorValue
-
Methods inherited from interface org.hibernate.metamodel.mapping.EmbeddableDiscriminatorMapping
getDiscriminatorValue
-
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.JdbcMappingContainer
forEachJdbcType
-
Methods inherited from interface org.hibernate.metamodel.mapping.ModelPart
applySqlSelections, applySqlSelections, areEqual, asEntityMappingType, breakDownJdbcValues, breakDownJdbcValues, createDomainResult, decompose, decompose, findContainingEntityMapping, getJavaType, getNavigableRole, isEntityIdentifierMapping
-
Methods inherited from interface org.hibernate.metamodel.mapping.SelectableMapping
getSelectablePath, getWriteExpression
-
Methods inherited from interface org.hibernate.metamodel.mapping.SqlTypedMapping
getJdbcMapping, 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
-
ExplicitColumnDiscriminatorMappingImpl
public ExplicitColumnDiscriminatorMappingImpl(ManagedMappingType mappingType, String name, String tableExpression, String columnExpression, boolean isFormula, boolean isPhysical, boolean isUpdateable, String columnDefinition, String customReadExpression, Long length, Integer precision, Integer scale, DiscriminatorType<?> discriminatorType)
-
-
Method Detail
-
getMappedType
public DiscriminatorType getMappedType()
Description copied from interface:ValueMapping
Descriptor for the type of this mapping- Specified by:
getMappedType
in interfaceValueMapping
- Overrides:
getMappedType
in classAbstractDiscriminatorMapping
-
getValueConverter
public DiscriminatorConverter<?,?> getValueConverter()
Description copied from interface:DiscriminatorMapping
Information about the value mappings- Specified by:
getValueConverter
in interfaceDiscriminatorMapping
- Overrides:
getValueConverter
in classAbstractDiscriminatorMapping
-
resolveSqlExpression
public Expression resolveSqlExpression(NavigablePath navigablePath, JdbcMapping jdbcMappingToUse, TableGroup tableGroup, SqlAstCreationState creationState)
Description copied from interface:DiscriminatorMapping
Create the appropriate SQL expression for this discriminator- Specified by:
resolveSqlExpression
in interfaceDiscriminatorMapping
jdbcMappingToUse
- The JDBC mapping to use. This allows opting between the "domain result type" (aka Class) and the "underlying type" (Integer, String, etc)
-
getContainingTableExpression
public String getContainingTableExpression()
Description copied from interface:ValuedModelPart
The table which contains the columns mapped by this value- Specified by:
getContainingTableExpression
in interfaceSelectableMapping
- Specified by:
getContainingTableExpression
in interfaceValuedModelPart
-
getSelectableName
public String getSelectableName()
- Specified by:
getSelectableName
in interfaceSelectableMapping
-
getSelectionExpression
public String getSelectionExpression()
Description copied from interface:SelectableMapping
The selection's expression. This is the column name or formula- Specified by:
getSelectionExpression
in interfaceSelectableMapping
-
getCustomReadExpression
public String getCustomReadExpression()
Description copied from interface:SelectableMapping
The selection's read expression accounting for formula treatment as well asColumnTransformer.read()
- Specified by:
getCustomReadExpression
in interfaceSelectableMapping
-
getCustomWriteExpression
public String getCustomWriteExpression()
Description copied from interface:SelectableMapping
The selection's write expression accountingColumnTransformer.write()
- Specified by:
getCustomWriteExpression
in interfaceSelectableMapping
-
getColumnDefinition
public String getColumnDefinition()
- Specified by:
getColumnDefinition
in interfaceSqlTypedMapping
-
getLength
public Long getLength()
- Specified by:
getLength
in interfaceSqlTypedMapping
-
getPrecision
public Integer getPrecision()
- Specified by:
getPrecision
in interfaceSqlTypedMapping
-
getScale
public Integer getScale()
- Specified by:
getScale
in interfaceSqlTypedMapping
-
getTemporalPrecision
public Integer getTemporalPrecision()
- Specified by:
getTemporalPrecision
in interfaceSqlTypedMapping
-
isFormula
public boolean isFormula()
Description copied from interface:SelectableMapping
Is the mapping a formula instead of a physical column?- Specified by:
isFormula
in interfaceSelectableMapping
-
isNullable
public boolean isNullable()
Description copied from interface:SelectableMapping
Is the mapping considered nullable?- Specified by:
isNullable
in interfaceSelectableMapping
-
isInsertable
public boolean isInsertable()
- Specified by:
isInsertable
in interfaceSelectableMapping
-
isUpdateable
public boolean isUpdateable()
- Specified by:
isUpdateable
in interfaceSelectableMapping
-
isPartitioned
public boolean isPartitioned()
- Specified by:
isPartitioned
in interfaceSelectableMapping
-
hasPartitionedSelectionMapping
public boolean hasPartitionedSelectionMapping()
- Specified by:
hasPartitionedSelectionMapping
in interfaceBasicValuedModelPart
- Specified by:
hasPartitionedSelectionMapping
in interfaceModelPart
-
hasPhysicalColumn
public boolean hasPhysicalColumn()
Description copied from interface:EntityDiscriminatorMapping
Is the discriminator defined by a physical column?- Specified by:
hasPhysicalColumn
in interfaceEntityDiscriminatorMapping
-
-