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

com.avaje.ebeaninternal.api.TransactionEventBeans Maven / Gradle / Ivy

There is a newer version: 8.1.1
Show newest version
package com.avaje.ebeaninternal.api;

import java.util.ArrayList;
import java.util.List;

import com.avaje.ebeaninternal.server.cache.CacheChangeSet;
import com.avaje.ebeaninternal.server.core.PersistRequestBean;

/**
 * Lists of inserted updated and deleted beans that have a BeanPersistListener.
 * 

* These beans will be sent to the appropriate BeanListeners after a successful * commit of the transaction. *

*/ public class TransactionEventBeans { final ArrayList> requests = new ArrayList>(); /** * Return the list of PersistRequests that BeanListeners are interested in. */ public List> getRequests() { return requests; } /** * Add a bean for BeanListener notification. */ public void add(PersistRequestBean request) { requests.add(request); } /** * Collect the cache changes. */ public void notifyCache(CacheChangeSet changeSet) { for (int i = 0; i < requests.size(); i++) { requests.get(i).notifyCache(changeSet); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy