org.hibernate.type.LiteralType Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hibernate-core Show documentation
Show all versions of hibernate-core Show documentation
JPMS Module-Info's for a few of the Jakarta Libraries just until they add them in themselves
/*
* 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.type;
import org.hibernate.dialect.Dialect;
/**
* Additional contract for a {@link Type} that may appear as an SQL literal
*
* @author Gavin King
* @author Steve Ebersole
*/
public interface LiteralType {
/**
* Convert the value into a string representation, suitable for embedding in an SQL statement as a
* literal.
*
* @param value The value to convert
* @param dialect The SQL dialect
*
* @return The value's string representation
*
* @throws Exception Indicates an issue converting the value to literal string.
*/
public String objectToSQLString(T value, Dialect dialect) throws Exception;
}