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

The following examples show how to use com.ibatis.sqlmap.client.SqlMapClient. 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
Source Project: GameServer   Source File: DBUtil.java    License: Apache License 2.0 5 votes vote down vote up
private static SqlMapClient initSqlMapClient(String cfgName) throws Exception{
	InputStream in = null;
	SqlMapClient sqlMapClient = null;
	try{
		in = Resources.getResourceAsStream(cfgName);
		sqlMapClient = new SqlMapConfigParser().parse(in);
	}finally{
		try {
			in.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	return sqlMapClient;
}
 
Example 2
Source Project: tddl5   Source File: TddlIbatisTest.java    License: Apache License 2.0 5 votes vote down vote up
@BeforeClass
public static void setUp() {
    Mode mode = ConfigDataMode.getMode();
    try {
        ConfigDataMode.setMode(Mode.AUTO);
        context = new ClassPathXmlApplicationContext("classpath:spring/spring_sample.xml");
        sqlMapClient = (SqlMapClient) context.getBean("sqlmap");
        transactionTempalte = (TransactionTemplate) context.getBean("transactionTemplate");
    } finally {
        ConfigDataMode.setMode(mode);

    }
}
 
Example 3
Source Project: tddl5   Source File: IbatisTypeTest.java    License: Apache License 2.0 5 votes vote down vote up
@BeforeClass
public static void setUp() {
    Mode mode = ConfigDataMode.getMode();
    try {
        ConfigDataMode.setMode(Mode.AUTO);
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(MATRIX_IBATIS_CONTEXT_PATH);
        tddlSqlMapClient = (SqlMapClient) context.getBean("ibatis_ds");
        // andorTDHSSqlMapClient = (SqlMapClient)
        // context.getBean("ibatis_tdhs_ds");
        mysqlSqlMapClient = (SqlMapClient) context.getBean("ibatis_mysql");
    } finally {
        ConfigDataMode.setMode(mode);

    }
}
 
Example 4
Source Project: tddl   Source File: IbatisTypeTest.java    License: Apache License 2.0 5 votes vote down vote up
@BeforeClass
public static void setUp() {
    ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(MATRIX_IBATIS_CONTEXT_PATH);
    andorSqlMapClient = (SqlMapClient) context.getBean("ibatis_ds");
    // andorTDHSSqlMapClient = (SqlMapClient)
    // context.getBean("ibatis_tdhs_ds");
    mysqlSqlMapClient = (SqlMapClient) context.getBean("ibatis_mysql");
}
 
Example 5
Source Project: oslits   Source File: ComOslitsAbstractDAO.java    License: GNU General Public License v3.0 4 votes vote down vote up
@Resource(name="oslops.sqlMapClient")
public void setSuperSqlMapClient(SqlMapClient sqlMapClient) {
       super.setSuperSqlMapClient(sqlMapClient);
   }
 
Example 6
Source Project: oslits   Source File: EgovComAbstractDAO.java    License: GNU General Public License v3.0 4 votes vote down vote up
@Resource(name="oslits.sqlMapClient")
public void setSuperSqlMapClient(SqlMapClient sqlMapClient) {
       super.setSuperSqlMapClient(sqlMapClient);
   }
 
Example 7
Source Project: EserKnife   Source File: IbatisDaoImpl.java    License: Apache License 2.0 4 votes vote down vote up
public void setSqlMapClient(SqlMapClient sqlMapClient) {
    this.sqlMapClientTemplate.setSqlMapClient(sqlMapClient);
}
 
Example 8
Source Project: EserKnife   Source File: EserIbatisDaoImpl.java    License: Apache License 2.0 4 votes vote down vote up
@Resource(name = "sqlMapClientCarMysql")
public void setSqlMapClientCarMysql(SqlMapClient sqlMapClient) {
    this.setSqlMapClient(sqlMapClient);
}
 
Example 9
Source Project: AsuraFramework   Source File: BaseIbatisDaoSupport.java    License: Apache License 2.0 4 votes vote down vote up
/**
 * @return the readSqlMapClient
 */
public SqlMapClient getReadSqlMapClient() {
	return readSqlMapClient;
}
 
Example 10
Source Project: AsuraFramework   Source File: BaseIbatisDaoSupport.java    License: Apache License 2.0 4 votes vote down vote up
/**
 * @param readSqlMapClient the readSqlMapClient to set
 */
public void setReadSqlMapClient(final SqlMapClient readSqlMapClient) {
	this.readSqlMapClient = readSqlMapClient;
}
 
Example 11
Source Project: AsuraFramework   Source File: BaseIbatisDaoSupport.java    License: Apache License 2.0 4 votes vote down vote up
/**
 * @return the writeSqlMapClient
 */
public SqlMapClient getWriteSqlMapClient() {
	return writeSqlMapClient;
}
 
Example 12
Source Project: AsuraFramework   Source File: BaseIbatisDaoSupport.java    License: Apache License 2.0 4 votes vote down vote up
/**
 * @param writeSqlMapClient the writeSqlMapClient to set
 */
public void setWriteSqlMapClient(final SqlMapClient writeSqlMapClient) {
	this.writeSqlMapClient = writeSqlMapClient;
}
 
Example 13
Source Project: AsuraFramework   Source File: BaseIbatisDaoSupport.java    License: Apache License 2.0 4 votes vote down vote up
protected void setSqlMapClient(final SqlMapClient sqlMapClient) {
	setWriteSqlMapClient(sqlMapClient);
	setReadSqlMapClient(sqlMapClient);
}
 
Example 14
Source Project: AsuraFramework   Source File: BaseIbatisDaoSupport.java    License: Apache License 2.0 4 votes vote down vote up
protected void setSqlMapClient(final SqlMapClient writesqlMapClient, final SqlMapClient readsqlMapClient) {
	setWriteSqlMapClient(writesqlMapClient);
	setReadSqlMapClient(readsqlMapClient);
}
 
Example 15
Source Project: SI   Source File: HeritCommonAbstractDAO.java    License: BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Resource(name="sqlMapClient")
public void setSuperSqlMapClient(SqlMapClient sqlMapClient) {
       super.setSuperSqlMapClient(sqlMapClient);
   }
 
Example 16
Source Project: SI   Source File: HeritHdmAbstractDAO.java    License: BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Resource(name="sqlMapClientHDM")
public void setSuperSqlMapClient(SqlMapClient sqlMapClient) {
       super.setSuperSqlMapClient(sqlMapClient);
   }
 
Example 17
Source Project: SI   Source File: HeritHdpAbstractDAO.java    License: BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Resource(name="sqlMapClientHDP")
public void setSuperSqlMapClient(SqlMapClient sqlMapClient) {
       super.setSuperSqlMapClient(sqlMapClient);
   }
 
Example 18
Source Project: SI   Source File: HeritHdhAbstractDAO.java    License: BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Resource(name="sqlMapClientHDH")
public void setSuperSqlMapClient(SqlMapClient sqlMapClient) {
       super.setSuperSqlMapClient(sqlMapClient);
   }
 
Example 19
Source Project: GameServer   Source File: DBUtil.java    License: Apache License 2.0 4 votes vote down vote up
public static SqlMapClient getRoledataSqlMapClient() {
	return roledataSqlMapClient;
}
 
Example 20
Source Project: GameServer   Source File: DBUtil.java    License: Apache License 2.0 4 votes vote down vote up
public static SqlMapClient getGamedataSqlMapClient() {
	return gamedataSqlMapClient;
}
 
Example 21
Source Project: SI   Source File: HeritCommonAbstractDAO.java    License: BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Resource(name="sqlMapClient")
public void setSuperSqlMapClient(SqlMapClient sqlMapClient) {
       super.setSuperSqlMapClient(sqlMapClient);
   }
 
Example 22
Source Project: SI   Source File: HeritHdmAbstractDAO.java    License: BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Resource(name="sqlMapClientHDM")
public void setSuperSqlMapClient(SqlMapClient sqlMapClient) {
       super.setSuperSqlMapClient(sqlMapClient);
   }
 
Example 23
Source Project: SI   Source File: HeritHdpAbstractDAO.java    License: BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Resource(name="sqlMapClientHDP")
public void setSuperSqlMapClient(SqlMapClient sqlMapClient) {
       super.setSuperSqlMapClient(sqlMapClient);
   }
 
Example 24
Source Project: SI   Source File: HeritHdhAbstractDAO.java    License: BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Resource(name="sqlMapClientHDH")
public void setSuperSqlMapClient(SqlMapClient sqlMapClient) {
       super.setSuperSqlMapClient(sqlMapClient);
   }
 
Example 25
Source Project: pinpoint   Source File: SqlMapClientIT.java    License: Apache License 2.0 4 votes vote down vote up
@Test
public void methodCallWithNullSqlIdShouldOnlyTraceMethodName() throws Exception {
    SqlMapClient sqlMapClient = new SqlMapClientImpl(super.mockSqlMapExecutorDelegate);
    super.testAndVerifyInsertWithNullSqlId(sqlMapClient);
}
 
Example 26
Source Project: pinpoint   Source File: SqlMapClientIT.java    License: Apache License 2.0 4 votes vote down vote up
@Test
public void insertShouldBeTraced() throws Exception {
    SqlMapClient sqlMapClient = new SqlMapClientImpl(super.mockSqlMapExecutorDelegate);
    super.testAndVerifyInsert(sqlMapClient);
}
 
Example 27
Source Project: pinpoint   Source File: SqlMapClientIT.java    License: Apache License 2.0 4 votes vote down vote up
@Test
public void deleteShouldBeTraced() throws Exception {
    SqlMapClient sqlMapClient = new SqlMapClientImpl(super.mockSqlMapExecutorDelegate);
    super.testAndVerifyDelete(sqlMapClient);
}
 
Example 28
Source Project: pinpoint   Source File: SqlMapClientIT.java    License: Apache License 2.0 4 votes vote down vote up
@Test
public void updateShouldBeTraced() throws Exception {
    SqlMapClient sqlMapClient = new SqlMapClientImpl(super.mockSqlMapExecutorDelegate);
    super.testAndVerifyUpdate(sqlMapClient);
}
 
Example 29
Source Project: pinpoint   Source File: SqlMapClientIT.java    License: Apache License 2.0 4 votes vote down vote up
@Test
public void queryForListShouldBeTraced() throws Exception {
    SqlMapClient sqlMapClient = new SqlMapClientImpl(super.mockSqlMapExecutorDelegate);
    super.testAndVerifyQueryForList(sqlMapClient);
}
 
Example 30
Source Project: pinpoint   Source File: SqlMapClientIT.java    License: Apache License 2.0 4 votes vote down vote up
@Test
public void queryForMapShouldBeTraced() throws Exception {
    SqlMapClient sqlMapClient = new SqlMapClientImpl(super.mockSqlMapExecutorDelegate);
    super.testAndVerifyQueryForMap(sqlMapClient);
}