Class ExplicitColumnDiscriminatorMappingImpl
- java.lang.Object
-
- org.hibernate.metamodel.mapping.internal.AbstractDiscriminatorMapping
-
- org.hibernate.metamodel.mapping.internal.ExplicitColumnDiscriminatorMappingImpl
-
- 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 ExplicitColumnDiscriminatorMappingImpl extends AbstractDiscriminatorMapping
-
-
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
LEGACY_HQL_ROLE_NAME, ROLE_NAME
-
-
Constructor Summary
Constructors Constructor Description ExplicitColumnDiscriminatorMappingImpl(EntityMappingType entityDescriptor, String tableExpression, String columnExpression, boolean isFormula, boolean isPhysical, String columnDefinition, Long length, Integer precision, Integer scale, DiscriminatorType<?> discriminatorType, MappingModelCreationProcess creationProcess)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetColumnDefinition()StringgetContainingTableExpression()The table which contains the columns mapped by this valueStringgetCustomReadExpression()The selection's read expression accounting for formula treatment as well asColumnTransformer.read()StringgetCustomWriteExpression()The selection's write expression accountingColumnTransformer.write()LonggetLength()DiscriminatorTypegetMappedType()Descriptor for the type of this mappingIntegergetPrecision()IntegergetScale()StringgetSelectionExpression()The selection's expression.DiscriminatorConverter<?,?>getValueConverter()Information about the value mappingsbooleanhasPartitionedSelectionMapping()booleanhasPhysicalColumn()Is the discriminator defined by a physical column?booleanisFormula()Is the mapping a formula instead of a physical column?booleanisInsertable()booleanisNullable()Is the mapping considered nullable?booleanisPartitioned()booleanisUpdateable()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, generateFetch, getEntityDescriptor, getJavaType, getJdbcMapping, getNavigableRole, getUnderlyingJdbcMapping, 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, getJdbcMappings, 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
-
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(EntityMappingType entityDescriptor, String tableExpression, String columnExpression, boolean isFormula, boolean isPhysical, String columnDefinition, Long length, Integer precision, Integer scale, DiscriminatorType<?> discriminatorType, MappingModelCreationProcess creationProcess)
-
-
Method Detail
-
getMappedType
public DiscriminatorType getMappedType()
Description copied from interface:ValueMappingDescriptor for the type of this mapping- Specified by:
getMappedTypein interfaceValueMapping- Overrides:
getMappedTypein classAbstractDiscriminatorMapping
-
getValueConverter
public DiscriminatorConverter<?,?> getValueConverter()
Description copied from interface:DiscriminatorMappingInformation about the value mappings- Specified by:
getValueConverterin interfaceDiscriminatorMapping- Overrides:
getValueConverterin classAbstractDiscriminatorMapping
-
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)
-
getContainingTableExpression
public String getContainingTableExpression()
Description copied from interface:ValuedModelPartThe table which contains the columns mapped by this value
-
getSelectionExpression
public String getSelectionExpression()
Description copied from interface:SelectableMappingThe selection's expression. This is the column name or formula
-
getCustomReadExpression
public String getCustomReadExpression()
Description copied from interface:SelectableMappingThe selection's read expression accounting for formula treatment as well asColumnTransformer.read()
-
getCustomWriteExpression
public String getCustomWriteExpression()
Description copied from interface:SelectableMappingThe selection's write expression accountingColumnTransformer.write()
-
getColumnDefinition
public String getColumnDefinition()
-
getLength
public Long getLength()
-
getPrecision
public Integer getPrecision()
-
getScale
public Integer getScale()
-
isFormula
public boolean isFormula()
Description copied from interface:SelectableMappingIs the mapping a formula instead of a physical column?
-
isNullable
public boolean isNullable()
Description copied from interface:SelectableMappingIs the mapping considered nullable?
-
isInsertable
public boolean isInsertable()
-
isUpdateable
public boolean isUpdateable()
-
isPartitioned
public boolean isPartitioned()
-
hasPartitionedSelectionMapping
public boolean hasPartitionedSelectionMapping()
-
hasPhysicalColumn
public boolean hasPhysicalColumn()
Description copied from interface:EntityDiscriminatorMappingIs the discriminator defined by a physical column?
-
-