HHH-15884 - Clean-up EntityDiscriminatorMapping for API
This commit is contained in:
parent
ed4af59882
commit
a12a108f59
|
@ -49,7 +49,7 @@ public interface EntityDiscriminatorMapping extends VirtualModelPart, BasicValue
|
|||
/**
|
||||
* Is the discriminator defined by a physical column?
|
||||
*/
|
||||
boolean isPhysical();
|
||||
boolean hasPhysicalColumn();
|
||||
|
||||
@Override
|
||||
default int getFetchableKey() {
|
||||
|
|
|
@ -75,7 +75,7 @@ public class CaseStatementDiscriminatorMappingImpl extends AbstractDiscriminator
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean isPhysical() {
|
||||
public boolean hasPhysicalColumn() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -133,7 +133,7 @@ public class ExplicitColumnDiscriminatorMappingImpl extends AbstractDiscriminato
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean isPhysical() {
|
||||
public boolean hasPhysicalColumn() {
|
||||
return isPhysical;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1337,7 +1337,7 @@ public abstract class BaseSqmToSqlAstConverter<T extends Statement> extends Base
|
|||
targetColumnReferenceConsumer.accept( versionPath, targetColumnReferences );
|
||||
versionExpression = new VersionTypeSeedParameterSpecification( entityDescriptor.getVersionMapping() );
|
||||
}
|
||||
if ( discriminatorMapping != null && discriminatorMapping.isPhysical() ) {
|
||||
if ( discriminatorMapping != null && discriminatorMapping.hasPhysicalColumn() ) {
|
||||
final BasicValuedPathInterpretation<?> discriminatorPath = new BasicValuedPathInterpretation<>(
|
||||
new ColumnReference(
|
||||
rootTableGroup.resolveTableReference( discriminatorMapping.getContainingTableExpression() ),
|
||||
|
|
|
@ -97,7 +97,7 @@ public class CteTable {
|
|||
forEachCteColumn( idName, identifierMapping, columns::add );
|
||||
|
||||
final EntityDiscriminatorMapping discriminatorMapping = entityDescriptor.getDiscriminatorMapping();
|
||||
if ( discriminatorMapping != null && discriminatorMapping.isPhysical() && !discriminatorMapping.isFormula() ) {
|
||||
if ( discriminatorMapping != null && discriminatorMapping.hasPhysicalColumn() && !discriminatorMapping.isFormula() ) {
|
||||
forEachCteColumn( "class", discriminatorMapping, columns::add );
|
||||
}
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ public class MappingModelAccessTests {
|
|||
.isSameAs( cardPaymentMapping.getDiscriminatorMapping() )
|
||||
.isSameAs( cashPaymentMapping.getDiscriminatorMapping() );
|
||||
|
||||
assertThat( discriminatorMapping.isPhysical() ).isFalse();
|
||||
assertThat( discriminatorMapping.hasPhysicalColumn() ).isFalse();
|
||||
assertThat( discriminatorMapping.isVirtual() ).isTrue();
|
||||
assertThat( discriminatorMapping.getJavaType().getJavaTypeClass() ).isEqualTo( Class.class );
|
||||
assertThat( discriminatorMapping.getJdbcMapping().getJavaTypeDescriptor().getJavaTypeClass() ).isEqualTo( Class.class );
|
||||
|
@ -113,7 +113,7 @@ public class MappingModelAccessTests {
|
|||
.isSameAs( domesticVendorMapping.getDiscriminatorMapping() )
|
||||
.isSameAs( foreignVendorMapping.getDiscriminatorMapping() );
|
||||
|
||||
assertThat( discriminatorMapping.isPhysical() ).isTrue();
|
||||
assertThat( discriminatorMapping.hasPhysicalColumn() ).isTrue();
|
||||
assertThat( discriminatorMapping.isVirtual() ).isTrue();
|
||||
assertThat( discriminatorMapping.getJavaType().getJavaTypeClass() ).isEqualTo( Class.class );
|
||||
assertThat( discriminatorMapping.getJdbcMapping().getJavaTypeDescriptor().getJavaTypeClass() ).isEqualTo( Class.class );
|
||||
|
|
Loading…
Reference in New Issue