List of usage examples for org.hibernate Interceptor onDelete
void onDelete(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) throws CallbackException;
From source file:com.fiveamsolutions.nci.commons.util.CompositeInterceptor.java
License:Open Source License
/** * {@inheritDoc}//w ww . j a va 2 s .co m */ public void onDelete(Object arg0, Serializable arg1, Object[] arg2, String[] arg3, Type[] arg4) { for (Interceptor i : children) { i.onDelete(arg0, arg1, arg2, arg3, arg4); } }
From source file:com.fiveamsolutions.nci.commons.util.CompositeInterceptorTest.java
License:Open Source License
private void helper(Interceptor i, boolean expectChanges) { i.afterTransactionBegin(null);//from w w w . j a va 2 s . c om i.afterTransactionCompletion(null); i.beforeTransactionCompletion(null); assertNull(i.getEntity(null, null)); assertNull(i.getEntityName(null)); if (expectChanges) { assertNotNull(i.findDirty(null, null, null, null, null, null)); assertNotNull(i.instantiate(null, null, null)); assertNotNull(i.isTransient(null)); assertTrue(!"foo".equals(i.onPrepareStatement("foo"))); } else { assertNull(i.findDirty(null, null, null, null, null, null)); assertNull(i.instantiate(null, null, null)); assertNull(i.isTransient(null)); assertEquals("foo", i.onPrepareStatement("foo")); } i.onCollectionRecreate(null, null); i.onCollectionRemove(null, null); i.onCollectionUpdate(null, null); i.onDelete(null, null, null, null, null); assertEquals(expectChanges, i.onFlushDirty(null, null, null, null, null, null)); assertEquals(expectChanges, i.onLoad(null, null, null, null, null)); assertEquals(expectChanges, i.onSave(null, null, null, null, null)); i.postFlush(null); i.preFlush(null); }
From source file:debop4k.data.orm.hibernate.interceptors.MultipleInterceptor.java
License:Apache License
@Override public void onDelete(Object entity, Serializable id, Object[] state, final String[] propertyNames, Type[] types) {/*from w w w. j a va2 s .c om*/ if (nonEmpty()) { for (Interceptor interceptor : interceptors) { interceptor.onDelete(entity, id, state, propertyNames, types); } } }
From source file:gov.nih.nci.cabig.ctms.audit.ChainedInterceptor.java
License:BSD License
public void onDelete(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) throws CallbackException { for (Interceptor element : interceptors) { element.onDelete(entity, id, state, propertyNames, types); }/*from w w w .j a v a2 s. c o m*/ }
From source file:io.github.jonestimd.hibernate.InterceptorChain.java
License:Open Source License
@Override public void onDelete(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) throws CallbackException { for (Interceptor interceptor : chain) { interceptor.onDelete(entity, id, state, propertyNames, types); }// w w w .ja v a2 s . co m }
From source file:kr.debop4j.data.hibernate.interceptor.MultiInterceptor.java
License:Apache License
@Override public void onDelete(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) { if (!isExists()) return;// www . jav a 2s .c o m if (isTraceEnabled) log.trace("?? onDelete ? ."); for (final Interceptor interceptor : interceptors) { interceptor.onDelete(entity, id, state, propertyNames, types); } }
From source file:org.chenillekit.hibernate.interceptors.ChainedInterceptor.java
License:Apache License
public void onDelete(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) { for (Object o : interceptors.entrySet()) { Map.Entry entry = (Map.Entry) o; Interceptor interceptor = (Interceptor) entry.getValue(); interceptor.onDelete(entity, id, state, propertyNames, types); }//from w ww . j av a 2 s.c o m }
From source file:org.hyperic.hibernate.DefaultInterceptorChain.java
License:Open Source License
public void onDelete(HibernateInterceptorChain chain, Interceptor target, Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) { target.onDelete(entity, id, state, propertyNames, types); }
From source file:org.openmrs.api.db.hibernate.ChainingInterceptor.java
License:Mozilla Public License
public void onDelete(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) { for (Interceptor i : interceptors) { i.onDelete(entity, id, state, propertyNames, types); }//from w w w . j a v a 2s .com }
From source file:org.osaf.cosmo.hibernate.CompoundInterceptor.java
License:Apache License
@Override public void onDelete(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) { for (Interceptor i : interceptors) i.onDelete(entity, id, state, propertyNames, types); }