Top Fields Constructors Methods
org.hibernate.metamodel.mapping.internal

public Class ExplicitColumnDiscriminatorMappingImpl

extends AbstractDiscriminatorMapping
Class Inheritance
Imports
org.hibernate.metamodel.mapping.DiscriminatorConverter, .EntityMappingType, .JdbcMapping, .DiscriminatorType, .MappingType, org.hibernate.spi.NavigablePath, org.hibernate.sql.ast.spi.SqlAstCreationState, .SqlExpressionResolver, org.hibernate.sql.ast.tree.expression.ColumnReference, .Expression, org.hibernate.sql.ast.tree.from.TableGroup, .TableReference, org.hibernate.type.BasicType

Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private final String
private final String
private final String
private final boolean
private final Long
private final Integer
private final Integer
private final String

Constructor Summary

AccessConstructor and Description
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 Summary

Modifier and TypeMethod and Description
public String
public String
public String
getCustomReadExpression()

Implements org.hibernate.metamodel.mapping.SelectableMapping.getCustomReadExpression.

The selection's read expression accounting for formula treatment as well as ColumnTransformer#read()
public String
public Long
public DiscriminatorType<O>
public Integer
public Integer
public String
public DiscriminatorConverter<?, ?>
public boolean
public boolean
hasPhysicalColumn()

Implements org.hibernate.metamodel.mapping.EntityDiscriminatorMapping.hasPhysicalColumn.

Is the discriminator defined by a physical column?
public boolean
isFormula()

Implements org.hibernate.metamodel.mapping.SelectableMapping.isFormula.

Is the mapping a formula instead of a physical column?
public boolean
public boolean
isNullable()

Implements org.hibernate.metamodel.mapping.SelectableMapping.isNullable.

Is the mapping considered nullable?
public boolean
public boolean
public Expression
resolveSqlExpression(NavigablePath navigablePath, JdbcMapping
The JDBC mapping to use. This allows opting between the "domain result type" (aka Class) and the "underlying type" (Integer, String, etc)
jdbcMappingToUse
,
TableGroup tableGroup, SqlAstCreationState creationState)

Implements org.hibernate.metamodel.mapping.EntityDiscriminatorMapping.resolveSqlExpression.

Create the appropriate SQL expression for this discriminator
Inherited from org.hibernate.metamodel.mapping.internal.AbstractDiscriminatorMapping:
applySqlSelectionsapplySqlSelectionsbreakDownJdbcValuescreateDomainResultdisassemblefindContainingEntityMappingforEachDisassembledJdbcValueforEachJdbcTypeforEachSelectablegenerateFetchgetEntityDescriptorgetJavaTypegetJdbcMappinggetNavigableRolegetUnderlyingJdbcMappingresolveDiscriminatorValue

Field Detail

columnDefinitionback to summary
private final String columnDefinition
columnFormulaback to summary
private final String columnFormula
columnNameback to summary
private final String columnName
isPhysicalback to summary
private final boolean isPhysical
lengthback to summary
private final Long length
precisionback to summary
private final Integer precision
scaleback to summary
private final Integer scale
tableExpressionback to summary
private final String tableExpression

Constructor Detail

ExplicitColumnDiscriminatorMappingImplback to summary
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

getColumnDefinitionback to summary
public String getColumnDefinition()

Implements org.hibernate.metamodel.mapping.SqlTypedMapping.getColumnDefinition.

Annotations
@Override
getContainingTableExpressionback to summary
public String getContainingTableExpression()

Implements org.hibernate.metamodel.mapping.ValuedModelPart.getContainingTableExpression, org.hibernate.metamodel.mapping.SelectableMapping.getContainingTableExpression.

Doc from org.hibernate.metamodel.mapping.ValuedModelPart.getContainingTableExpression.

The table which contains the columns mapped by this value

Annotations
@Override
getCustomReadExpressionback to summary
public String getCustomReadExpression()

Implements org.hibernate.metamodel.mapping.SelectableMapping.getCustomReadExpression.

Doc from org.hibernate.metamodel.mapping.SelectableMapping.getCustomReadExpression.

The selection's read expression accounting for formula treatment as well as ColumnTransformer#read()

Annotations
@Override
getCustomWriteExpressionback to summary
public String getCustomWriteExpression()

Implements org.hibernate.metamodel.mapping.SelectableMapping.getCustomWriteExpression.

