DAO는 파라미터, 리턴 값 모두 HashMap<String, String> 으로 한다.
<!-- 타겟팅 전체 대상자 수 조회 및 쿼리 -->
<parameterMap id="paramMap" type="hashmap">
<parameter property="v_in_dimen_val1" mode="IN" jdbcType="VARCHAR" javaType="java.lang.String" />
<parameter property="v_in_dimen_val2" mode="IN" jdbcType="VARCHAR" javaType="java.lang.String" />
<parameter property="v_in_dimen_val3" mode="IN" jdbcType="VARCHAR" javaType="java.lang.String" />
<parameter property="v_in_where" mode="IN" jdbcType="VARCHAR" javaType="java.lang.String" />
<parameter property="v_out_cnt" mode="OUT" jdbcType="VARCHAR" javaType="string" />
<parameter property="v_out_query" mode="OUT" jdbcType="VARCHAR" javaType="string" />
<parameter property="v_in_target_id" mode="IN" jdbcType="VARCHAR" javaType="java.lang.String" />
<parameter property="v_in_query" mode="IN" jdbcType="VARCHAR" javaType="java.lang.String" />
<parameter property="v_out_save_yn" mode="OUT" jdbcType="VARCHAR" javaType="string" />
<parameter property="v_out_save_cnt" mode="OUT" jdbcType="VARCHAR" javaType="string" />
</parameterMap>
<select id="execTargetMemberCount" statementType="CALLABLE" parameterType="hashmap">
{
call SP_SCENARIO_TARGET_COUNT
(
#{v_in_dimen_val1, mode=IN, jdbcType=VARCHAR, javaType=string}
,#{v_in_dimen_val2, mode=IN, jdbcType=VARCHAR, javaType=string}
,#{v_in_dimen_val3, mode=IN, jdbcType=VARCHAR, javaType=string}
,#{v_in_where, mode=IN, jdbcType=VARCHAR, javaType=string}
,#{v_out_cnt, mode=OUT, jdbcType=VARCHAR, javaType=string}
,#{v_out_query, mode=OUT, jdbcType=VARCHAR, javaType=string}
)
}
</select>
<select id="execTargetMemberInsert" statementType="CALLABLE" parameterType="hashmap">
{
call SP_SCENARIO_TARGET_SAVE
(
#{v_in_target_id, mode=IN, jdbcType=VARCHAR, javaType=string}
,#{v_in_query, mode=IN, jdbcType=VARCHAR, javaType=string}
,#{v_out_save_yn, mode=OUT, jdbcType=VARCHAR, javaType=string}
,#{v_out_save_cnt, mode=OUT, jdbcType=VARCHAR, javaType=string}
)
}
</select>
'Java & Spring > iBatis & myBatis' 카테고리의 다른 글
[iBatis] dynamic prepend (0) | 2015.10.20 |
---|---|
[iBatis] 리스트 타입의 데이터를 in 조건으로 만들기 (0) | 2015.10.20 |
[iBatis] 자바에서 만든쿼리를 실행하기 (0) | 2015.09.16 |
[iBatis/myBatis] SELECT - INSERT를 할 때 (1) | 2015.09.09 |
[myBatis] 오라클 Long 컬럼 가져오기/조회하기 (0) | 2015.06.02 |
WRITTEN BY