From 91289a41aaad96cad7f759f4735e04c589a7ffa0 Mon Sep 17 00:00:00 2001 From: Luna Date: Thu, 11 Jun 2020 22:25:38 +0900 Subject: [PATCH 01/14] initial commit --- src/web/dto/User_basic.java | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/web/dto/User_basic.java diff --git a/src/web/dto/User_basic.java b/src/web/dto/User_basic.java new file mode 100644 index 0000000..b5c067e --- /dev/null +++ b/src/web/dto/User_basic.java @@ -0,0 +1,24 @@ +package web.dto; + +public class User_basic { + private int userid; + private String username; + + @Override + public String toString() { + return "User_basic [userid=" + userid + ", username=" + username + "]"; + } + + public int getUserid() { + return userid; + } + public void setUserid(int userid) { + this.userid = userid; + } + public String getUsername() { + return username; + } + public void setUsername(String username) { + this.username = username; + } +} \ No newline at end of file From 796dc694793e88bf1e356b13db763c0d0164511f Mon Sep 17 00:00:00 2001 From: Luna Date: Thu, 11 Jun 2020 22:39:09 +0900 Subject: [PATCH 02/14] initial commit --- .../User_basicInsertController.java | 19 ++++ src/web/dao/face/User_basicDao.java | 5 + src/web/dao/impl/User_basicDaoImpl.java | 7 ++ src/web/service/face/User_basicService.java | 5 + .../service/impl/User_basicServiceImpl.java | 7 ++ src/web/util/JDBCTemplate.java | 104 ++++++++++++++++++ 6 files changed, 147 insertions(+) create mode 100644 src/web/controller/user_basic/User_basicInsertController.java create mode 100644 src/web/dao/face/User_basicDao.java create mode 100644 src/web/dao/impl/User_basicDaoImpl.java create mode 100644 src/web/service/face/User_basicService.java create mode 100644 src/web/service/impl/User_basicServiceImpl.java create mode 100644 src/web/util/JDBCTemplate.java diff --git a/src/web/controller/user_basic/User_basicInsertController.java b/src/web/controller/user_basic/User_basicInsertController.java new file mode 100644 index 0000000..2a5792c --- /dev/null +++ b/src/web/controller/user_basic/User_basicInsertController.java @@ -0,0 +1,19 @@ +package web.controller.user_basic; + +import java.io.IOException; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +@WebServlet("/userid/insert") +public class User_basicInsertController extends HttpServlet { + private static final long serialVersionUID = 1L; + + @Override + protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + + } +} \ No newline at end of file diff --git a/src/web/dao/face/User_basicDao.java b/src/web/dao/face/User_basicDao.java new file mode 100644 index 0000000..6a639fb --- /dev/null +++ b/src/web/dao/face/User_basicDao.java @@ -0,0 +1,5 @@ +package web.dao.face; + +public interface User_basicDao { + +} \ No newline at end of file diff --git a/src/web/dao/impl/User_basicDaoImpl.java b/src/web/dao/impl/User_basicDaoImpl.java new file mode 100644 index 0000000..e6f7651 --- /dev/null +++ b/src/web/dao/impl/User_basicDaoImpl.java @@ -0,0 +1,7 @@ +package web.dao.impl; + +import web.dao.face.User_basicDao; + +public class User_basicDaoImpl implements User_basicDao { + +} \ No newline at end of file diff --git a/src/web/service/face/User_basicService.java b/src/web/service/face/User_basicService.java new file mode 100644 index 0000000..9fff8e7 --- /dev/null +++ b/src/web/service/face/User_basicService.java @@ -0,0 +1,5 @@ +package web.service.face; + +public interface User_basicService { + +} \ No newline at end of file diff --git a/src/web/service/impl/User_basicServiceImpl.java b/src/web/service/impl/User_basicServiceImpl.java new file mode 100644 index 0000000..c0d66f6 --- /dev/null +++ b/src/web/service/impl/User_basicServiceImpl.java @@ -0,0 +1,7 @@ +package web.service.impl; + +import web.service.face.User_basicService; + +public class User_basicServiceImpl implements User_basicService { + +} \ No newline at end of file diff --git a/src/web/util/JDBCTemplate.java b/src/web/util/JDBCTemplate.java new file mode 100644 index 0000000..a033b75 --- /dev/null +++ b/src/web/util/JDBCTemplate.java @@ -0,0 +1,104 @@ +package web.util; + +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; + +//싱글톤 적용 객체 - DB연결 +// Connection객체를 하나만 만들어서 사용할 수 있게 만든다 +public class JDBCTemplate { + + //OJDBC 드라이버 + private static final String DRIVER = "oracle.jdbc.driver.OracleDriver"; + + //DB연결 정보 + private static final String URL = "jdbc:oracle:thin:@localhost:1521:xe"; + private static final String USERNAME = "scott"; + private static final String PASSWORD = "tiger"; + + //OJDBC 객체 + private static Connection conn = null; //DB연결객체 + + //private 생성자 - 외부에서 객체 생성하는 걸 막는 용도 + private JDBCTemplate() { } + + //Connection 객체 반환 - 싱글톤 패턴 적용 메소드 + public static Connection getConnection() { + + if( conn == null ) { //한번 생성된 객체를 유지하게 만듦 + try { + //----- 드라이버 로드 ----- + Class.forName(DRIVER); + + //----- DB 연결 ----- + conn = DriverManager.getConnection(URL, USERNAME, PASSWORD); + + } catch (ClassNotFoundException e) { + e.printStackTrace(); + } catch (SQLException e) { + e.printStackTrace(); + } + } + + return conn; //DB 연결 객체 반환 + } + + // commit 수행 메소드 + public static void commit(Connection conn) { + + try { + if(conn!=null && !conn.isClosed()) { // NULL이 아닐때, DB가 끊겨져 있지 않을때 + conn.commit(); + } + } catch (SQLException e) { + e.printStackTrace(); + } + } + + // rollback 수행 메소드 + public static void rollback(Connection conn) { + try { + if(conn!=null && !conn.isClosed()) { // NULL이 아닐때, DB가 끊겨져 있지 않을때 + conn.rollback(); + } + } catch (SQLException e) { + e.printStackTrace(); + } + } + + // DB연결 해제 + public static void close(Connection conn) { + try { + if(conn!=null && conn.isClosed()) { + conn.close(); + } + } catch (SQLException e) { + e.printStackTrace(); + } + } + + // SQL 수행객체 해제 + public static void close(PreparedStatement ps) { + try { + if(ps!=null && ps.isClosed()) { + ps.close(); + } + } catch (SQLException e) { + e.printStackTrace(); + } + } + + // 쿼리결과 객체 해제 + public static void close(ResultSet rs) { + try { + if(rs!=null && rs.isClosed()) { + rs.close(); + } + } catch (SQLException e) { + e.printStackTrace(); + } + } +} \ No newline at end of file From 97a258b521e9b54bfdc8b89bbda4064f04b383df Mon Sep 17 00:00:00 2001 From: Owner Date: Fri, 12 Jun 2020 00:42:11 +0900 Subject: [PATCH 03/14] document dto --- SemiProject/src/web/dto/Document.java | 77 +++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 SemiProject/src/web/dto/Document.java diff --git a/SemiProject/src/web/dto/Document.java b/SemiProject/src/web/dto/Document.java new file mode 100644 index 0000000..1cf76bc --- /dev/null +++ b/SemiProject/src/web/dto/Document.java @@ -0,0 +1,77 @@ +package web.dto; + +import java.util.Date; + +public class Document { + + private int doc_num; //문서번호 + private String doc_title; //문서제목 + private String doc_substance; //문서요지 + private String doc_content; //문서본문 + private String doc_state; //문서상태 + private int doc_userid; //작성자 사번 + private Date doc_date; //작성일시 + private String doc_emergency; //긴급여부 + + + + @Override + public String toString() { + return "Document [doc_num=" + doc_num + ", doc_title=" + doc_title + ", doc_substance=" + doc_substance + + ", doc_content=" + doc_content + ", doc_state=" + doc_state + ", doc_userid=" + doc_userid + + ", doc_date=" + doc_date + ", doc_emergency=" + doc_emergency + "]"; + } + public int getDoc_num() { + return doc_num; + } + public void setDoc_num(int doc_num) { + this.doc_num = doc_num; + } + public String getDoc_title() { + return doc_title; + } + public void setDoc_title(String doc_title) { + this.doc_title = doc_title; + } + public String getDoc_substance() { + return doc_substance; + } + public void setDoc_substance(String doc_substance) { + this.doc_substance = doc_substance; + } + public String getDoc_content() { + return doc_content; + } + public void setDoc_content(String doc_content) { + this.doc_content = doc_content; + } + public String getDoc_state() { + return doc_state; + } + public void setDoc_state(String doc_state) { + this.doc_state = doc_state; + } + public int getDoc_userid() { + return doc_userid; + } + public void setDoc_userid(int doc_userid) { + this.doc_userid = doc_userid; + } + public Date getDoc_date() { + return doc_date; + } + public void setDoc_date(Date doc_date) { + this.doc_date = doc_date; + } + public String getDoc_emergency() { + return doc_emergency; + } + public void setDoc_emergency(String doc_emergency) { + this.doc_emergency = doc_emergency; + } + + + + + +} From 92fadbe59ce5663d53d6776fb42dfc455596e23c Mon Sep 17 00:00:00 2001 From: Owner Date: Fri, 12 Jun 2020 00:55:04 +0900 Subject: [PATCH 04/14] document dto --- SemiProject/src/web/dto/Document.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SemiProject/src/web/dto/Document.java b/SemiProject/src/web/dto/Document.java index 1cf76bc..7fb77bc 100644 --- a/SemiProject/src/web/dto/Document.java +++ b/SemiProject/src/web/dto/Document.java @@ -11,6 +11,9 @@ public class Document { private String doc_state; //문서상태 private int doc_userid; //작성자 사번 private Date doc_date; //작성일시 + + + private String doc_emergency; //긴급여부 From 59b6b2e402e34c8b45879ac67a9e65f6bcc0647e Mon Sep 17 00:00:00 2001 From: Owner Date: Fri, 12 Jun 2020 01:00:28 +0900 Subject: [PATCH 05/14] document --- .../src/web/dao/impl/DocumentDaoImpl.java | 79 +++++++++++++++++++ .../src/web/service/face/DocumentService.java | 32 ++++++++ .../web/service/impl/DocumentServiceImpl.java | 78 ++++++++++++++++++ 3 files changed, 189 insertions(+) create mode 100644 SemiProject/src/web/dao/impl/DocumentDaoImpl.java create mode 100644 SemiProject/src/web/service/face/DocumentService.java create mode 100644 SemiProject/src/web/service/impl/DocumentServiceImpl.java diff --git a/SemiProject/src/web/dao/impl/DocumentDaoImpl.java b/SemiProject/src/web/dao/impl/DocumentDaoImpl.java new file mode 100644 index 0000000..3b8ea64 --- /dev/null +++ b/SemiProject/src/web/dao/impl/DocumentDaoImpl.java @@ -0,0 +1,79 @@ +package web.dao.impl; + +import java.sql.Connection; +import java.util.List; + +import web.dao.face.DocumentDao; +import web.dto.Document; + +public class DocumentDaoImpl implements DocumentDao{ + + @Override + public List selectDocTmp() { + // TODO Auto-generated method stub + return null; + } + + @Override + public List selectDocWaitAppro() { + // TODO Auto-generated method stub + return null; + } + + @Override + public List selectDocProg() { + // TODO Auto-generated method stub + return null; + } + + @Override + public List selectDocDraft() { + // TODO Auto-generated method stub + return null; + } + + @Override + public List selectDocAppro() { + // TODO Auto-generated method stub + return null; + } + + @Override + public List selectDocAll() { + // TODO Auto-generated method stub + return null; + } + + @Override + public Document selectDocByDocnum() { + // TODO Auto-generated method stub + return null; + } + + @Override + public int insertDoc(Connection conn, Document doc) { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int updateDoc(Connection conn, Document doc) { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int deleteDoc(Connection conn, Document doc) { + // TODO Auto-generated method stub + return 0; + } + + @Override + public Document selectDocument(Document doc) { + // TODO Auto-generated method stub + return null; + } + + + +} diff --git a/SemiProject/src/web/service/face/DocumentService.java b/SemiProject/src/web/service/face/DocumentService.java new file mode 100644 index 0000000..494cac5 --- /dev/null +++ b/SemiProject/src/web/service/face/DocumentService.java @@ -0,0 +1,32 @@ +package web.service.face; + +import java.sql.Connection; +import java.util.List; + +import web.dto.Document; + +public interface DocumentService { + + public List selectDocTmp(); + + public List selectDocWaitAppro(); + + public List selectDocProg(); + + public List selectDocDraft(); + + public List selectDocAppro(); + + public List selectDocAll(); + + public Document selectDocByDocnum(); + + public void insertDoc(Connection conn, Document doc); + + public void updateDoc(Connection conn, Document doc); + + public void deleteDoc(Connection conn, Document doc); + + public Document selectDocument(Document doc); + +} diff --git a/SemiProject/src/web/service/impl/DocumentServiceImpl.java b/SemiProject/src/web/service/impl/DocumentServiceImpl.java new file mode 100644 index 0000000..6790c79 --- /dev/null +++ b/SemiProject/src/web/service/impl/DocumentServiceImpl.java @@ -0,0 +1,78 @@ +package web.service.impl; + +import java.sql.Connection; +import java.util.List; + +import web.dto.Document; +import web.service.face.DocumentService; + +public class DocumentServiceImpl implements DocumentService{ + + @Override + public List selectDocTmp() { + // TODO Auto-generated method stub + return null; + } + + @Override + public List selectDocWaitAppro() { + // TODO Auto-generated method stub + return null; + } + + @Override + public List selectDocProg() { + // TODO Auto-generated method stub + return null; + } + + @Override + public List selectDocDraft() { + // TODO Auto-generated method stub + return null; + } + + @Override + public List selectDocAppro() { + // TODO Auto-generated method stub + return null; + } + + @Override + public List selectDocAll() { + // TODO Auto-generated method stub + return null; + } + + @Override + public Document selectDocByDocnum() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void insertDoc(Connection conn, Document doc) { + // TODO Auto-generated method stub + + } + + @Override + public void updateDoc(Connection conn, Document doc) { + // TODO Auto-generated method stub + + } + + @Override + public void deleteDoc(Connection conn, Document doc) { + // TODO Auto-generated method stub + + } + + @Override + public Document selectDocument(Document doc) { + // TODO Auto-generated method stub + return null; + } + + +} From 26a4734a5f13230c6e36cfc72f54c2783f9039a3 Mon Sep 17 00:00:00 2001 From: Owner Date: Fri, 12 Jun 2020 01:01:53 +0900 Subject: [PATCH 06/14] document --- SemiProject/src/web/dao/face/DocumentDao.java | 33 +++++++++++++++++++ SemiProject/src/web/dto/Document.java | 3 -- 2 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 SemiProject/src/web/dao/face/DocumentDao.java diff --git a/SemiProject/src/web/dao/face/DocumentDao.java b/SemiProject/src/web/dao/face/DocumentDao.java new file mode 100644 index 0000000..623edaa --- /dev/null +++ b/SemiProject/src/web/dao/face/DocumentDao.java @@ -0,0 +1,33 @@ +package web.dao.face; + +import java.sql.Connection; +import java.util.List; + +import web.dto.Document; + +public interface DocumentDao { + + public List selectDocTmp(); + + public List selectDocWaitAppro(); + + public List selectDocProg(); + + public List selectDocDraft(); + + public List selectDocAppro(); + + public List selectDocAll(); + + public Document selectDocByDocnum(); + + public int insertDoc(Connection conn, Document doc); + + public int updateDoc(Connection conn, Document doc); + + public int deleteDoc(Connection conn, Document doc); + + public Document selectDocument(Document doc); + + +} diff --git a/SemiProject/src/web/dto/Document.java b/SemiProject/src/web/dto/Document.java index 7fb77bc..1cf76bc 100644 --- a/SemiProject/src/web/dto/Document.java +++ b/SemiProject/src/web/dto/Document.java @@ -11,9 +11,6 @@ public class Document { private String doc_state; //문서상태 private int doc_userid; //작성자 사번 private Date doc_date; //작성일시 - - - private String doc_emergency; //긴급여부 From 87fc59c03a70278febf0875a20a5fc57baf44a6e Mon Sep 17 00:00:00 2001 From: Owner Date: Fri, 12 Jun 2020 01:10:23 +0900 Subject: [PATCH 07/14] document --- ActiveWare/src/web/dao/face/DocumentDao.java | 33 ++++++++ .../src/web/dao/impl/DocumentDaoImpl.java | 79 +++++++++++++++++++ ActiveWare/src/web/dto/Document.java | 78 ++++++++++++++++++ .../src/web/service/face/DocumentService.java | 32 ++++++++ .../web/service/impl/DocumentServiceImpl.java | 78 ++++++++++++++++++ 5 files changed, 300 insertions(+) create mode 100644 ActiveWare/src/web/dao/face/DocumentDao.java create mode 100644 ActiveWare/src/web/dao/impl/DocumentDaoImpl.java create mode 100644 ActiveWare/src/web/dto/Document.java create mode 100644 ActiveWare/src/web/service/face/DocumentService.java create mode 100644 ActiveWare/src/web/service/impl/DocumentServiceImpl.java diff --git a/ActiveWare/src/web/dao/face/DocumentDao.java b/ActiveWare/src/web/dao/face/DocumentDao.java new file mode 100644 index 0000000..623edaa --- /dev/null +++ b/ActiveWare/src/web/dao/face/DocumentDao.java @@ -0,0 +1,33 @@ +package web.dao.face; + +import java.sql.Connection; +import java.util.List; + +import web.dto.Document; + +public interface DocumentDao { + + public List selectDocTmp(); + + public List selectDocWaitAppro(); + + public List selectDocProg(); + + public List selectDocDraft(); + + public List selectDocAppro(); + + public List selectDocAll(); + + public Document selectDocByDocnum(); + + public int insertDoc(Connection conn, Document doc); + + public int updateDoc(Connection conn, Document doc); + + public int deleteDoc(Connection conn, Document doc); + + public Document selectDocument(Document doc); + + +} diff --git a/ActiveWare/src/web/dao/impl/DocumentDaoImpl.java b/ActiveWare/src/web/dao/impl/DocumentDaoImpl.java new file mode 100644 index 0000000..3b8ea64 --- /dev/null +++ b/ActiveWare/src/web/dao/impl/DocumentDaoImpl.java @@ -0,0 +1,79 @@ +package web.dao.impl; + +import java.sql.Connection; +import java.util.List; + +import web.dao.face.DocumentDao; +import web.dto.Document; + +public class DocumentDaoImpl implements DocumentDao{ + + @Override + public List selectDocTmp() { + // TODO Auto-generated method stub + return null; + } + + @Override + public List selectDocWaitAppro() { + // TODO Auto-generated method stub + return null; + } + + @Override + public List selectDocProg() { + // TODO Auto-generated method stub + return null; + } + + @Override + public List selectDocDraft() { + // TODO Auto-generated method stub + return null; + } + + @Override + public List selectDocAppro() { + // TODO Auto-generated method stub + return null; + } + + @Override + public List selectDocAll() { + // TODO Auto-generated method stub + return null; + } + + @Override + public Document selectDocByDocnum() { + // TODO Auto-generated method stub + return null; + } + + @Override + public int insertDoc(Connection conn, Document doc) { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int updateDoc(Connection conn, Document doc) { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int deleteDoc(Connection conn, Document doc) { + // TODO Auto-generated method stub + return 0; + } + + @Override + public Document selectDocument(Document doc) { + // TODO Auto-generated method stub + return null; + } + + + +} diff --git a/ActiveWare/src/web/dto/Document.java b/ActiveWare/src/web/dto/Document.java new file mode 100644 index 0000000..fe4e2b9 --- /dev/null +++ b/ActiveWare/src/web/dto/Document.java @@ -0,0 +1,78 @@ +package web.dto; + +import java.util.Date; + +public class Document { + + private int doc_num; //문서번호 + private String doc_title; //문서제목 + private String doc_substance; //문서요지 + private String doc_content; //문서본문 + private String doc_state; //문서상태 + private int doc_userid; //작성자 사번 + private Date doc_date; //작성일시 + private String doc_emergency; //긴급여부 + + + + + @Override + public String toString() { + return "Document [doc_num=" + doc_num + ", doc_title=" + doc_title + ", doc_substance=" + doc_substance + + ", doc_content=" + doc_content + ", doc_state=" + doc_state + ", doc_userid=" + doc_userid + + ", doc_date=" + doc_date + ", doc_emergency=" + doc_emergency + "]"; + } + public int getDoc_num() { + return doc_num; + } + public void setDoc_num(int doc_num) { + this.doc_num = doc_num; + } + public String getDoc_title() { + return doc_title; + } + public void setDoc_title(String doc_title) { + this.doc_title = doc_title; + } + public String getDoc_substance() { + return doc_substance; + } + public void setDoc_substance(String doc_substance) { + this.doc_substance = doc_substance; + } + public String getDoc_content() { + return doc_content; + } + public void setDoc_content(String doc_content) { + this.doc_content = doc_content; + } + public String getDoc_state() { + return doc_state; + } + public void setDoc_state(String doc_state) { + this.doc_state = doc_state; + } + public int getDoc_userid() { + return doc_userid; + } + public void setDoc_userid(int doc_userid) { + this.doc_userid = doc_userid; + } + public Date getDoc_date() { + return doc_date; + } + public void setDoc_date(Date doc_date) { + this.doc_date = doc_date; + } + public String getDoc_emergency() { + return doc_emergency; + } + public void setDoc_emergency(String doc_emergency) { + this.doc_emergency = doc_emergency; + } + + + + + +} diff --git a/ActiveWare/src/web/service/face/DocumentService.java b/ActiveWare/src/web/service/face/DocumentService.java new file mode 100644 index 0000000..494cac5 --- /dev/null +++ b/ActiveWare/src/web/service/face/DocumentService.java @@ -0,0 +1,32 @@ +package web.service.face; + +import java.sql.Connection; +import java.util.List; + +import web.dto.Document; + +public interface DocumentService { + + public List selectDocTmp(); + + public List selectDocWaitAppro(); + + public List selectDocProg(); + + public List selectDocDraft(); + + public List selectDocAppro(); + + public List selectDocAll(); + + public Document selectDocByDocnum(); + + public void insertDoc(Connection conn, Document doc); + + public void updateDoc(Connection conn, Document doc); + + public void deleteDoc(Connection conn, Document doc); + + public Document selectDocument(Document doc); + +} diff --git a/ActiveWare/src/web/service/impl/DocumentServiceImpl.java b/ActiveWare/src/web/service/impl/DocumentServiceImpl.java new file mode 100644 index 0000000..6790c79 --- /dev/null +++ b/ActiveWare/src/web/service/impl/DocumentServiceImpl.java @@ -0,0 +1,78 @@ +package web.service.impl; + +import java.sql.Connection; +import java.util.List; + +import web.dto.Document; +import web.service.face.DocumentService; + +public class DocumentServiceImpl implements DocumentService{ + + @Override + public List selectDocTmp() { + // TODO Auto-generated method stub + return null; + } + + @Override + public List selectDocWaitAppro() { + // TODO Auto-generated method stub + return null; + } + + @Override + public List selectDocProg() { + // TODO Auto-generated method stub + return null; + } + + @Override + public List selectDocDraft() { + // TODO Auto-generated method stub + return null; + } + + @Override + public List selectDocAppro() { + // TODO Auto-generated method stub + return null; + } + + @Override + public List selectDocAll() { + // TODO Auto-generated method stub + return null; + } + + @Override + public Document selectDocByDocnum() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void insertDoc(Connection conn, Document doc) { + // TODO Auto-generated method stub + + } + + @Override + public void updateDoc(Connection conn, Document doc) { + // TODO Auto-generated method stub + + } + + @Override + public void deleteDoc(Connection conn, Document doc) { + // TODO Auto-generated method stub + + } + + @Override + public Document selectDocument(Document doc) { + // TODO Auto-generated method stub + return null; + } + + +} From 52dc557c90f1757304c6a0a72e77d2a2fd9eca47 Mon Sep 17 00:00:00 2001 From: Luna Date: Fri, 12 Jun 2020 02:28:32 +0900 Subject: [PATCH 08/14] doc_attach --- .../src/web/dao/face/Doc_attachDao.java | 52 ++++++++++++++++++ .../src/web/dao/impl/Doc_attachDaoImpl.java | 33 +++++++++++ ActiveWare/src/web/dto/Doc_attach.java | 55 +++++++++++++++++++ .../web/service/face/Doc_attachService.java | 38 +++++++++++++ .../service/impl/Doc_attachServiceImpl.java | 28 ++++++++++ 5 files changed, 206 insertions(+) create mode 100644 ActiveWare/src/web/dao/face/Doc_attachDao.java create mode 100644 ActiveWare/src/web/dao/impl/Doc_attachDaoImpl.java create mode 100644 ActiveWare/src/web/dto/Doc_attach.java create mode 100644 ActiveWare/src/web/service/face/Doc_attachService.java create mode 100644 ActiveWare/src/web/service/impl/Doc_attachServiceImpl.java diff --git a/ActiveWare/src/web/dao/face/Doc_attachDao.java b/ActiveWare/src/web/dao/face/Doc_attachDao.java new file mode 100644 index 0000000..da2114d --- /dev/null +++ b/ActiveWare/src/web/dao/face/Doc_attachDao.java @@ -0,0 +1,52 @@ +package web.dao.face; + +import java.sql.Connection; + +import web.dto.Doc_attach; + +public interface Doc_attachDao { + + /** + * 첨부파일 추가 + * + * @param conn - DB 연결객체 + * @param doc_attach - doc_attach 객체 정보 + * @return int - insert 수행결과 + * 1 - insert 성공 + * 0 - insert 실패 + */ + public int insertDoc_attach(Connection conn, Doc_attach doc_attach); + + + /** + * 첨부파일 수정 + * + * @param conn - DB 연결객체 + * @param doc_attach - doc_attach 객체 정보 + * @return int - insert 수행결과 + * 1 - insert 성공 + * 0 - insert 실패 + */ + public int updateDoc_attach(Connection conn, Doc_attach doc_attach); + + + /** + * 첨부파일 삭제 + * + * @param conn - DB 연결객체 + * @param doc_attach - doc_attach 객체 정보 + * @return int - insert 수행결과 + * 1 - insert 성공 + * 0 - insert 실패 + */ + public int deleteDoc_attach(Connection conn, Doc_attach doc_attach); + + + /** + * 문서정보창에 필요한 조회 + * + * @param doc_attach - 조회할 첨부파일 정보 + * @return Doc_attach - 조회된 첨부파일 정보 + */ + public Doc_attach selectDocAttach(Doc_attach doc_attach); +} \ No newline at end of file diff --git a/ActiveWare/src/web/dao/impl/Doc_attachDaoImpl.java b/ActiveWare/src/web/dao/impl/Doc_attachDaoImpl.java new file mode 100644 index 0000000..736e290 --- /dev/null +++ b/ActiveWare/src/web/dao/impl/Doc_attachDaoImpl.java @@ -0,0 +1,33 @@ +package web.dao.impl; + +import java.sql.Connection; + +import web.dao.face.Doc_attachDao; +import web.dto.Doc_attach; + +public class Doc_attachDaoImpl implements Doc_attachDao { + + @Override + public int insertDoc_attach(Connection conn, Doc_attach doc_attach) { + + return 0; + } + + @Override + public int updateDoc_attach(Connection conn, Doc_attach doc_attach) { + + return 0; + } + + @Override + public int deleteDoc_attach(Connection conn, Doc_attach doc_attach) { + + return 0; + } + + @Override + public Doc_attach selectDocAttach(Doc_attach doc_attach) { + + return null; + } +} \ No newline at end of file diff --git a/ActiveWare/src/web/dto/Doc_attach.java b/ActiveWare/src/web/dto/Doc_attach.java new file mode 100644 index 0000000..f3f3825 --- /dev/null +++ b/ActiveWare/src/web/dto/Doc_attach.java @@ -0,0 +1,55 @@ +package web.dto; + +public class Doc_attach { + private int attach_num; // 첨부파일번호 + private int doc_num; // 문서번호 + private String attach_name; // 첨부파일명 + private String attach_ext; // 첨부파일확장자 + private int attach_size; // 첨부파일크기 + + @Override + public String toString() { + return "Doc_attach [attach_num=" + attach_num + ", doc_num=" + doc_num + ", attach_name=" + attach_name + + ", attach_ext=" + attach_ext + ", attach_size=" + attach_size + "]"; + } + + public int getAttach_num() { + return attach_num; + } + + public void setAttach_num(int attach_num) { + this.attach_num = attach_num; + } + + public int getDoc_num() { + return doc_num; + } + + public void setDoc_num(int doc_num) { + this.doc_num = doc_num; + } + + public String getAttach_name() { + return attach_name; + } + + public void setAttach_name(String attach_name) { + this.attach_name = attach_name; + } + + public String getAttach_ext() { + return attach_ext; + } + + public void setAttach_ext(String attach_ext) { + this.attach_ext = attach_ext; + } + + public int getAttach_size() { + return attach_size; + } + + public void setAttach_size(int attach_size) { + this.attach_size = attach_size; + } +} \ No newline at end of file diff --git a/ActiveWare/src/web/service/face/Doc_attachService.java b/ActiveWare/src/web/service/face/Doc_attachService.java new file mode 100644 index 0000000..289f3d7 --- /dev/null +++ b/ActiveWare/src/web/service/face/Doc_attachService.java @@ -0,0 +1,38 @@ +package web.service.face; + +import web.dto.Doc_attach; + +public interface Doc_attachService { + + /** + * 첨부파일 추가 + * + * @param doc_attach - doc_attach 객체 정보 + */ + public void insertDoc_attach(Doc_attach doc_attach); + + + /** + * 첨부파일 수정 + * + * @param doc_attach - doc_attach 객체 정보 + */ + public void updateDoc_attach(Doc_attach doc_attach); + + + /** + * 첨부파일 삭제 + * + * @param doc_attach - doc_attach 객체 정보 + */ + public void deleteDoc_attach(Doc_attach doc_attach); + + + /** + * 문서정보창에 필요한 조회 + * + * @param doc_attach - doc_attach 객체 정보 + * @return Doc_attach - 조회된 첨부파일 정보 + */ + public Doc_attach selectDoc_attach(Doc_attach doc_attach); +} \ No newline at end of file diff --git a/ActiveWare/src/web/service/impl/Doc_attachServiceImpl.java b/ActiveWare/src/web/service/impl/Doc_attachServiceImpl.java new file mode 100644 index 0000000..f2e892a --- /dev/null +++ b/ActiveWare/src/web/service/impl/Doc_attachServiceImpl.java @@ -0,0 +1,28 @@ +package web.service.impl; + +import web.dto.Doc_attach; +import web.service.face.Doc_attachService; + +public class Doc_attachServiceImpl implements Doc_attachService { + + @Override + public void insertDoc_attach(Doc_attach doc_attach) { + + } + + @Override + public void updateDoc_attach(Doc_attach doc_attach) { + + } + + @Override + public void deleteDoc_attach(Doc_attach doc_attach) { + + } + + @Override + public Doc_attach selectDoc_attach(Doc_attach doc_attach) { + + return null; + } +} \ No newline at end of file From 975027bd2e8ac70539d13155af45a3a73f4151ed Mon Sep 17 00:00:00 2001 From: Luna Date: Fri, 12 Jun 2020 02:29:08 +0900 Subject: [PATCH 09/14] doc_comment --- .../src/web/dao/face/Doc_commentDao.java | 37 +++++++++++ .../src/web/dao/impl/Doc_commentDaoImpl.java | 27 ++++++++ ActiveWare/src/web/dto/Doc_comment.java | 66 +++++++++++++++++++ .../web/service/face/Doc_commentService.java | 33 ++++++++++ .../service/impl/Doc_commentServiceImpl.java | 25 +++++++ 5 files changed, 188 insertions(+) create mode 100644 ActiveWare/src/web/dao/face/Doc_commentDao.java create mode 100644 ActiveWare/src/web/dao/impl/Doc_commentDaoImpl.java create mode 100644 ActiveWare/src/web/dto/Doc_comment.java create mode 100644 ActiveWare/src/web/service/face/Doc_commentService.java create mode 100644 ActiveWare/src/web/service/impl/Doc_commentServiceImpl.java diff --git a/ActiveWare/src/web/dao/face/Doc_commentDao.java b/ActiveWare/src/web/dao/face/Doc_commentDao.java new file mode 100644 index 0000000..4b8c99b --- /dev/null +++ b/ActiveWare/src/web/dao/face/Doc_commentDao.java @@ -0,0 +1,37 @@ +package web.dao.face; + +import java.sql.Connection; + +import web.dto.Doc_comment; + +public interface Doc_commentDao { + + /** + * 문서번호로 의견/지시 조회 + * + * @param doc_num - 조회할 문서번호 + * @return Doc_comment - 조회한 의견/지시 정보 + */ + public Doc_comment selectDoc_commentByDocnum(int doc_num); + + + /** + * 의견/지시 추가 + * + * @param conn - DB 연결객체 + * @param doc_comment - 추가할 doc_comment 객체정보 + * @return int - insert 수행결과 + * 1 - insert 성공 + * 0 - insert 실패 + */ + public int insertDoc_comment(Connection conn, Doc_comment doc_comment); + + + /** + * 문서정보창에 필요한 조회 + * + * @param doc_comment - 조회할 의견/지시 정보 + * @return Doc_comment - 조회된 의견/지시 정보 + */ + public Doc_comment selectDoc_comment(Doc_comment doc_comment); +} \ No newline at end of file diff --git a/ActiveWare/src/web/dao/impl/Doc_commentDaoImpl.java b/ActiveWare/src/web/dao/impl/Doc_commentDaoImpl.java new file mode 100644 index 0000000..2e953af --- /dev/null +++ b/ActiveWare/src/web/dao/impl/Doc_commentDaoImpl.java @@ -0,0 +1,27 @@ +package web.dao.impl; + +import java.sql.Connection; + +import web.dao.face.Doc_commentDao; +import web.dto.Doc_comment; + +public class Doc_commentDaoImpl implements Doc_commentDao { + + @Override + public Doc_comment selectDoc_commentByDocnum(int doc_num) { + + return null; + } + + @Override + public int insertDoc_comment(Connection conn, Doc_comment doc_comment) { + + return 0; + } + + @Override + public Doc_comment selectDoc_comment(Doc_comment doc_comment) { + + return null; + } +} \ No newline at end of file diff --git a/ActiveWare/src/web/dto/Doc_comment.java b/ActiveWare/src/web/dto/Doc_comment.java new file mode 100644 index 0000000..932f26a --- /dev/null +++ b/ActiveWare/src/web/dto/Doc_comment.java @@ -0,0 +1,66 @@ +package web.dto; + +import java.sql.Date; + +public class Doc_comment { + private int comm_num; // 의견/지시 번호 + private int doc_num; // 문서번호 + private String comm_sign; // 결재종류 + private int receiver_id; // 결재자 + private String comm_content;// 의견/지시 + private Date comm_date; // 처리시간 + + @Override + public String toString() { + return "Doc_comment [comm_num=" + comm_num + ", doc_num=" + doc_num + ", comm_sign=" + comm_sign + + ", receiver_id=" + receiver_id + ", comm_content=" + comm_content + ", comm_date=" + comm_date + "]"; + } + + public int getComm_num() { + return comm_num; + } + + public void setComm_num(int comm_num) { + this.comm_num = comm_num; + } + + public int getDoc_num() { + return doc_num; + } + + public void setDoc_num(int doc_num) { + this.doc_num = doc_num; + } + + public String getComm_sign() { + return comm_sign; + } + + public void setComm_sign(String comm_sign) { + this.comm_sign = comm_sign; + } + + public int getReceiver_id() { + return receiver_id; + } + + public void setReceiver_id(int receiver_id) { + this.receiver_id = receiver_id; + } + + public String getComm_content() { + return comm_content; + } + + public void setComm_content(String comm_content) { + this.comm_content = comm_content; + } + + public Date getComm_date() { + return comm_date; + } + + public void setComm_date(Date comm_date) { + this.comm_date = comm_date; + } +} \ No newline at end of file diff --git a/ActiveWare/src/web/service/face/Doc_commentService.java b/ActiveWare/src/web/service/face/Doc_commentService.java new file mode 100644 index 0000000..bc1bf6c --- /dev/null +++ b/ActiveWare/src/web/service/face/Doc_commentService.java @@ -0,0 +1,33 @@ +package web.service.face; + +import java.sql.Connection; + +import web.dto.Doc_comment; + +public interface Doc_commentService { + + /** + * 문서번호로 의견/지시 조회 + * + * @param doc_num - 조회할 문서번호 + * @return Doc_comment - 조회한 의견/지시 정보 + */ + public Doc_comment selectDoc_commentByDocnum(int doc_num); + + + /** + * 의견/지시 추가 + * + * @param doc_comment - 추가할 doc_comment 객체정보 + */ + public void insertDoc_comment(Doc_comment doc_comment); + + + /** + * 문서정보창에 필요한 조회 + * + * @param doc_comment - 조회할 의견/지시 정보 + * @return Doc_comment - 조회된 의견/지시 정보 + */ + public Doc_comment selectDoc_comment(Doc_comment doc_comment); +} \ No newline at end of file diff --git a/ActiveWare/src/web/service/impl/Doc_commentServiceImpl.java b/ActiveWare/src/web/service/impl/Doc_commentServiceImpl.java new file mode 100644 index 0000000..95d479f --- /dev/null +++ b/ActiveWare/src/web/service/impl/Doc_commentServiceImpl.java @@ -0,0 +1,25 @@ +package web.service.impl; + +import web.dto.Doc_comment; +import web.service.face.Doc_commentService; + +public class Doc_commentServiceImpl implements Doc_commentService { + + @Override + public Doc_comment selectDoc_commentByDocnum(int doc_num) { + + return null; + } + + @Override + public void insertDoc_comment(Doc_comment doc_comment) { + + + } + + @Override + public Doc_comment selectDoc_comment(Doc_comment doc_comment) { + + return null; + } +} \ No newline at end of file From 002451be9f90afa42251b5e2d75e1145a396b64e Mon Sep 17 00:00:00 2001 From: Luna Date: Fri, 12 Jun 2020 02:29:23 +0900 Subject: [PATCH 10/14] JDBC --- ActiveWare/src/web/util/JDBCTemplate.java | 104 ++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 ActiveWare/src/web/util/JDBCTemplate.java diff --git a/ActiveWare/src/web/util/JDBCTemplate.java b/ActiveWare/src/web/util/JDBCTemplate.java new file mode 100644 index 0000000..a033b75 --- /dev/null +++ b/ActiveWare/src/web/util/JDBCTemplate.java @@ -0,0 +1,104 @@ +package web.util; + +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; + +//싱글톤 적용 객체 - DB연결 +// Connection객체를 하나만 만들어서 사용할 수 있게 만든다 +public class JDBCTemplate { + + //OJDBC 드라이버 + private static final String DRIVER = "oracle.jdbc.driver.OracleDriver"; + + //DB연결 정보 + private static final String URL = "jdbc:oracle:thin:@localhost:1521:xe"; + private static final String USERNAME = "scott"; + private static final String PASSWORD = "tiger"; + + //OJDBC 객체 + private static Connection conn = null; //DB연결객체 + + //private 생성자 - 외부에서 객체 생성하는 걸 막는 용도 + private JDBCTemplate() { } + + //Connection 객체 반환 - 싱글톤 패턴 적용 메소드 + public static Connection getConnection() { + + if( conn == null ) { //한번 생성된 객체를 유지하게 만듦 + try { + //----- 드라이버 로드 ----- + Class.forName(DRIVER); + + //----- DB 연결 ----- + conn = DriverManager.getConnection(URL, USERNAME, PASSWORD); + + } catch (ClassNotFoundException e) { + e.printStackTrace(); + } catch (SQLException e) { + e.printStackTrace(); + } + } + + return conn; //DB 연결 객체 반환 + } + + // commit 수행 메소드 + public static void commit(Connection conn) { + + try { + if(conn!=null && !conn.isClosed()) { // NULL이 아닐때, DB가 끊겨져 있지 않을때 + conn.commit(); + } + } catch (SQLException e) { + e.printStackTrace(); + } + } + + // rollback 수행 메소드 + public static void rollback(Connection conn) { + try { + if(conn!=null && !conn.isClosed()) { // NULL이 아닐때, DB가 끊겨져 있지 않을때 + conn.rollback(); + } + } catch (SQLException e) { + e.printStackTrace(); + } + } + + // DB연결 해제 + public static void close(Connection conn) { + try { + if(conn!=null && conn.isClosed()) { + conn.close(); + } + } catch (SQLException e) { + e.printStackTrace(); + } + } + + // SQL 수행객체 해제 + public static void close(PreparedStatement ps) { + try { + if(ps!=null && ps.isClosed()) { + ps.close(); + } + } catch (SQLException e) { + e.printStackTrace(); + } + } + + // 쿼리결과 객체 해제 + public static void close(ResultSet rs) { + try { + if(rs!=null && rs.isClosed()) { + rs.close(); + } + } catch (SQLException e) { + e.printStackTrace(); + } + } +} \ No newline at end of file From edfb50a5755bbe1c6facd212249ee2b5c06a3320 Mon Sep 17 00:00:00 2001 From: Luna Date: Fri, 12 Jun 2020 02:29:41 +0900 Subject: [PATCH 11/14] report_link --- .../src/web/dao/face/Report_linkDao.java | 49 ++++++++++++++ .../src/web/dao/impl/Report_linkDaoImpl.java | 34 ++++++++++ ActiveWare/src/web/dto/Report_link.java | 65 +++++++++++++++++++ .../web/service/face/Report_linkService.java | 41 ++++++++++++ .../service/impl/Report_linkServiceImpl.java | 29 +++++++++ 5 files changed, 218 insertions(+) create mode 100644 ActiveWare/src/web/dao/face/Report_linkDao.java create mode 100644 ActiveWare/src/web/dao/impl/Report_linkDaoImpl.java create mode 100644 ActiveWare/src/web/dto/Report_link.java create mode 100644 ActiveWare/src/web/service/face/Report_linkService.java create mode 100644 ActiveWare/src/web/service/impl/Report_linkServiceImpl.java diff --git a/ActiveWare/src/web/dao/face/Report_linkDao.java b/ActiveWare/src/web/dao/face/Report_linkDao.java new file mode 100644 index 0000000..8c0bfb5 --- /dev/null +++ b/ActiveWare/src/web/dao/face/Report_linkDao.java @@ -0,0 +1,49 @@ +package web.dao.face; + +import java.sql.Connection; + +import web.dto.Report_link; + +public interface Report_linkDao { + + /** + * 문서번호로 보고경로 조회 + * + * @param doc_num - 조회할 문서번호 + * @return Report_link - 조회된 보고경로 정보 + */ + public Report_link selectReport_linkByDocnum(int doc_num); + + + /** + * 보고경로 추가 + * + * @param conn - DB 연결객체 + * @param report_link - report_link 객체 정보 + * @return int - insert 수행결과 + * 1 - insert 성공 + * 0 - insert 실패 + */ + public int insertReport_link(Connection conn, Report_link report_link); + + + /** + * 보고경로 수정 + * + * @param conn - DB 연결객체 + * @param report_link - report_link 객체 정보 + * @return int - insert 수행결과 + * 1 - insert 성공 + * 0 - insert 실패 + */ + public int updateReport_link(Connection conn, Report_link report_link); + + + /** + * 문서정보창에 필요한 조회 + * + * @param report_link - 조회할 보고경로 정보 + * @return Report_link - 조회된 보고경로 정보 + */ + public Report_link selectReport_link(Report_link report_link); +} \ No newline at end of file diff --git a/ActiveWare/src/web/dao/impl/Report_linkDaoImpl.java b/ActiveWare/src/web/dao/impl/Report_linkDaoImpl.java new file mode 100644 index 0000000..3066f8c --- /dev/null +++ b/ActiveWare/src/web/dao/impl/Report_linkDaoImpl.java @@ -0,0 +1,34 @@ +package web.dao.impl; + +import java.sql.Connection; + +import web.dao.face.Report_linkDao; +import web.dto.Report_link; + +public class Report_linkDaoImpl implements Report_linkDao { + + @Override + public Report_link selectReport_linkByDocnum(int doc_num) { + + return null; + } + + @Override + public int insertReport_link(Connection conn, Report_link report_link) { + + return 0; + } + + @Override + public int updateReport_link(Connection conn, Report_link report_link) { + + return 0; + } + + @Override + public Report_link selectReport_link(Report_link report_link) { + + return null; + } + +} \ No newline at end of file diff --git a/ActiveWare/src/web/dto/Report_link.java b/ActiveWare/src/web/dto/Report_link.java new file mode 100644 index 0000000..19e73fd --- /dev/null +++ b/ActiveWare/src/web/dto/Report_link.java @@ -0,0 +1,65 @@ +package web.dto; + +public class Report_link { + private int link_num; // 결재번호 + private int doc_num; // 문서번호 + private int sender_id; // 보고자 사번 + private int receiver_id; // 수신자 사번 + private String report_type; // 보고종류 + private int report_version; // 보고버전 + + @Override + public String toString() { + return "Report_link [link_num=" + link_num + ", doc_num=" + doc_num + ", sender_id=" + sender_id + + ", receiver_id=" + receiver_id + ", report_type=" + report_type + ", report_version=" + report_version + + "]"; + } + + public int getLink_num() { + return link_num; + } + + public void setLink_num(int link_num) { + this.link_num = link_num; + } + + public int getDoc_num() { + return doc_num; + } + + public void setDoc_num(int doc_num) { + this.doc_num = doc_num; + } + + public int getSender_id() { + return sender_id; + } + + public void setSender_id(int sender_id) { + this.sender_id = sender_id; + } + + public int getReceiver_id() { + return receiver_id; + } + + public void setReceiver_id(int receiver_id) { + this.receiver_id = receiver_id; + } + + public String getReport_type() { + return report_type; + } + + public void setReport_type(String report_type) { + this.report_type = report_type; + } + + public int getReport_version() { + return report_version; + } + + public void setReport_version(int report_version) { + this.report_version = report_version; + } +} \ No newline at end of file diff --git a/ActiveWare/src/web/service/face/Report_linkService.java b/ActiveWare/src/web/service/face/Report_linkService.java new file mode 100644 index 0000000..9111c64 --- /dev/null +++ b/ActiveWare/src/web/service/face/Report_linkService.java @@ -0,0 +1,41 @@ +package web.service.face; + +import java.sql.Connection; + +import web.dto.Report_link; + +public interface Report_linkService { + + /** + * 문서번호로 보고경로 조회 + * + * @param doc_num - 조회할 문서번호 + * @return Report_link - 조회된 문서정보 + */ + public Report_link selectReport_linkByDocnum(int doc_num); + + + /** + * 보고경로 추가 + * + * @param report_link - report_link 객체정보 + */ + public void insertReport_link(Report_link report_link); + + + /** + * 보고경로 수정 + * + * @param report_link - report_link 객체정보 + */ + public void updateReport_link(Report_link report_link); + + + /** + * 문서정보창에 필요한 조회 + * + * @param report_link - 조회할 보고경로 정보 + * @return Report_link - 조회된 보고경로 정보 + */ + public Report_link selectReport_link(Report_link report_link); +} \ No newline at end of file diff --git a/ActiveWare/src/web/service/impl/Report_linkServiceImpl.java b/ActiveWare/src/web/service/impl/Report_linkServiceImpl.java new file mode 100644 index 0000000..2d7a39e --- /dev/null +++ b/ActiveWare/src/web/service/impl/Report_linkServiceImpl.java @@ -0,0 +1,29 @@ +package web.service.impl; + +import web.dto.Report_link; +import web.service.face.Report_linkService; + +public class Report_linkServiceImpl implements Report_linkService { + + @Override + public Report_link selectReport_linkByDocnum(int doc_num) { + + return null; + } + + @Override + public void insertReport_link(Report_link report_link) { + + } + + @Override + public void updateReport_link(Report_link report_link) { + + } + + @Override + public Report_link selectReport_link(Report_link report_link) { + + return null; + } +} \ No newline at end of file From 6bc4d870e83ccf7082e107ccecfaf9b881a0a67e Mon Sep 17 00:00:00 2001 From: Luna Date: Fri, 12 Jun 2020 02:29:59 +0900 Subject: [PATCH 12/14] user_basic --- .../User_basicInsertController.java | 19 +++++++++++++++ .../src/web/dao/face/User_basicDao.java | 5 ++++ .../src/web/dao/impl/User_basicDaoImpl.java | 7 ++++++ ActiveWare/src/web/dto/User_basic.java | 24 +++++++++++++++++++ .../web/service/face/User_basicService.java | 5 ++++ .../service/impl/User_basicServiceImpl.java | 7 ++++++ 6 files changed, 67 insertions(+) create mode 100644 ActiveWare/src/web/controller/user_basic/User_basicInsertController.java create mode 100644 ActiveWare/src/web/dao/face/User_basicDao.java create mode 100644 ActiveWare/src/web/dao/impl/User_basicDaoImpl.java create mode 100644 ActiveWare/src/web/dto/User_basic.java create mode 100644 ActiveWare/src/web/service/face/User_basicService.java create mode 100644 ActiveWare/src/web/service/impl/User_basicServiceImpl.java diff --git a/ActiveWare/src/web/controller/user_basic/User_basicInsertController.java b/ActiveWare/src/web/controller/user_basic/User_basicInsertController.java new file mode 100644 index 0000000..2a5792c --- /dev/null +++ b/ActiveWare/src/web/controller/user_basic/User_basicInsertController.java @@ -0,0 +1,19 @@ +package web.controller.user_basic; + +import java.io.IOException; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +@WebServlet("/userid/insert") +public class User_basicInsertController extends HttpServlet { + private static final long serialVersionUID = 1L; + + @Override + protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + + } +} \ No newline at end of file diff --git a/ActiveWare/src/web/dao/face/User_basicDao.java b/ActiveWare/src/web/dao/face/User_basicDao.java new file mode 100644 index 0000000..6a639fb --- /dev/null +++ b/ActiveWare/src/web/dao/face/User_basicDao.java @@ -0,0 +1,5 @@ +package web.dao.face; + +public interface User_basicDao { + +} \ No newline at end of file diff --git a/ActiveWare/src/web/dao/impl/User_basicDaoImpl.java b/ActiveWare/src/web/dao/impl/User_basicDaoImpl.java new file mode 100644 index 0000000..e6f7651 --- /dev/null +++ b/ActiveWare/src/web/dao/impl/User_basicDaoImpl.java @@ -0,0 +1,7 @@ +package web.dao.impl; + +import web.dao.face.User_basicDao; + +public class User_basicDaoImpl implements User_basicDao { + +} \ No newline at end of file diff --git a/ActiveWare/src/web/dto/User_basic.java b/ActiveWare/src/web/dto/User_basic.java new file mode 100644 index 0000000..aecea0f --- /dev/null +++ b/ActiveWare/src/web/dto/User_basic.java @@ -0,0 +1,24 @@ +package web.dto; + +public class User_basic { + private int userid; // 사번 + private String username; // 이름 + + @Override + public String toString() { + return "User_basic [userid=" + userid + ", username=" + username + "]"; + } + + public int getUserid() { + return userid; + } + public void setUserid(int userid) { + this.userid = userid; + } + public String getUsername() { + return username; + } + public void setUsername(String username) { + this.username = username; + } +} \ No newline at end of file diff --git a/ActiveWare/src/web/service/face/User_basicService.java b/ActiveWare/src/web/service/face/User_basicService.java new file mode 100644 index 0000000..9fff8e7 --- /dev/null +++ b/ActiveWare/src/web/service/face/User_basicService.java @@ -0,0 +1,5 @@ +package web.service.face; + +public interface User_basicService { + +} \ No newline at end of file diff --git a/ActiveWare/src/web/service/impl/User_basicServiceImpl.java b/ActiveWare/src/web/service/impl/User_basicServiceImpl.java new file mode 100644 index 0000000..c0d66f6 --- /dev/null +++ b/ActiveWare/src/web/service/impl/User_basicServiceImpl.java @@ -0,0 +1,7 @@ +package web.service.impl; + +import web.service.face.User_basicService; + +public class User_basicServiceImpl implements User_basicService { + +} \ No newline at end of file From 2a5991f1c42c71ba8910f71bbb36bd6fd014580d Mon Sep 17 00:00:00 2001 From: Luna Date: Fri, 12 Jun 2020 02:32:47 +0900 Subject: [PATCH 13/14] initial commit --- ActiveWare/.classpath | 17 ++++++++++ ActiveWare/.gitignore | 1 + ActiveWare/.project | 31 +++++++++++++++++++ ActiveWare/.settings/.jsdtscope | 12 +++++++ .../.settings/org.eclipse.jdt.core.prefs | 7 +++++ .../org.eclipse.wst.common.component | 8 +++++ ....eclipse.wst.common.project.facet.core.xml | 10 ++++++ ...rg.eclipse.wst.jsdt.ui.superType.container | 1 + .../org.eclipse.wst.jsdt.ui.superType.name | 1 + ActiveWare/WebContent/META-INF/MANIFEST.MF | 3 ++ ActiveWare/WebContent/WEB-INF/web.xml | 12 +++++++ 11 files changed, 103 insertions(+) create mode 100644 ActiveWare/.classpath create mode 100644 ActiveWare/.gitignore create mode 100644 ActiveWare/.project create mode 100644 ActiveWare/.settings/.jsdtscope create mode 100644 ActiveWare/.settings/org.eclipse.jdt.core.prefs create mode 100644 ActiveWare/.settings/org.eclipse.wst.common.component create mode 100644 ActiveWare/.settings/org.eclipse.wst.common.project.facet.core.xml create mode 100644 ActiveWare/.settings/org.eclipse.wst.jsdt.ui.superType.container create mode 100644 ActiveWare/.settings/org.eclipse.wst.jsdt.ui.superType.name create mode 100644 ActiveWare/WebContent/META-INF/MANIFEST.MF create mode 100644 ActiveWare/WebContent/WEB-INF/web.xml diff --git a/ActiveWare/.classpath b/ActiveWare/.classpath new file mode 100644 index 0000000..625fc38 --- /dev/null +++ b/ActiveWare/.classpath @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/ActiveWare/.gitignore b/ActiveWare/.gitignore new file mode 100644 index 0000000..84c048a --- /dev/null +++ b/ActiveWare/.gitignore @@ -0,0 +1 @@ +/build/ diff --git a/ActiveWare/.project b/ActiveWare/.project new file mode 100644 index 0000000..867e75f --- /dev/null +++ b/ActiveWare/.project @@ -0,0 +1,31 @@ + + + ActiveWare + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.eclipse.wst.common.project.facet.core.nature + org.eclipse.jdt.core.javanature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/ActiveWare/.settings/.jsdtscope b/ActiveWare/.settings/.jsdtscope new file mode 100644 index 0000000..92e666d --- /dev/null +++ b/ActiveWare/.settings/.jsdtscope @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/ActiveWare/.settings/org.eclipse.jdt.core.prefs b/ActiveWare/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..0c68a61 --- /dev/null +++ b/ActiveWare/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/ActiveWare/.settings/org.eclipse.wst.common.component b/ActiveWare/.settings/org.eclipse.wst.common.component new file mode 100644 index 0000000..04609fb --- /dev/null +++ b/ActiveWare/.settings/org.eclipse.wst.common.component @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/ActiveWare/.settings/org.eclipse.wst.common.project.facet.core.xml b/ActiveWare/.settings/org.eclipse.wst.common.project.facet.core.xml new file mode 100644 index 0000000..2cb361c --- /dev/null +++ b/ActiveWare/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/ActiveWare/.settings/org.eclipse.wst.jsdt.ui.superType.container b/ActiveWare/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 0000000..3bd5d0a --- /dev/null +++ b/ActiveWare/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/ActiveWare/.settings/org.eclipse.wst.jsdt.ui.superType.name b/ActiveWare/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 0000000..05bd71b --- /dev/null +++ b/ActiveWare/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/ActiveWare/WebContent/META-INF/MANIFEST.MF b/ActiveWare/WebContent/META-INF/MANIFEST.MF new file mode 100644 index 0000000..254272e --- /dev/null +++ b/ActiveWare/WebContent/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/ActiveWare/WebContent/WEB-INF/web.xml b/ActiveWare/WebContent/WEB-INF/web.xml new file mode 100644 index 0000000..6ee72af --- /dev/null +++ b/ActiveWare/WebContent/WEB-INF/web.xml @@ -0,0 +1,12 @@ + + + ActiveWare + + index.html + index.htm + index.jsp + default.html + default.htm + default.jsp + + \ No newline at end of file From 848d067a475e3f653478476fb52d52bbcebd6ebe Mon Sep 17 00:00:00 2001 From: KIM HEONIL Date: Fri, 12 Jun 2020 15:38:32 +0900 Subject: [PATCH 14/14] Project Modify --- SemiProject/src/web/dao/face/DocumentDao.java | 33 ------ .../src/web/dao/impl/DocumentDaoImpl.java | 79 ------------- SemiProject/src/web/dto/Document.java | 77 ------------- .../src/web/service/face/DocumentService.java | 32 ------ .../web/service/impl/DocumentServiceImpl.java | 78 ------------- .../User_basicInsertController.java | 19 ---- src/web/dao/face/User_basicDao.java | 5 - src/web/dao/impl/User_basicDaoImpl.java | 7 -- src/web/dto/User_basic.java | 24 ---- src/web/service/face/User_basicService.java | 5 - .../service/impl/User_basicServiceImpl.java | 7 -- src/web/util/JDBCTemplate.java | 104 ------------------ 12 files changed, 470 deletions(-) delete mode 100644 SemiProject/src/web/dao/face/DocumentDao.java delete mode 100644 SemiProject/src/web/dao/impl/DocumentDaoImpl.java delete mode 100644 SemiProject/src/web/dto/Document.java delete mode 100644 SemiProject/src/web/service/face/DocumentService.java delete mode 100644 SemiProject/src/web/service/impl/DocumentServiceImpl.java delete mode 100644 src/web/controller/user_basic/User_basicInsertController.java delete mode 100644 src/web/dao/face/User_basicDao.java delete mode 100644 src/web/dao/impl/User_basicDaoImpl.java delete mode 100644 src/web/dto/User_basic.java delete mode 100644 src/web/service/face/User_basicService.java delete mode 100644 src/web/service/impl/User_basicServiceImpl.java delete mode 100644 src/web/util/JDBCTemplate.java diff --git a/SemiProject/src/web/dao/face/DocumentDao.java b/SemiProject/src/web/dao/face/DocumentDao.java deleted file mode 100644 index 623edaa..0000000 --- a/SemiProject/src/web/dao/face/DocumentDao.java +++ /dev/null @@ -1,33 +0,0 @@ -package web.dao.face; - -import java.sql.Connection; -import java.util.List; - -import web.dto.Document; - -public interface DocumentDao { - - public List selectDocTmp(); - - public List selectDocWaitAppro(); - - public List selectDocProg(); - - public List selectDocDraft(); - - public List selectDocAppro(); - - public List selectDocAll(); - - public Document selectDocByDocnum(); - - public int insertDoc(Connection conn, Document doc); - - public int updateDoc(Connection conn, Document doc); - - public int deleteDoc(Connection conn, Document doc); - - public Document selectDocument(Document doc); - - -} diff --git a/SemiProject/src/web/dao/impl/DocumentDaoImpl.java b/SemiProject/src/web/dao/impl/DocumentDaoImpl.java deleted file mode 100644 index 3b8ea64..0000000 --- a/SemiProject/src/web/dao/impl/DocumentDaoImpl.java +++ /dev/null @@ -1,79 +0,0 @@ -package web.dao.impl; - -import java.sql.Connection; -import java.util.List; - -import web.dao.face.DocumentDao; -import web.dto.Document; - -public class DocumentDaoImpl implements DocumentDao{ - - @Override - public List selectDocTmp() { - // TODO Auto-generated method stub - return null; - } - - @Override - public List selectDocWaitAppro() { - // TODO Auto-generated method stub - return null; - } - - @Override - public List selectDocProg() { - // TODO Auto-generated method stub - return null; - } - - @Override - public List selectDocDraft() { - // TODO Auto-generated method stub - return null; - } - - @Override - public List selectDocAppro() { - // TODO Auto-generated method stub - return null; - } - - @Override - public List selectDocAll() { - // TODO Auto-generated method stub - return null; - } - - @Override - public Document selectDocByDocnum() { - // TODO Auto-generated method stub - return null; - } - - @Override - public int insertDoc(Connection conn, Document doc) { - // TODO Auto-generated method stub - return 0; - } - - @Override - public int updateDoc(Connection conn, Document doc) { - // TODO Auto-generated method stub - return 0; - } - - @Override - public int deleteDoc(Connection conn, Document doc) { - // TODO Auto-generated method stub - return 0; - } - - @Override - public Document selectDocument(Document doc) { - // TODO Auto-generated method stub - return null; - } - - - -} diff --git a/SemiProject/src/web/dto/Document.java b/SemiProject/src/web/dto/Document.java deleted file mode 100644 index 1cf76bc..0000000 --- a/SemiProject/src/web/dto/Document.java +++ /dev/null @@ -1,77 +0,0 @@ -package web.dto; - -import java.util.Date; - -public class Document { - - private int doc_num; //문서번호 - private String doc_title; //문서제목 - private String doc_substance; //문서요지 - private String doc_content; //문서본문 - private String doc_state; //문서상태 - private int doc_userid; //작성자 사번 - private Date doc_date; //작성일시 - private String doc_emergency; //긴급여부 - - - - @Override - public String toString() { - return "Document [doc_num=" + doc_num + ", doc_title=" + doc_title + ", doc_substance=" + doc_substance - + ", doc_content=" + doc_content + ", doc_state=" + doc_state + ", doc_userid=" + doc_userid - + ", doc_date=" + doc_date + ", doc_emergency=" + doc_emergency + "]"; - } - public int getDoc_num() { - return doc_num; - } - public void setDoc_num(int doc_num) { - this.doc_num = doc_num; - } - public String getDoc_title() { - return doc_title; - } - public void setDoc_title(String doc_title) { - this.doc_title = doc_title; - } - public String getDoc_substance() { - return doc_substance; - } - public void setDoc_substance(String doc_substance) { - this.doc_substance = doc_substance; - } - public String getDoc_content() { - return doc_content; - } - public void setDoc_content(String doc_content) { - this.doc_content = doc_content; - } - public String getDoc_state() { - return doc_state; - } - public void setDoc_state(String doc_state) { - this.doc_state = doc_state; - } - public int getDoc_userid() { - return doc_userid; - } - public void setDoc_userid(int doc_userid) { - this.doc_userid = doc_userid; - } - public Date getDoc_date() { - return doc_date; - } - public void setDoc_date(Date doc_date) { - this.doc_date = doc_date; - } - public String getDoc_emergency() { - return doc_emergency; - } - public void setDoc_emergency(String doc_emergency) { - this.doc_emergency = doc_emergency; - } - - - - - -} diff --git a/SemiProject/src/web/service/face/DocumentService.java b/SemiProject/src/web/service/face/DocumentService.java deleted file mode 100644 index 494cac5..0000000 --- a/SemiProject/src/web/service/face/DocumentService.java +++ /dev/null @@ -1,32 +0,0 @@ -package web.service.face; - -import java.sql.Connection; -import java.util.List; - -import web.dto.Document; - -public interface DocumentService { - - public List selectDocTmp(); - - public List selectDocWaitAppro(); - - public List selectDocProg(); - - public List selectDocDraft(); - - public List selectDocAppro(); - - public List selectDocAll(); - - public Document selectDocByDocnum(); - - public void insertDoc(Connection conn, Document doc); - - public void updateDoc(Connection conn, Document doc); - - public void deleteDoc(Connection conn, Document doc); - - public Document selectDocument(Document doc); - -} diff --git a/SemiProject/src/web/service/impl/DocumentServiceImpl.java b/SemiProject/src/web/service/impl/DocumentServiceImpl.java deleted file mode 100644 index 6790c79..0000000 --- a/SemiProject/src/web/service/impl/DocumentServiceImpl.java +++ /dev/null @@ -1,78 +0,0 @@ -package web.service.impl; - -import java.sql.Connection; -import java.util.List; - -import web.dto.Document; -import web.service.face.DocumentService; - -public class DocumentServiceImpl implements DocumentService{ - - @Override - public List selectDocTmp() { - // TODO Auto-generated method stub - return null; - } - - @Override - public List selectDocWaitAppro() { - // TODO Auto-generated method stub - return null; - } - - @Override - public List selectDocProg() { - // TODO Auto-generated method stub - return null; - } - - @Override - public List selectDocDraft() { - // TODO Auto-generated method stub - return null; - } - - @Override - public List selectDocAppro() { - // TODO Auto-generated method stub - return null; - } - - @Override - public List selectDocAll() { - // TODO Auto-generated method stub - return null; - } - - @Override - public Document selectDocByDocnum() { - // TODO Auto-generated method stub - return null; - } - - @Override - public void insertDoc(Connection conn, Document doc) { - // TODO Auto-generated method stub - - } - - @Override - public void updateDoc(Connection conn, Document doc) { - // TODO Auto-generated method stub - - } - - @Override - public void deleteDoc(Connection conn, Document doc) { - // TODO Auto-generated method stub - - } - - @Override - public Document selectDocument(Document doc) { - // TODO Auto-generated method stub - return null; - } - - -} diff --git a/src/web/controller/user_basic/User_basicInsertController.java b/src/web/controller/user_basic/User_basicInsertController.java deleted file mode 100644 index 2a5792c..0000000 --- a/src/web/controller/user_basic/User_basicInsertController.java +++ /dev/null @@ -1,19 +0,0 @@ -package web.controller.user_basic; - -import java.io.IOException; - -import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -@WebServlet("/userid/insert") -public class User_basicInsertController extends HttpServlet { - private static final long serialVersionUID = 1L; - - @Override - protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { - - } -} \ No newline at end of file diff --git a/src/web/dao/face/User_basicDao.java b/src/web/dao/face/User_basicDao.java deleted file mode 100644 index 6a639fb..0000000 --- a/src/web/dao/face/User_basicDao.java +++ /dev/null @@ -1,5 +0,0 @@ -package web.dao.face; - -public interface User_basicDao { - -} \ No newline at end of file diff --git a/src/web/dao/impl/User_basicDaoImpl.java b/src/web/dao/impl/User_basicDaoImpl.java deleted file mode 100644 index e6f7651..0000000 --- a/src/web/dao/impl/User_basicDaoImpl.java +++ /dev/null @@ -1,7 +0,0 @@ -package web.dao.impl; - -import web.dao.face.User_basicDao; - -public class User_basicDaoImpl implements User_basicDao { - -} \ No newline at end of file diff --git a/src/web/dto/User_basic.java b/src/web/dto/User_basic.java deleted file mode 100644 index b5c067e..0000000 --- a/src/web/dto/User_basic.java +++ /dev/null @@ -1,24 +0,0 @@ -package web.dto; - -public class User_basic { - private int userid; - private String username; - - @Override - public String toString() { - return "User_basic [userid=" + userid + ", username=" + username + "]"; - } - - public int getUserid() { - return userid; - } - public void setUserid(int userid) { - this.userid = userid; - } - public String getUsername() { - return username; - } - public void setUsername(String username) { - this.username = username; - } -} \ No newline at end of file diff --git a/src/web/service/face/User_basicService.java b/src/web/service/face/User_basicService.java deleted file mode 100644 index 9fff8e7..0000000 --- a/src/web/service/face/User_basicService.java +++ /dev/null @@ -1,5 +0,0 @@ -package web.service.face; - -public interface User_basicService { - -} \ No newline at end of file diff --git a/src/web/service/impl/User_basicServiceImpl.java b/src/web/service/impl/User_basicServiceImpl.java deleted file mode 100644 index c0d66f6..0000000 --- a/src/web/service/impl/User_basicServiceImpl.java +++ /dev/null @@ -1,7 +0,0 @@ -package web.service.impl; - -import web.service.face.User_basicService; - -public class User_basicServiceImpl implements User_basicService { - -} \ No newline at end of file diff --git a/src/web/util/JDBCTemplate.java b/src/web/util/JDBCTemplate.java deleted file mode 100644 index a033b75..0000000 --- a/src/web/util/JDBCTemplate.java +++ /dev/null @@ -1,104 +0,0 @@ -package web.util; - -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; - -//싱글톤 적용 객체 - DB연결 -// Connection객체를 하나만 만들어서 사용할 수 있게 만든다 -public class JDBCTemplate { - - //OJDBC 드라이버 - private static final String DRIVER = "oracle.jdbc.driver.OracleDriver"; - - //DB연결 정보 - private static final String URL = "jdbc:oracle:thin:@localhost:1521:xe"; - private static final String USERNAME = "scott"; - private static final String PASSWORD = "tiger"; - - //OJDBC 객체 - private static Connection conn = null; //DB연결객체 - - //private 생성자 - 외부에서 객체 생성하는 걸 막는 용도 - private JDBCTemplate() { } - - //Connection 객체 반환 - 싱글톤 패턴 적용 메소드 - public static Connection getConnection() { - - if( conn == null ) { //한번 생성된 객체를 유지하게 만듦 - try { - //----- 드라이버 로드 ----- - Class.forName(DRIVER); - - //----- DB 연결 ----- - conn = DriverManager.getConnection(URL, USERNAME, PASSWORD); - - } catch (ClassNotFoundException e) { - e.printStackTrace(); - } catch (SQLException e) { - e.printStackTrace(); - } - } - - return conn; //DB 연결 객체 반환 - } - - // commit 수행 메소드 - public static void commit(Connection conn) { - - try { - if(conn!=null && !conn.isClosed()) { // NULL이 아닐때, DB가 끊겨져 있지 않을때 - conn.commit(); - } - } catch (SQLException e) { - e.printStackTrace(); - } - } - - // rollback 수행 메소드 - public static void rollback(Connection conn) { - try { - if(conn!=null && !conn.isClosed()) { // NULL이 아닐때, DB가 끊겨져 있지 않을때 - conn.rollback(); - } - } catch (SQLException e) { - e.printStackTrace(); - } - } - - // DB연결 해제 - public static void close(Connection conn) { - try { - if(conn!=null && conn.isClosed()) { - conn.close(); - } - } catch (SQLException e) { - e.printStackTrace(); - } - } - - // SQL 수행객체 해제 - public static void close(PreparedStatement ps) { - try { - if(ps!=null && ps.isClosed()) { - ps.close(); - } - } catch (SQLException e) { - e.printStackTrace(); - } - } - - // 쿼리결과 객체 해제 - public static void close(ResultSet rs) { - try { - if(rs!=null && rs.isClosed()) { - rs.close(); - } - } catch (SQLException e) { - e.printStackTrace(); - } - } -} \ No newline at end of file