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

org.nutz.trans.Transaction Maven / Gradle / Ivy

Go to download

Nutz, which is a collections of lightweight frameworks, each of them can be used independently

There is a newer version: 1.r.72
Show newest version
package org.nutz.trans;

import java.sql.Connection;
import java.sql.SQLException;

import javax.sql.DataSource;

public abstract class Transaction {

	private int level;

	public int getLevel() {
		return level;
	}

	public void setLevel(int level) {
		if (this.level <= 0)
			this.level = level;
	}

	public abstract int getId();

	protected abstract void commit();

	protected abstract void rollback();

	public abstract Connection getConnection(DataSource dataSource) throws SQLException;

	public abstract void close();

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy