ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "dionisio@tinieblas.com" <dioni...@tinieblas.com>
Subject commit
Date Tue, 13 Sep 2005 10:40:26 GMT
hello i have the bellow code and my fisrt quiestion is where must i (in
the code) to make, to put, the commit, the:
daoManager.startTransaction();
daoManager.commitTransaction();

thanks.
The code is:
public class DatabaseActions extends SqlMapDaoTemplate {
	public DatabaseActions(DaoManager daoManager) {
		super(daoManager);
	}

	public final Object getObject(
		String statementName,
		Object parameterObject) {
		Object result = null;
		result = queryForObject(statementName, parameterObject);
		return result;
	}

	public final List getList(String statementName, Object parameterObject) {
		List list = null;
		list = queryForList(statementName, parameterObject);
		return list;
	}

	public final Object insert(String statementName, Object parameterObject) {
		Object result = null;
		insert(statementName, parameterObject);
		return result;

	}

	public final int update(String statementName, Object parameterObject) {
		int result = 0;
		update(statementName, parameterObject);
		return result;
	}

	public final int delete(String statementName, Object parameterObject) {
		int result = -1;
		delete(statementName, parameterObject);
		return result;
	}

} //clase


Mime
View raw message