Doc from org.hibernate.metamodel.mapping.SelectableMapping.getCustomWriteExpression.

The selection's write expression accounting ColumnTransformer#write()

Annotations
@Override
getLengthback to summary
public Long getLength()

Implements org.hibernate.metamodel.mapping.SqlTypedMapping.getLength.

Annotations
@Override
getMappedTypeback to summary
public DiscriminatorType<O> getMappedType()

Overrides org.hibernate.metamodel.mapping.internal.AbstractDiscriminatorMapping.getMappedType.

Implements org.hibernate.metamodel.mapping.ValueMapping.getMappedType.

Doc from org.hibernate.metamodel.mapping.ValueMapping.getMappedType.

Descriptor for the type of this mapping

Annotations
@Override
getPrecisionback to summary
public Integer getPrecision()

Implements org.hibernate.metamodel.mapping.SqlTypedMapping.getPrecision.

Annotations
@Override
getScaleback to summary
public Integer getScale()

Implements org.hibernate.metamodel.mapping.SqlTypedMapping.getScale.

Annotations
@Override
getSelectionExpressionback to summary
public String getSelectionExpression()

Implements org.hibernate.metamodel.mapping.SelectableMapping.getSelectionExpression.

Doc from org.hibernate.metamodel.mapping.SelectableMapping.getSelectionExpression.

The selection's expression. This is the column name or formula

Annotations
@Override
getValueConverterback to summary
public DiscriminatorConverter<?, ?> getValueConverter()

Overrides org.hibernate.metamodel.mapping.internal.AbstractDiscriminatorMapping.getValueConverter.

Implements org.hibernate.metamodel.mapping.DiscriminatorMapping.getValueConverter.

Doc from org.hibernate.metamodel.mapping.DiscriminatorMapping.getValueConverter.

Information about the value mappings

Annotations
@Override
hasPartitionedSelectionMappingback to summary
public boolean hasPartitionedSelectionMapping()

Overrides default org.hibernate.metamodel.mapping.BasicValuedModelPart.hasPartitionedSelectionMapping.

Implements org.hibernate.metamodel.mapping.ModelPart.hasPartitionedSelectionMapping.

Annotations
@Override
hasPhysicalColumnback to summary
public boolean hasPhysicalColumn()

Implements org.hibernate.metamodel.mapping.EntityDiscriminatorMapping.hasPhysicalColumn.

Doc from org.hibernate.metamodel.mapping.EntityDiscriminatorMapping.hasPhysicalColumn.

Is the discriminator defined by a physical column?

Annotations
@Override
isFormulaback to summary
public boolean isFormula()

Implements org.hibernate.metamodel.mapping.SelectableMapping.isFormula.

Doc from org.hibernate.metamodel.mapping.SelectableMapping.isFormula.

Is the mapping a formula instead of a physical column?

Annotations
@Override
isInsertableback to summary
public boolean isInsertable()

Implements org.hibernate.metamodel.mapping.SelectableMapping.isInsertable.

Annotations
@Override
isNullableback to summary
public boolean isNullable()

Implements org.hibernate.metamodel.mapping.SelectableMapping.isNullable.

Doc from org.hibernate.metamodel.mapping.SelectableMapping.isNullable.

Is the mapping considered nullable?

Annotations
@Override
isPartitionedback to summary
public boolean isPartitioned()

Implements org.hibernate.metamodel.mapping.SelectableMapping.isPartitioned.

Annotations
@Override
isUpdateableback to summary
public boolean isUpdateable()

Implements org.hibernate.metamodel.mapping.SelectableMapping.isUpdateable.

Annotations
@Override
resolveSqlExpressionback to summary
public Expression resolveSqlExpression(NavigablePath navigablePath, JdbcMapping jdbcMappingToUse, TableGroup tableGroup, SqlAstCreationState creationState)

Implements org.hibernate.metamodel.mapping.EntityDiscriminatorMapping.resolveSqlExpression.

Doc from org.hibernate.metamodel.mapping.EntityDiscriminatorMapping.resolveSqlExpression.

Create the appropriate SQL expression for this discriminator

Parameters
jdbcMappingToUse:JdbcMapping

The JDBC mapping to use. This allows opting between the "domain result type" (aka Class) and the "underlying type" (Integer, String, etc)

Annotations
@Override