001 /*
002 @license.text@
003 */
004 package biz.hammurapi.sql;
005
006 import java.sql.SQLException;
007
008 /**
009 * Interface to execute a series of database operation in a transaction.
010 * @author Pavel Vlasov
011 * @revision $Revision$
012 */
013 public interface Transaction {
014
015 /**
016 * @param processor
017 * @return true if transaction shall be commited, false if it should be rolled back.
018 * @throws SQLException If exception is thrown then transaction is rolled back.
019 */
020 boolean execute(SQLProcessor processor) throws SQLException;
021 }