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

org.apache.aries.transaction.TransactionalAnnotationAttributes Maven / Gradle / Ivy

There is a newer version: 2.3.1
Show newest version
package org.apache.aries.transaction;

import javax.transaction.Transactional.TxType;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class TransactionalAnnotationAttributes {

	private TxType txType;
	private List rollbackOn = new ArrayList();
	private List dontRollbackOn = new ArrayList();

	public TransactionalAnnotationAttributes(TxType defaultType) {
		this.txType = defaultType;
	}

	public TransactionalAnnotationAttributes(TxType txType, Class[] dontRollbackOn, Class[] rollbackOn) {
		this.txType = txType;
		if (dontRollbackOn != null) {
			this.dontRollbackOn = Arrays.asList(dontRollbackOn);
		}
		if (rollbackOn != null) {
			this.rollbackOn = Arrays.asList(rollbackOn);
		}
	}

	public TxType getTxType() {
		return txType;
	}

	public void setTxType(TxType txType) {
		this.txType = txType;
	}

	public List getRollbackOn() {
		return rollbackOn;
	}

	public void setRollbackOn(List rollbackOn) {
		this.rollbackOn = rollbackOn;
	}

	public List getDontRollbackOn() {
		return dontRollbackOn;
	}

	public void setDontRollbackOn(List dontRollbackOn) {
		this.dontRollbackOn = dontRollbackOn;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy