@Repository("userDao")

public class UserDaoImpl implements IUserDao {

@Autowired

SqlMapClientTemplate sqlMapClientTemplate;

@Autowired

UserInfo user_info;

@Override

public UserInfo findUserInfo(UserInfo user) throws SQLException {

// TODO Auto-generated method stub

UserInfo uInfo = (UserInfo)sqlMapClientTemplate.queryForObject("find_userinfo", user);

return uInfo;

}


@Override

public UserInfo insertUserInfo(UserInfo user) throws SQLException {

// TODO Auto-generated method stub

UserInfo uInfo = (UserInfo)sqlMapClientTemplate.insert("insert_userinfo", user);

return uInfo;

}


@Override

public int updateUserInfo(UserInfo user) throws SQLException {

// TODO Auto-generated method stub

int result = sqlMapClientTemplate.update("update_userinfo", user);

return result;

}


@Override

public int deleteUserInfo(UserInfo user) throws SQLException {

// TODO Auto-generated method stub

int result = sqlMapClientTemplate.delete("delete_userinfo", user);

return result;

}

}



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

[service]UserServiceImpl.java  (0) 2013.09.04
[service]IUserService.java  (0) 2013.09.04
[dao]IUserDao.java  (0) 2013.09.04
[resources]user_query.xml  (0) 2013.09.04
[model]UserInfo.java  (0) 2013.09.04