HHH-7725 - Make handling multi-table bulk HQL operations more pluggable
This commit is contained in:
parent
0ab36bed8c
commit
1b5088a911
|
@ -55,10 +55,6 @@ public class AbstractTableBasedBulkIdHandler {
|
|||
private final String catalog;
|
||||
private final String schema;
|
||||
|
||||
public AbstractTableBasedBulkIdHandler(SessionFactoryImplementor sessionFactory, HqlSqlWalker walker) {
|
||||
this( sessionFactory, walker, null, null );
|
||||
}
|
||||
|
||||
public AbstractTableBasedBulkIdHandler(
|
||||
SessionFactoryImplementor sessionFactory,
|
||||
HqlSqlWalker walker,
|
||||
|
|
|
@ -217,7 +217,7 @@ public class PersistentTableBulkIdStrategy implements MultiTableBulkIdStrategy {
|
|||
|
||||
@Override
|
||||
public UpdateHandler buildUpdateHandler(SessionFactoryImplementor factory, HqlSqlWalker walker) {
|
||||
return new TableBasedUpdateHandlerImpl( factory, walker ) {
|
||||
return new TableBasedUpdateHandlerImpl( factory, walker, catalog, schema ) {
|
||||
@Override
|
||||
protected void addAnyExtraIdSelectValues(SelectValues selectClause) {
|
||||
selectClause.addParameter( Types.CHAR, 36 );
|
||||
|
@ -285,7 +285,7 @@ public class PersistentTableBulkIdStrategy implements MultiTableBulkIdStrategy {
|
|||
|
||||
@Override
|
||||
public DeleteHandler buildDeleteHandler(SessionFactoryImplementor factory, HqlSqlWalker walker) {
|
||||
return new TableBasedDeleteHandlerImpl( factory, walker ) {
|
||||
return new TableBasedDeleteHandlerImpl( factory, walker, catalog, schema ) {
|
||||
@Override
|
||||
protected void addAnyExtraIdSelectValues(SelectValues selectClause) {
|
||||
selectClause.addParameter( Types.CHAR, 36 );
|
||||
|
|
|
@ -54,8 +54,16 @@ public class TableBasedDeleteHandlerImpl
|
|||
private final List<ParameterSpecification> idSelectParameterSpecifications;
|
||||
private final String[] deletes;
|
||||
|
||||
TableBasedDeleteHandlerImpl(SessionFactoryImplementor factory, HqlSqlWalker walker) {
|
||||
super( factory, walker );
|
||||
public TableBasedDeleteHandlerImpl(SessionFactoryImplementor factory, HqlSqlWalker walker) {
|
||||
this( factory, walker, null, null );
|
||||
}
|
||||
|
||||
public TableBasedDeleteHandlerImpl(
|
||||
SessionFactoryImplementor factory,
|
||||
HqlSqlWalker walker,
|
||||
String catalog,
|
||||
String schema) {
|
||||
super( factory, walker, catalog, schema );
|
||||
|
||||
DeleteStatement deleteStatement = ( DeleteStatement ) walker.getAST();
|
||||
FromElement fromElement = deleteStatement.getFromClause().getFromElement();
|
||||
|
|
|
@ -60,8 +60,16 @@ public class TableBasedUpdateHandlerImpl
|
|||
private final ParameterSpecification[][] assignmentParameterSpecifications;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
TableBasedUpdateHandlerImpl(SessionFactoryImplementor factory, HqlSqlWalker walker) {
|
||||
super( factory, walker );
|
||||
public TableBasedUpdateHandlerImpl(SessionFactoryImplementor factory, HqlSqlWalker walker) {
|
||||
this( factory, walker, null, null );
|
||||
}
|
||||
|
||||
public TableBasedUpdateHandlerImpl(
|
||||
SessionFactoryImplementor factory,
|
||||
HqlSqlWalker walker,
|
||||
String catalog,
|
||||
String schema) {
|
||||
super( factory, walker, catalog, schema );
|
||||
|
||||
UpdateStatement updateStatement = ( UpdateStatement ) walker.getAST();
|
||||
FromElement fromElement = updateStatement.getFromClause().getFromElement();
|
||||
|
|
Loading…
Reference in New Issue