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

public Class CaseStatementDiscriminatorMappingImpl

extends AbstractDiscriminatorMapping
Class Inheritance
Imports
java.util.LinkedHashMap, org.hibernate.engine.FetchTiming, org.hibernate.engine.spi.SessionFactoryImplementor, org.hibernate.metamodel.mapping.DiscriminatorType, .JdbcMapping, .JdbcMappingContainer, org.hibernate.persister.entity.JoinedSubclassEntityPersister, org.hibernate.spi.NavigablePath, org.hibernate.sql.ast.SqlAstTranslator, org.hibernate.sql.ast.spi.SqlAppender, .SqlAstCreationState, .SqlExpressionResolver, org.hibernate.sql.ast.tree.expression.CaseSearchedExpression, .ColumnReference, .Expression, .QueryLiteral, .SelfRenderingExpression, org.hibernate.sql.ast.tree.from.TableGroup, .TableReference, org.hibernate.sql.ast.tree.predicate.NullnessPredicate, .Predicate, org.hibernate.sql.results.graph.DomainResultCreationState, .FetchParent, org.hibernate.sql.results.graph.basic.BasicFetch, org.hibernate.type.BasicType

Author
Andrea Boriero

Nested and Inner Type Summary

Modifier and TypeClass and Description
public class
private static class

Field Summary

Modifier and TypeField and Description
private final LinkedHashMap<String, CaseStatementDiscriminatorMappingImpl.TableDiscriminatorDetails>

Constructor Summary

AccessConstructor and Description
public
CaseStatementDiscriminatorMappingImpl(JoinedSubclassEntityPersister entityDescriptor, String[] tableNames, int[] notNullColumnTableNumbers, String[] notNullColumnNames, String[] discriminatorValues, boolean[] discriminatorAbstract, DiscriminatorType<?> incomingDiscriminatorType, MappingModelCreationProcess creationProcess)

Deprecated as a consequence of JoinedSubclassEntityPersister being deprecated.

Method Summary

Modifier and TypeMethod and Description
private Expression
public BasicFetch<?>
generateFetch(FetchParent
The parent of the Fetch we are generating
fetchParent
,
NavigablePath
The overall path within the graph
fetchablePath
,
FetchTiming
The requested fetch timing
fetchTiming
,
boolean selected, String resultVariable, DomainResultCreationState creationState)

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

Implements org.hibernate.metamodel.mapping.EntityDiscriminatorMapping.generateFetch.

Generates a Fetch of this fetchable
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 Integer
public Integer
public String
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:
applySqlSelectionsapplySqlSelectionsbreakDownJdbcValuescreateDomainResultdisassemblefindContainingEntityMappingforEachDisassembledJdbcValueforEachJdbcTypeforEachSelectablegetEntityDescriptorgetJavaTypegetJdbcMappinggetMappedTypegetNavigableRolegetUnderlyingJdbcMappinggetValueConverterresolveDiscriminatorValue

Field Detail

tableDiscriminatorDetailsMapback to summary
private final LinkedHashMap<String, CaseStatementDiscriminatorMappingImpl.TableDiscriminatorDetails> tableDiscriminatorDetailsMap

Constructor Detail

CaseStatementDiscriminatorMappingImplback to summary
public CaseStatementDiscriminatorMappingImpl(JoinedSubclassEntityPersister entityDescriptor, String[] tableNames, int[] notNullColumnTableNumbers, String[] notNullColumnNames, String[] discriminatorValues, boolean[] discriminatorAbstract, DiscriminatorType<?> incomingDiscriminatorType, MappingModelCreationProcess creationProcess)

Deprecated

as a consequence of JoinedSubclassEntityPersister being deprecated. See corresponding docs for further information.

Method Detail

createCaseSearchedExpressionback to summary
private Expression createCaseSearchedExpression(TableGroup entityTableGroup)
generateFetchback to summary
public BasicFetch<?> generateFetch(FetchParent fetchParent, NavigablePath fetchablePath, FetchTiming fetchTiming, boolean selected, String resultVariable, DomainResultCreationState creationState)

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

Implements org.hibernate.metamodel.mapping.EntityDiscriminatorMapping.generateFetch.

Doc from org.hibernate.sql.results.graph.Fetchable.generateFetch.

Generates a Fetch of this fetchable

Parameters
fetchParent:FetchParent

The parent of the Fetch we are generating

fetchablePath:NavigablePath

The overall path within the graph

fetchTiming:FetchTiming

The requested fetch timing

Annotations
@Override
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
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
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
org.hibernate.metamodel.mapping.internal back to summary

public final Class CaseStatementDiscriminatorMappingImpl.CaseStatementDiscriminatorExpression

extends Object
implements SelfRenderingExpression
Class Inheritance
  • java.lang.Object
  • org.hibernate.metamodel.mapping.internal.CaseStatementDiscriminatorMappingImpl.CaseStatementDiscriminatorExpression
All Implemented Interfaces
org.hibernate.sql.ast.tree.expression.SelfRenderingExpression, org.hibernate.sql.ast.tree.expression.Expression, org.hibernate.sql.ast.spi.SqlSelectionProducer, org.hibernate.sql.ast.tree.SqlAstNode

Field Summary

Modifier and TypeField and Description
pack-priv CaseSearchedExpression
private final TableGroup

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public JdbcMappingContainer
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

caseSearchedExpressionback to summary
pack-priv CaseSearchedExpression caseSearchedExpression
entityTableGroupback to summary
private final TableGroup entityTableGroup

Constructor Detail

CaseStatementDiscriminatorExpressionback to summary
public CaseStatementDiscriminatorExpression(TableGroup entityTableGroup)

Method Detail

getExpressionTypeback to summary
public JdbcMappingContainer getExpressionType()

Implements org.hibernate.sql.ast.tree.expression.Expression.getExpressionType.

Doc from org.hibernate.sql.ast.tree.expression.Expression.getExpressionType.

The type for this expression

Annotations
@Override
renderToSqlback to summary
public void renderToSql(SqlAppender sqlAppender, SqlAstTranslator<?> walker, SessionFactoryImplementor sessionFactory)

Implements org.hibernate.sql.ast.tree.expression.SelfRenderingExpression.renderToSql.

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

Annotations
@Override
org.hibernate.metamodel.mapping.internal back to summary

private Class CaseStatementDiscriminatorMappingImpl.TableDiscriminatorDetails

extends Object
Class Inheritance
  • java.lang.Object
  • org.hibernate.metamodel.mapping.internal.CaseStatementDiscriminatorMappingImpl.TableDiscriminatorDetails

Field Summary

Modifier and TypeField and Description
private final String
private final Object
private final String

Constructor Summary

AccessConstructor and Description
public
TableDiscriminatorDetails(String tableName, String checkColumnName, Object discriminatorValue)

Method Summary

Modifier and TypeMethod and Description
pack-priv String
pack-priv Object
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

checkColumnNameback to summary
private final String checkColumnName
discriminatorValueback to summary
private final Object discriminatorValue
tableNameback to summary
private final String tableName

Constructor Detail

TableDiscriminatorDetailsback to summary
public TableDiscriminatorDetails(String tableName, String checkColumnName, Object discriminatorValue)

Method Detail

getCheckColumnNameback to summary
pack-priv String getCheckColumnName()
getDiscriminatorValueback to summary
pack-priv Object getDiscriminatorValue()
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override