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

org.hibernate.boot.model.source.spi.JpaCallbackSource 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.boot.model.source.spi;

import java.lang.annotation.Annotation;

/**
 * @author Steve Ebersole
 */
public interface JpaCallbackSource {

	/**
	 * @param callbackType {@link javax.persistence.PrePersist}, {@link javax.persistence.PreRemove}, {@link javax.persistence.PreUpdate}, {@link javax.persistence.PostLoad},
	 *        {@link javax.persistence.PostPersist}, {@link javax.persistence.PostRemove}, or {@link javax.persistence.PostUpdate}
	 * @return the name of the JPA callback method defined for the associated {@link javax.persistence.Entity entity} or {@link javax.persistence.MappedSuperclass
	 *         mapped superclass} and for the supplied callback annotation class.
	 */
	String getCallbackMethod(Class callbackType);

	/**
	 * @return the name of the instantiated container where the JPA callbacks for the associated {@link javax.persistence.Entity entity} or
	 *         {@link javax.persistence.MappedSuperclass mapped superclass} are defined. This can be either the entity/mapped superclass itself or an
	 *         {@link javax.persistence.EntityListeners entity listener}.
	 */
	String getName();

	/**
	 * @return true if this callback class represents callbacks defined within an {@link javax.persistence.EntityListeners entity
	 *         listener}.
	 */
	boolean isListener();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy