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

org.hibernate.type.PrimitiveType 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.type;
import java.io.Serializable;

/**
 * Additional contract for primitive / primitive wrapper types.
 *
 * @author Gavin King
 * @author Steve Ebersole
 */
public interface PrimitiveType extends LiteralType {
	/**
	 * Retrieve the primitive counterpart to the wrapper type identified by
	 * {@link org.hibernate.type.Type#getReturnedClass()}.
	 *
	 * @return The primitive Java type.
	 */
	public abstract Class getPrimitiveClass();

	/**
	 * Retrieve the string representation of the given value.
	 *
	 * @param value The value to be stringified.
	 *
	 * @return The string representation
	 */
	public String toString(T value);

	/**
	 * Get this type's default value.
	 *
	 * @return The default value.
	 */
	public abstract Serializable getDefaultValue();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy