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

org.hibernate.jpa.TypedParameterValue 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.jpa;

import org.hibernate.type.Type;

/**
 * Can be used to bind query parameter values.  Allows to provide additional details about the
 * parameter value/binding.
 *
 * @author Steve Ebersole
 */
public class TypedParameterValue {
	private final Type type;
	private final Object value;

	public TypedParameterValue(Type type, Object value) {
		this.type = type;
		this.value = value;
	}

	/**
	 * The value to bind
	 *
	 * @return The value to be bound
	 */
	public Object getValue() {
		return value;
	}

	/**
	 * The specific Hibernate type to use to bind the value.
	 *
	 * @return The Hibernate type to use.
	 */
	public Type getType() {
		return type;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy