All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hibernate.query.sqm.mutation.internal.inline.MatchingIdRestrictionProducer Maven / Gradle / Ivy

There is a newer version: 7.0.0.Beta1
Show newest version
/*
 * Hibernate, Relational Persistence for Idiomatic Java
 *
 * License: GNU Lesser General Public License (LGPL), version 2.1 or later
 * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
 */
package org.hibernate.query.sqm.mutation.internal.inline;

import java.util.List;
import java.util.function.Consumer;
import java.util.function.Supplier;

import org.hibernate.metamodel.mapping.ColumnConsumer;
import org.hibernate.metamodel.mapping.EntityMappingType;
import org.hibernate.sql.ast.tree.from.TableReference;
import org.hibernate.sql.ast.tree.predicate.Predicate;
import org.hibernate.sql.exec.spi.ExecutionContext;

/**
 * Strategy (pattern) for producing the restriction used when mutating a
 * particular table in the group of tables
 *
 * @author Steve Ebersole
 */
public interface MatchingIdRestrictionProducer {
	/**
	 * Produce the restriction predicate
	 *
	 * @param matchingIdValues The matching id values.
	 * @param mutatingTableReference The TableReference for the table being mutated
	 * @param columnsToMatchVisitationSupplier The columns against which to restrict the mutations
	 */
	Predicate produceRestriction(
			List matchingIdValues,
			EntityMappingType entityDescriptor,
			TableReference mutatingTableReference,
			Supplier> columnsToMatchVisitationSupplier,
			ExecutionContext executionContext);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy