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

org.hibernate.query.ParameterMetadata Maven / Gradle / Ivy

There is a newer version: 7.0.0.Alpha1
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 .
 */
package org.hibernate.query;

import java.util.Collection;
import java.util.Set;
import java.util.function.Consumer;
import javax.persistence.Parameter;

/**
 * Access to known information about the parameters for a query.
 *
 * @author Steve Ebersole
 */
public interface ParameterMetadata {

	/**
	 * Does this parameter set contain any named parameters?
	 *
	 * @return {@code true} if there are named parameters; {@code false} otherwise.
	 */
	boolean hasNamedParameters();

	/**
	 * Does this parameter set contain any positional parameters?
	 *
	 * @return {@code true} if there are positional parameters; {@code false} otherwise.
	 */
	boolean hasPositionalParameters();

	Set> collectAllParameters();

	Set> collectAllParametersJpa();

	/**
	 * Return the names of all named parameters of the query.
	 *
	 * @return the parameter names, in no particular order
	 */
	Set getNamedParameterNames();

	/**
	 * Returns the number of positional parameters.
	 *
	 * @return The number of positional parameters.
	 */
	int getPositionalParameterCount();

	 QueryParameter getQueryParameter(String name);

	 QueryParameter getQueryParameter(Integer position);

	 QueryParameter resolve(Parameter param);

	Collection getPositionalParameters();

	Collection getNamedParameters();

	int getParameterCount();

	boolean containsReference(QueryParameter parameter);

	void visitRegistrations(Consumer action);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy