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

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

There is a newer version: 6.6.2.Final
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;

/**
 * An error that occurs binding an argument to a query parameter.
 * Usually indicates that the argument is of a type not assignable
 * to the type of the parameter.
 *
 * @since 6.3
 *
 * @author Gavin King
 */
public class QueryArgumentException extends IllegalArgumentException {
	private final Class parameterType;
	private final Object argument;

	public QueryArgumentException(String message, Class parameterType, Object argument) {
		super(message);
		this.parameterType = parameterType;
		this.argument = argument;
	}

	public Class getParameterType() {
		return parameterType;
	}

	public Object getArgument() {
		return argument;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy