Package org.apache.ibatis.session

Examples of org.apache.ibatis.session.SqlSession.commit()


        try {
          Object result = method.invoke(sqlSession, args);
          if (!isSqlSessionTransactional(sqlSession, ShardImpl.this.sqlSessionFactory)) {
            // force commit even on non-dirty sessions because some databases require
            // a commit/rollback before calling close()
            sqlSession.commit(true);
          }
          return result;
        } catch (Throwable t) {
          Throwable unwrapped = unwrapThrowable(t);
          if (ShardImpl.this.exceptionTranslator != null && unwrapped instanceof PersistenceException) {
View Full Code Here


      success = true;
    } catch (Exception e) {
      throw new ActivitiException("couldn't update db schema version", e);
    } finally {
      if (success) {
        sqlSession.commit();
      } else {
        sqlSession.rollback();
      }
      sqlSession.close();
    }
View Full Code Here

  public void insert(IssueFilterFavouriteDto filter) {
    SqlSession session = mybatis.openSession(false);
    try {
      getMapper(session).insert(filter);
      session.commit();
    } finally {
      MyBatis.closeQuietly(session);
    }
  }
View Full Code Here

  public void delete(long id) {
    SqlSession session = mybatis.openSession(false);
    try {
      getMapper(session).delete(id);
      session.commit();
    } finally {
      MyBatis.closeQuietly(session);
    }
  }
View Full Code Here

  public void deleteByFilterId(long filterId) {
    SqlSession session = mybatis.openSession(false);
    try {
      getMapper(session).deleteByFilterId(filterId);
      session.commit();
    } finally {
      MyBatis.closeQuietly(session);
    }
  }
View Full Code Here

  public void insert(IssueFilterDto filter) {
    SqlSession session = mybatis.openSession(false);
    try {
      getMapper(session).insert(filter);
      session.commit();
    } finally {
      MyBatis.closeQuietly(session);
    }
  }
View Full Code Here

  public void update(IssueFilterDto filter) {
    SqlSession session = mybatis.openSession(false);
    try {
      getMapper(session).update(filter);
      session.commit();
    } finally {
      MyBatis.closeQuietly(session);
    }
  }
View Full Code Here

  public void delete(long id) {
    SqlSession session = mybatis.openSession(false);
    try {
      getMapper(session).delete(id);
      session.commit();
    } finally {
      MyBatis.closeQuietly(session);
    }
  }
View Full Code Here

        for (WidgetPropertyDto widgetPropertyDto : widgetDto.getWidgetProperties()) {
          widgetPropertyDto.setWidgetId(widgetDto.getId());
          widgetPropertyMapper.insert(widgetPropertyDto);
        }
      }
      session.commit();
    } finally {
      MyBatis.closeQuietly(session);
    }
  }
View Full Code Here

  public void insert(ActiveDashboardDto activeDashboardDto) {
    SqlSession session = mybatis.openSession(false);
    ActiveDashboardMapper mapper = session.getMapper(ActiveDashboardMapper.class);
    try {
      mapper.insert(activeDashboardDto);
      session.commit();
    } finally {
      MyBatis.closeQuietly(session);
    }
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.