Package com.ibatis.sqlmap.client

Examples of com.ibatis.sqlmap.client.SqlMapSession.queryForObject()


    clientControl.setReturnValue(session, 1);
    session.getCurrentConnection();
    sessionControl.setReturnValue(null, 1);
    session.setUserConnection(con);
    sessionControl.setVoidCallable(1);
    session.queryForObject("myStatement", "myParameter");
    sessionControl.setReturnValue("myResult", 1);
    session.close();
    sessionControl.setVoidCallable(1);

    dsControl.replay();
View Full Code Here


  public void testSessionUserConnection() throws SQLException {
    DataSource ds = sqlMap.getDataSource();
    Connection conn = ds.getConnection();
    ((SqlMapClientImpl) sqlMap).getTransactionManager().getTrasactionConfig().setDataSource(null);
    SqlMapSession session = sqlMap.openSession(conn);
    Account account = (Account) session.queryForObject("getAccountViaColumnName", new Integer(1));
    session.close();
    conn.close();
    assertAccount1(account);
    ((SqlMapClientImpl) sqlMap).getTransactionManager().getTrasactionConfig().setDataSource(ds);
  }
View Full Code Here

        expected = e;
      }
      assertNotNull("Expected exception from startTransaction() was not detected.", expected);
      expected = null;

      Account account = (Account) session.queryForObject("getAccountViaColumnName", new Integer(1));
      session.close();
      conn.close();
      assertAccount1(account);
    } finally {
      ((SqlMapClientImpl) sqlMap).getTransactionManager().getTrasactionConfig().setDataSource(ds);
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.