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

org.hibernate.jpa.event.spi.jpa.CallbackType 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.lang.annotation.Annotation;
import javax.persistence.PostLoad;
import javax.persistence.PostPersist;
import javax.persistence.PostRemove;
import javax.persistence.PostUpdate;
import javax.persistence.PrePersist;
import javax.persistence.PreRemove;
import javax.persistence.PreUpdate;

/**
 * @author Steve Ebersole
 */
public enum CallbackType {
	PRE_UPDATE( PreUpdate.class ),
	POST_UPDATE( PostUpdate.class ),
	PRE_PERSIST( PrePersist.class ),
	POST_PERSIST( PostPersist.class ),
	PRE_REMOVE( PreRemove.class ),
	POST_REMOVE( PostRemove.class ),
	POST_LOAD( PostLoad.class )
	;

	private Class callbackAnnotation;

	CallbackType(Class callbackAnnotation) {
		this.callbackAnnotation = callbackAnnotation;
	}

	public Class getCallbackAnnotation() {
		return callbackAnnotation;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy