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

org.ioc.commons.integration.dataaccess.dao.Tx Maven / Gradle / Ivy

Go to download

This project defines a set of useful java interfaces for helping you in the definition of the structure of your developments in Java-projects which are designed using a Inversion-Of-Control (IOC) pattern. Useful for MVP-Pattern designs in applications coded on GWT, SWT, Android, etc.

There is a newer version: 1.2.1
Show newest version
package org.ioc.commons.integration.dataaccess.dao;

import org.ioc.commons.flowcontrol.common.Receiver;
import org.ioc.commons.integration.common.RequestManager;

/**
 * A transaction opened from a Data manager
 * 
 * @author Jesús Lunar Pérez
 * 
 * @param 
 *            Dao factory type
 */
public interface Tx {
	public D daoFactory();

	/**
	 * It fires all operations accumulated into the transaction.
	 * 
	 * The transaction becomes invalid once the method
	 * {@link Receiver#onEnd(boolean)} will be fired in whichever of the
	 * accumulated operations, but never before that.
	 * 
	 * In case a constraint violation happens, the transaction will remain valid
	 * and must be reused for firing the accumulated operations.
	 */
	public void fireTransaction();

	/**
	 * It fires operations as {@link #fireTransaction()} but uses internally a queue for firing it.
	 * 
	 * Read more about queue on {@link RequestManager#queue(String)}
	 * 
	 * @param queueName
	 */
	public void fireOrQueueTransaction(String queueName);

	/**
	 * Indica si una transacción puede ser lanzada.
	 */
	boolean canBeFired();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy