Package org.apache.ibatis.session

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


      Map<String, Object> parameters = new HashMap<String, Object>();
      parameters.put("name", "schema.version");
      parameters.put("value", "25.7");
      parameters.put("revision", new Integer(1));
      parameters.put("newRevision", new Integer(2));
      sqlSession.update("updateProperty", parameters);
      success = true;
    } catch (Exception e) {
      throw new ActivitiException("couldn't update db schema version", e);
    } finally {
      if (success) {
View Full Code Here


                // lets handle arrays or collections of objects
                Iterator<?> iter = ObjectHelper.createIterator(in);
                while (iter.hasNext()) {
                    Object value = iter.next();
                    LOG.trace("Updating: {} using statement: {}", value, statement);
                    result = session.update(statement, value);
                    doProcessResult(exchange, result);
                }
            } else {
                LOG.trace("Updating using statement: {}", statement);
                result = session.update(statement);
View Full Code Here

                    result = session.update(statement, value);
                    doProcessResult(exchange, result);
                }
            } else {
                LOG.trace("Updating using statement: {}", statement);
                result = session.update(statement);
                doProcessResult(exchange, result);
            }

            session.commit();
        } catch (Exception e) {
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.