HHH-16059 Add getters and relax scopes

extending CteInsertStrategy and CteMutationStrategy
This commit is contained in:
Davide D'Alto 2023-01-19 10:20:11 +01:00
parent f53a29ab12
commit e2baceb382
No known key found for this signature in database
GPG Key ID: 163581B9C6E9FC17
2 changed files with 25 additions and 1 deletions

View File

@ -154,4 +154,16 @@ public class CteInsertStrategy implements SqmMultiTableInsertStrategy {
DomainQueryExecutionContext context) {
return new CteInsertHandler( entityCteTable, sqmInsertStatement, domainParameterXref, sessionFactory ).execute( context );
}
protected EntityPersister getRootDescriptor() {
return rootDescriptor;
}
protected SessionFactoryImplementor getSessionFactory() {
return sessionFactory;
}
protected CteTable getEntityCteTable() {
return entityCteTable;
}
}

View File

@ -106,7 +106,7 @@ public class CteMutationStrategy implements SqmMultiTableMutationStrategy {
return new CteUpdateHandler( idCteTable, sqmUpdate, domainParameterXref, this, sessionFactory ).execute( context );
}
private void checkMatch(SqmDeleteOrUpdateStatement<?> sqmStatement) {
protected void checkMatch(SqmDeleteOrUpdateStatement<?> sqmStatement) {
final String targetEntityName = sqmStatement.getTarget().getEntityName();
final EntityPersister targetEntityDescriptor = sessionFactory.getRuntimeMetamodels()
.getMappingMetamodel()
@ -124,4 +124,16 @@ public class CteMutationStrategy implements SqmMultiTableMutationStrategy {
}
}
protected EntityPersister getRootDescriptor() {
return rootDescriptor;
}
protected SessionFactoryImplementor getSessionFactory() {
return sessionFactory;
}
protected CteTable getIdCteTable() {
return idCteTable;
}
}