Class ForbidJpqlUpdateDeletePostProcessor
- java.lang.Object
-
- ca.corefacility.bioinformatics.irida.config.repository.ForbidJpqlUpdateDeletePostProcessor
-
- All Implemented Interfaces:
org.springframework.beans.factory.config.BeanPostProcessor
,org.springframework.core.Ordered
,org.springframework.core.PriorityOrdered
public class ForbidJpqlUpdateDeletePostProcessor extends java.lang.Object implements org.springframework.core.PriorityOrdered, org.springframework.beans.factory.config.BeanPostProcessor
ABeanPostProcessor
that inspects theQuery
methods on a repository bean and dies when a query is written in JPQL that tries to modify the database with an update or delete. This is to prevent us from writing queries that will skip through the auditing layer that envers provides.
-
-
Constructor Summary
Constructors Constructor Description ForbidJpqlUpdateDeletePostProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getOrder()
java.lang.Object
postProcessAfterInitialization(java.lang.Object bean, java.lang.String beanName)
java.lang.Object
postProcessBeforeInitialization(java.lang.Object bean, java.lang.String beanName)
-
-
-
Method Detail
-
getOrder
public int getOrder()
- Specified by:
getOrder
in interfaceorg.springframework.core.Ordered
-
postProcessBeforeInitialization
public java.lang.Object postProcessBeforeInitialization(java.lang.Object bean, java.lang.String beanName) throws org.springframework.beans.BeansException
- Specified by:
postProcessBeforeInitialization
in interfaceorg.springframework.beans.factory.config.BeanPostProcessor
- Throws:
org.springframework.beans.BeansException
-
postProcessAfterInitialization
public java.lang.Object postProcessAfterInitialization(java.lang.Object bean, java.lang.String beanName) throws org.springframework.beans.BeansException
- Specified by:
postProcessAfterInitialization
in interfaceorg.springframework.beans.factory.config.BeanPostProcessor
- Throws:
org.springframework.beans.BeansException
-
-