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

org.omnifaces.persistence.exception.BaseEntityException Maven / Gradle / Ivy

There is a newer version: 0.22.J1
Show newest version
package org.omnifaces.persistence.exception;

import javax.ejb.ApplicationException;
import javax.persistence.PersistenceException;

import org.omnifaces.persistence.model.BaseEntity;

@ApplicationException(rollback = true)
public abstract class BaseEntityException extends PersistenceException {

	private static final long serialVersionUID = 1L;

	private BaseEntity entity;

	public BaseEntityException(BaseEntity entity, String message) {
		super(message);
		this.entity = entity;
	}

	@SuppressWarnings("unchecked")
	public > E getEntity() {
		return (E) entity;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy