Java Code Examples for com.ibatis.sqlmap.client.SqlMapSession

The following examples show how to use com.ibatis.sqlmap.client.SqlMapSession. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
protected Object executeWith(Connection connection, SqlMapClientCallback action) {
    SqlMapSession session = getSqlMapClient().openSession();
    try {
        try {
            session.setUserConnection(connection);
        } catch (SQLException e) {
            throw new CannotGetJdbcConnectionException("Could not get JDBC Connection", e);
        }
        try {
            return action.doInSqlMapClient(session);
        } catch (SQLException ex) {
            throw new SQLErrorCodeSQLExceptionTranslator().translate("SqlMapClient operation",
                    null, ex);
        }
    } finally {
        session.close();
    }
}
 
Example 2
Source Project: pinpoint   Source File: SqlMapSessionIT.java    License: Apache License 2.0 4 votes vote down vote up
@Test
public void methodCallWithNullSqlIdShouldOnlyTraceMethodName() throws Exception {
    SqlMapSession sqlMapSession = new SqlMapSessionImpl(this.sqlMapClient);
    super.testAndVerifyInsertWithNullSqlId(sqlMapSession);
}
 
Example 3
Source Project: pinpoint   Source File: SqlMapSessionIT.java    License: Apache License 2.0 4 votes vote down vote up
@Test
public void insertShouldBeTraced() throws Exception {
    SqlMapSession sqlMapSession = new SqlMapSessionImpl(this.sqlMapClient);
    super.testAndVerifyInsert(sqlMapSession);
}
 
Example 4
Source Project: pinpoint   Source File: SqlMapSessionIT.java    License: Apache License 2.0 4 votes vote down vote up
@Test
public void deleteShouldBeTraced() throws Exception {
    SqlMapSession sqlMapSession = new SqlMapSessionImpl(this.sqlMapClient);
    super.testAndVerifyDelete(sqlMapSession);
}
 
Example 5
Source Project: pinpoint   Source File: SqlMapSessionIT.java    License: Apache License 2.0 4 votes vote down vote up
@Test
public void updateShouldBeTraced() throws Exception {
    SqlMapSession sqlMapSession = new SqlMapSessionImpl(this.sqlMapClient);
    super.testAndVerifyUpdate(sqlMapSession);
}
 
Example 6
Source Project: pinpoint   Source File: SqlMapSessionIT.java    License: Apache License 2.0 4 votes vote down vote up
@Test
public void queryForListShouldBeTraced() throws Exception {
    SqlMapSession sqlMapSession = new SqlMapSessionImpl(this.sqlMapClient);
    super.testAndVerifyQueryForList(sqlMapSession);
}
 
Example 7
Source Project: pinpoint   Source File: SqlMapSessionIT.java    License: Apache License 2.0 4 votes vote down vote up
@Test
public void queryForMapShouldBeTraced() throws Exception {
    SqlMapSession sqlMapSession = new SqlMapSessionImpl(this.sqlMapClient);
    super.testAndVerifyQueryForMap(sqlMapSession);
}
 
Example 8
Source Project: pinpoint   Source File: SqlMapSessionIT.java    License: Apache License 2.0 4 votes vote down vote up
@Test
public void queryForObjectShouldBeTraced() throws Exception {
    SqlMapSession sqlMapSession = new SqlMapSessionImpl(this.sqlMapClient);
    super.testAndVerifyQueryForObject(sqlMapSession);
}
 
Example 9
Source Project: pinpoint   Source File: SqlMapSessionIT.java    License: Apache License 2.0 4 votes vote down vote up
@Test
public void queryForPaginagedListShouldBeTraced() throws Exception {
    SqlMapSession sqlMapSession = new SqlMapSessionImpl(this.sqlMapClient);
    super.testAndVerifyQueryForPaginatedList(sqlMapSession);
}
 
Example 10
Source Project: oslits   Source File: ComOslitsAbstractDAO.java    License: GNU General Public License v3.0 3 votes vote down vote up
/**
 * 	공통 대용량 엑셀 다운로드 메서드(소용량도 포함)
 * 	쿼리 ID와 파라미터 오브젝트(Map or Bean), 엑셀리절트핸들러를 이용해 엑셀 다운로드용 쿼리를 실행한다. 
 * 	@param sqlId
 * 	@param param
 * 	@param resultHandler
 * 	@throws Exception
 */
@SuppressWarnings("deprecation")
public void listExcelDownSql(String sqlId, Object param, ExcelDataListResultHandler resultHandler) throws Exception{
	SqlMapSession sqlMap = getSqlMapClient().openSession();
	sqlMap.queryWithRowHandler(sqlId, param, resultHandler);
	sqlMap.close();
}