com.ibatis.sqlmap.client.SqlMapClient Java Examples

The following examples show how to use com.ibatis.sqlmap.client.SqlMapClient. 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 File: IbatisTypeTest.java    From tddl5 with 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 #2
Source File: TddlIbatisTest.java    From tddl5 with 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 File: DBUtil.java    From GameServer with 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 #4
Source File: IbatisTypeTest.java    From tddl with 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 File: SqlMapClientIT.java    From pinpoint with 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 #6
Source File: HeritCommonAbstractDAO.java    From SI with BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Resource(name="sqlMapClient")
public void setSuperSqlMapClient(SqlMapClient sqlMapClient) {
       super.setSuperSqlMapClient(sqlMapClient);
   }
 
Example #7
Source File: HeritHdmAbstractDAO.java    From SI with BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Resource(name="sqlMapClientHDM")
public void setSuperSqlMapClient(SqlMapClient sqlMapClient) {
       super.setSuperSqlMapClient(sqlMapClient);
   }
 
Example #8
Source File: HeritHdpAbstractDAO.java    From SI with BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Resource(name="sqlMapClientHDP")
public void setSuperSqlMapClient(SqlMapClient sqlMapClient) {
       super.setSuperSqlMapClient(sqlMapClient);
   }
 
Example #9
Source File: HeritHdhAbstractDAO.java    From SI with BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Resource(name="sqlMapClientHDH")
public void setSuperSqlMapClient(SqlMapClient sqlMapClient) {
       super.setSuperSqlMapClient(sqlMapClient);
   }
 
Example #10
Source File: SqlMapClientIT.java    From pinpoint with 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 #11
Source File: SqlMapClientIT.java    From pinpoint with 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 #12
Source File: DefaultConcurrentRequestProcessor.java    From cobarclient with Apache License 2.0 4 votes vote down vote up
public SqlMapClient getSqlMapClient() {
    return sqlMapClient;
}
 
Example #13
Source File: SqlMapClientIT.java    From pinpoint with 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 #14
Source File: SqlMapClientIT.java    From pinpoint with 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 #15
Source File: SqlMapClientIT.java    From pinpoint with 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);
}
 
Example #16
Source File: SqlMapClientIT.java    From pinpoint with Apache License 2.0 4 votes vote down vote up
@Test
public void queryForObjectShouldBeTraced() throws Exception {
    SqlMapClient sqlMapClient = new SqlMapClientImpl(super.mockSqlMapExecutorDelegate);
    super.testAndVerifyQueryForObject(sqlMapClient);
}
 
Example #17
Source File: SqlMapClientIT.java    From pinpoint with Apache License 2.0 4 votes vote down vote up
@Test
public void queryForPaginagedListShouldBeTraced() throws Exception {
    SqlMapClient sqlMapClient = new SqlMapClientImpl(super.mockSqlMapExecutorDelegate);
    super.testAndVerifyQueryForPaginatedList(sqlMapClient);
}
 
Example #18
Source File: ProductDaoImpl.java    From maven-framework-project with MIT License 4 votes vote down vote up
public SqlMapClient getSqlMapClient() {
	return sqlMapClient;
}
 
Example #19
Source File: ProductDaoImpl.java    From maven-framework-project with MIT License 4 votes vote down vote up
@Resource(name="sqlMapClient")
public void setSqlMapClient(SqlMapClient sqlMapClient) {
	this.sqlMapClient = sqlMapClient;
}
 
Example #20
Source File: DefaultConcurrentRequestProcessor.java    From cobarclient with Apache License 2.0 4 votes vote down vote up
public DefaultConcurrentRequestProcessor(SqlMapClient sqlMapClient) {
    this.sqlMapClient = sqlMapClient;
}
 
Example #21
Source File: DefaultConcurrentRequestProcessor.java    From cobarclient with Apache License 2.0 4 votes vote down vote up
public void setSqlMapClient(SqlMapClient sqlMapClient) {
    Validate.notNull(sqlMapClient);
    this.sqlMapClient = sqlMapClient;
}
 
Example #22
Source File: ComOslitsAbstractDAO.java    From oslits with 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 #23
Source File: DBUtil.java    From GameServer with Apache License 2.0 4 votes vote down vote up
public static SqlMapClient getRoledataSqlMapClient() {
	return roledataSqlMapClient;
}
 
Example #24
Source File: EgovComAbstractDAO.java    From oslits with 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 #25
Source File: IbatisDaoImpl.java    From EserKnife with Apache License 2.0 4 votes vote down vote up
public void setSqlMapClient(SqlMapClient sqlMapClient) {
    this.sqlMapClientTemplate.setSqlMapClient(sqlMapClient);
}
 
Example #26
Source File: EserIbatisDaoImpl.java    From EserKnife with Apache License 2.0 4 votes vote down vote up
@Resource(name = "sqlMapClientCarMysql")
public void setSqlMapClientCarMysql(SqlMapClient sqlMapClient) {
    this.setSqlMapClient(sqlMapClient);
}
 
Example #27
Source File: BaseIbatisDaoSupport.java    From AsuraFramework with Apache License 2.0 4 votes vote down vote up
/**
 * @return the readSqlMapClient
 */
public SqlMapClient getReadSqlMapClient() {
	return readSqlMapClient;
}
 
Example #28
Source File: BaseIbatisDaoSupport.java    From AsuraFramework with 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 #29
Source File: BaseIbatisDaoSupport.java    From AsuraFramework with Apache License 2.0 4 votes vote down vote up
/**
 * @return the writeSqlMapClient
 */
public SqlMapClient getWriteSqlMapClient() {
	return writeSqlMapClient;
}
 
Example #30
Source File: BaseIbatisDaoSupport.java    From AsuraFramework with 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;
}