db 작업을 처리하는 MemberDAO class 를 만들기 전에 DAO interface를 만들어서
무엇을 만들어야하는지 가이드라인을 잡아보자.
interface name : DAOInter
package : net.member.db
import java.sql.SQLException;
import java.util.ArrayList;
public interface DAOInter {
public boolean insertMember(MemberDTO dto) throws SQLException;
public int userCheck(String id, String pw) throws SQLException;
public int confirmId(String id) throws SQLException;
public MemberDTO getMember(String id) throws SQLException;
public void updateMember(MemberDTO dto) throws SQLException;
public int deleteMember(String id, String pw) throws SQLException;
public MemberDTO findId(String name, String email, String phone) throws SQLException;
public boolean isAdmin(String id) throws Exception;
public ArrayList<MemberDTO> sampleTest() throws Exception;
}
굳이 interface 를 만들어서 꼭 구현해야 할 필요는 없지만 무엇을 만들어야하는지 미리 가이드를 잡아보는 느낌적인 느낌으로...
'WebStudy > MVC2기반 Shopping mall' 카테고리의 다른 글
Step 6 - Controller, Service, Forward 만들기 (0) | 2015.07.28 |
---|---|
Step 5 - memberDAO 만들기 (0) | 2015.07.28 |
Step 3 - 회원 정보를 담을 MemberDTO 만들기 (0) | 2015.07.27 |
Step 2 - MEMBER TABLE 구성 (0) | 2015.07.27 |
Step 1 - 프로젝트 생성 및 cos.ajr jstl.jar, context.xml 구성 (0) | 2015.07.27 |