<sqlMap namespace="user">

<typeAlias alias="user" type="com.javadigital.ykheo.model.UserInfo" />

<select id="find_userinfo" parameterClass="user" resultClass="user">

select * from p_userinfo

where 1=1

<dynamic prepend="AND">

<isNotNull>user_id = #user_id#</isNotNull>

</dynamic>

<dynamic prepend="AND">

<isNotNull>user_name = #user_name#</isNotNull>

</dynamic>

</select>

<insert id="insert_userinfo" parameterClass="user">

insert into p_userinfo(user_id, user_pass, user_name, user_address, 

user_phone, user_email, user_sex, user_age)

values(#user_id#, #user_pass#, #user_name#, #user_address#, 

#user_phone#, #user_email#, #user_sex#, #user_age#)

</insert>

<update id="update_userinfo" parameterClass="user">

update p_userinfo set user_pass="#user_pass#", user_name="#user_name#", 

user_address="#user_address#", user_phone="#user_phone#",

user_email="#user_email#", user_sex="#user_sex#",user_age="#user_age#"

where user_id=#user_id#

</update>

<delete id="delete_userinfo" parameterClass="user">

delete p_userinfo where user_id=#user_id#

</delete>

</sqlMap>

'강의노트 > Spring' 카테고리의 다른 글

[dao]UserDaoImpl.java  (0) 2013.09.04
[dao]IUserDao.java  (0) 2013.09.04
[model]UserInfo.java  (0) 2013.09.04
spring 전체개요  (0) 2013.08.29
로그인 파일생성 순서  (0) 2013.08.28