Example usage for org.hibernate Interceptor afterTransactionBegin

List of usage examples for org.hibernate Interceptor afterTransactionBegin

Introduction

In this page you can find the example usage for org.hibernate Interceptor afterTransactionBegin.

Prototype

void afterTransactionBegin(Transaction tx);

Source Link

Document

Called when a Hibernate transaction is begun via the Hibernate Transaction API.

Usage

From source file:com.fiveamsolutions.nci.commons.util.CompositeInterceptor.java

License:Open Source License

/**
 * {@inheritDoc}/*from ww w . j  a v a 2s  . c  om*/
 */
public void afterTransactionBegin(Transaction arg0) {
    for (Interceptor i : children) {
        i.afterTransactionBegin(arg0);
    }
}

From source file:com.fiveamsolutions.nci.commons.util.CompositeInterceptorTest.java

License:Open Source License

private void helper(Interceptor i, boolean expectChanges) {
    i.afterTransactionBegin(null);
    i.afterTransactionCompletion(null);//from  www.  j  a  v a 2s.  c om
    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:gov.nih.nci.cabig.ctms.audit.ChainedInterceptor.java

License:BSD License

public void afterTransactionBegin(Transaction transaction) {
    for (Interceptor interceptor : interceptors) {
        interceptor.afterTransactionBegin(transaction);
    }/*from ww w.ja va 2s .  c  om*/
}

From source file:io.github.jonestimd.hibernate.InterceptorChain.java

License:Open Source License

@Override
public void afterTransactionBegin(Transaction tx) {
    for (Interceptor interceptor : chain) {
        interceptor.afterTransactionBegin(tx);
    }/*from w  w  w.j  a v a  2s. co  m*/
}

From source file:org.chenillekit.hibernate.interceptors.ChainedInterceptor.java

License:Apache License

public void afterTransactionBegin(Transaction tx) {
    for (Object o : interceptors.entrySet()) {
        Map.Entry entry = (Map.Entry) o;
        Interceptor interceptor = (Interceptor) entry.getValue();
        interceptor.afterTransactionBegin(tx);
    }/* w  ww  .  ja  va 2 s . co  m*/
}

From source file:org.hyperic.hibernate.DefaultInterceptorChain.java

License:Open Source License

public void afterTransactionBegin(HibernateInterceptorChain chain, Interceptor target, Transaction tx) {
    target.afterTransactionBegin(tx);
}

From source file:org.openmrs.api.db.hibernate.ChainingInterceptor.java

License:Mozilla Public License

public void afterTransactionBegin(Transaction tx) {
    for (Interceptor i : interceptors) {
        i.afterTransactionBegin(tx);
    }
}

From source file:org.riotfamily.common.hibernate.ChainedInterceptor.java

License:Apache License

public void afterTransactionBegin(Transaction tx) {
    for (Interceptor interceptor : interceptors) {
        interceptor.afterTransactionBegin(tx);
    }/*from w  w  w.ja  v  a 2s  .c om*/
}