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

org.hibernate.jpa.event.spi.jpa.Callback Maven / Gradle / Ivy

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.jpa.event.spi.jpa;

import java.io.Serializable;

/**
 * Represents a JPA event callback (the method).
 * 

* Generally there are 2 flavors of this; either an annotated method on the entity itself * or an annotated method on a separate "listener" class. This contract unifies both of * these cases. * * @author Kabir Khan * @author Steve Ebersole */ public interface Callback extends Serializable { /** * Is this callback active (will it do anything)? * * @return {@code true} if the callback is active, {@code false} otherwise. * * @deprecated I can actually find no usages of this method and have no idea * why it is here :) */ @Deprecated boolean isActive(); CallbackType getCallbackType(); /** * Contract for performing the callback * * @param entity Reference to the entity for which the callback is triggered. * * @return Did a callback actually happen? */ boolean performCallback(Object entity); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy