org.hibernate.tuple.AnnotationValueGeneration 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
The core O/RM functionality as provided by Hibernate
                
             The 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.tuple;
import java.lang.annotation.Annotation;
/**
 * A {@link ValueGeneration} based on a custom Java generator annotation type.
 *
 * @param  The generator annotation type supported by an implementation
 *
 * @author Gunnar Morling
 */
public interface AnnotationValueGeneration extends ValueGeneration {
	/**
	 * Initializes this generation strategy for the given annotation instance.
	 *
	 * @param annotation an instance of the strategy's annotation type. Typically implementations will retrieve the
	 * annotation's attribute values and store them in fields.
	 * @param propertyType the type of the property annotated with the generator annotation. Implementations may use
	 * the type to determine the right {@link ValueGenerator} to be applied.
	 *
	 * @throws org.hibernate.HibernateException in case an error occurred during initialization, e.g. if
	 * an implementation can't create a value for the given property type.
	 */
	void initialize(A annotation, Class> propertyType);
}
     © 2015 - 2025 Weber Informatics LLC | Privacy Policy