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

com.jpattern.orm.jdbctemplate.NullTransactionStatus Maven / Gradle / Ivy

There is a newer version: 5.3.0
Show newest version
package com.jpattern.orm.jdbctemplate;

import org.springframework.transaction.TransactionException;
import org.springframework.transaction.TransactionStatus;

/**
 * 
 * @author Francesco Cina
 *
 * 15/giu/2011
 */
public class NullTransactionStatus implements TransactionStatus {

	private boolean rollbackOnly = false;

	@Override
	public Object createSavepoint() throws TransactionException {
		return new Object();
	}

	@Override
	public void rollbackToSavepoint(Object savepoint) throws TransactionException {
	}

	@Override
	public void releaseSavepoint(Object savepoint) throws TransactionException {
	}

	@Override
	public boolean isNewTransaction() {
		return true;
	}

	@Override
	public boolean hasSavepoint() {
		return false;
	}

	@Override
	public void setRollbackOnly() {
		rollbackOnly = true;		
	}

	@Override
	public boolean isRollbackOnly() {
		return rollbackOnly;
	}

	@Override
	public void flush() {
	}

	@Override
	public boolean isCompleted() {
		return false;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy