ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Meadors <larry.mead...@gmail.com>
Subject Re: commit
Date Tue, 13 Sep 2005 12:03:49 GMT
Short answer: You don't.

Long answer: It depends on what you want to do. If you do not need
actions grouped into transactions, you do not need to worry about
them.

Larry


On 9/13/05, dionisio@tinieblas.com <dionisio@tinieblas.com> wrote:
> 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