Package org.g4studio.core.orm.xibatis.sqlmap.engine.transaction

Examples of org.g4studio.core.orm.xibatis.sqlmap.engine.transaction.Transaction


   */
  public Object insert(SessionScope sessionScope, String id, Object param) throws SQLException {
    Object generatedKey = null;

    MappedStatement ms = getMappedStatement(id);
    Transaction trans = getTransaction(sessionScope);
    boolean autoStart = trans == null;

    try {
      trans = autoStartTransaction(sessionScope, autoStart, trans);

View Full Code Here


   */
  public int update(SessionScope sessionScope, String id, Object param) throws SQLException {
    int rows = 0;

    MappedStatement ms = getMappedStatement(id);
    Transaction trans = getTransaction(sessionScope);
    boolean autoStart = trans == null;

    try {
      trans = autoStartTransaction(sessionScope, autoStart, trans);

View Full Code Here

  public Object queryForObject(SessionScope sessionScope, String id, Object paramObject, Object resultObject)
      throws SQLException {
    Object object = null;

    MappedStatement ms = getMappedStatement(id);
    Transaction trans = getTransaction(sessionScope);
    boolean autoStart = trans == null;

    try {
      trans = autoStartTransaction(sessionScope, autoStart, trans);
View Full Code Here

  public List queryForList(SessionScope sessionScope, String id, Object paramObject, int skip, int max)
      throws SQLException {
    List list = null;

    MappedStatement ms = getMappedStatement(id);
    Transaction trans = getTransaction(sessionScope);
    boolean autoStart = trans == null;

    try {
      trans = autoStartTransaction(sessionScope, autoStart, trans);
View Full Code Here

   */
  public void queryWithRowHandler(SessionScope sessionScope, String id, Object paramObject, RowHandler rowHandler)
      throws SQLException {

    MappedStatement ms = getMappedStatement(id);
    Transaction trans = getTransaction(sessionScope);
    boolean autoStart = trans == null;

    try {
      trans = autoStartTransaction(sessionScope, autoStart, trans);

View Full Code Here

    }
  }

  protected Transaction autoStartTransaction(SessionScope sessionScope, boolean autoStart, Transaction trans)
      throws SQLException {
    Transaction transaction = trans;
    if (autoStart) {
      sessionScope.getSqlMapTxMgr().startTransaction();
      transaction = getTransaction(sessionScope);
    }
    return transaction;
View Full Code Here

  }

  public Connection getCurrentConnection() throws SQLException {
    try {
      Connection conn = null;
      Transaction trans = delegate.getTransaction(sessionScope);
      if (trans != null) {
        conn = trans.getConnection();
      }
      return conn;
    } catch (TransactionException e) {
      throw new NestedSQLException("Error getting Connection from Transaction.  Cause: " + e, e);
    }
View Full Code Here

TOP

Related Classes of org.g4studio.core.orm.xibatis.sqlmap.engine.transaction.Transaction

Copyright © 2018 www.massapicom. 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.