├── .DS_Store ├── 3rd day session.txt ├── Example ├── build.xml ├── build │ ├── empty │ │ └── test.txt │ ├── generated-sources │ │ └── ap-source-output │ │ │ └── test.txt │ └── web │ │ ├── META-INF │ │ ├── MANIFEST.MF │ │ └── context.xml │ │ ├── WEB-INF │ │ ├── classes │ │ │ ├── .netbeans_automatic_build │ │ │ ├── .netbeans_update_resources │ │ │ └── servlet │ │ │ │ ├── DbConnection.class │ │ │ │ └── Registration.class │ │ └── lib │ │ │ └── mysql-connector-java-5.1.23-bin.jar │ │ ├── index.jsp │ │ ├── registration.jsp │ │ └── success.jsp ├── dist │ └── Example.war ├── nbproject │ ├── ant-deploy.xml │ ├── build-impl.xml │ ├── genfiles.properties │ ├── private │ │ ├── private.properties │ │ └── private.xml │ ├── project.properties │ └── project.xml ├── script │ └── script.sql ├── src │ ├── conf │ │ └── MANIFEST.MF │ └── java │ │ └── servlet │ │ ├── DbConnection.java │ │ └── Registration.java ├── test │ └── test.txt └── web │ ├── META-INF │ └── context.xml │ ├── WEB-INF │ └── test.txt │ ├── index.jsp │ ├── registration.jsp │ └── success.jsp ├── ProjectDemo ├── build.xml ├── build │ └── classes │ │ ├── .netbeans_automatic_build │ │ ├── .netbeans_update_resources │ │ ├── Service │ │ └── StudentService.class │ │ ├── View │ │ ├── Calculator$1.class │ │ ├── Calculator.class │ │ ├── Calculator.form │ │ ├── Student.class │ │ ├── StudentView$1.class │ │ ├── StudentView$2.class │ │ ├── StudentView$3.class │ │ ├── StudentView$4.class │ │ ├── StudentView.class │ │ └── StudentView.form │ │ ├── model │ │ └── StudentModel.class │ │ ├── projectdemo │ │ └── test.txt │ │ └── refactor │ │ ├── IConstantManager.class │ │ └── SingoltonConnection.class ├── lib │ ├── mysql-connector-java-5.1.6.jar │ ├── ojdbc8-12.2.0.1.jar │ └── rs2xml (1).jar ├── manifest.mf ├── nbproject │ ├── build-impl.xml │ ├── genfiles.properties │ ├── private │ │ ├── config.properties │ │ ├── private.properties │ │ └── private.xml │ ├── project.properties │ └── project.xml ├── script.sql ├── script │ └── script.sql ├── src │ ├── Controller │ │ └── controller.txt │ ├── Service │ │ └── StudentService.java │ ├── View │ │ ├── Calculator.form │ │ ├── Calculator.java │ │ ├── Student.java │ │ ├── StudentView.form │ │ ├── StudentView.java │ │ ├── ViewStudent.form │ │ └── ViewStudent.java │ ├── model │ │ └── StudentModel.java │ └── refactor │ │ ├── IConstantManager.java │ │ └── SingoltonConnection.java └── test │ └── test.txt ├── README.md ├── SampleCRUD ├── .DS_Store ├── Ticket$1.class ├── Ticket$2.class ├── Ticket$3.class ├── Ticket.class ├── Ticket.java ├── build.xml ├── build │ ├── built-jar.properties │ └── classes │ │ ├── .netbeans_automatic_build │ │ ├── .netbeans_update_resources │ │ ├── Ticket$1.class │ │ ├── Ticket$2.class │ │ ├── Ticket$3.class │ │ ├── Ticket.class │ │ ├── Ticket.form │ │ ├── WorkToDo │ │ └── com │ │ └── main │ │ ├── dto │ │ ├── ContactDTO.class │ │ └── SampleDTO.class │ │ ├── model │ │ └── ContactTableModel.class │ │ ├── refector │ │ ├── IConstantManager.class │ │ └── SingoltonConnection.class │ │ ├── service │ │ └── ContactService.class │ │ └── view │ │ ├── AddContactFrame$1.class │ │ ├── AddContactFrame$2.class │ │ ├── AddContactFrame$3.class │ │ ├── AddContactFrame$4.class │ │ ├── AddContactFrame$5.class │ │ ├── AddContactFrame.class │ │ ├── AddContactFrame.form │ │ ├── Example$1.class │ │ ├── Example$2.class │ │ ├── Example.class │ │ ├── Example.form │ │ ├── ViewContactFrame$1.class │ │ ├── ViewContactFrame$2.class │ │ ├── ViewContactFrame$3.class │ │ ├── ViewContactFrame$4.class │ │ ├── ViewContactFrame$5.class │ │ ├── ViewContactFrame.class │ │ └── ViewContactFrame.form ├── dist │ ├── README.TXT │ └── SampleCRUD.jar ├── manifest.mf ├── nbproject │ ├── build-impl.xml │ ├── genfiles.properties │ ├── private │ │ ├── config.properties │ │ ├── private.properties │ │ └── private.xml │ ├── project.properties │ └── project.xml ├── script │ └── script.sql ├── src │ ├── Ticket.form │ ├── Ticket.java │ ├── WorkToDo │ └── com │ │ └── main │ │ ├── dto │ │ ├── ContactDTO.java │ │ └── SampleDTO.java │ │ ├── model │ │ └── ContactTableModel.java │ │ ├── refector │ │ ├── IConstantManager.java │ │ └── SingoltonConnection.java │ │ ├── service │ │ └── ContactService.java │ │ └── view │ │ ├── AddContactFrame.form │ │ ├── AddContactFrame.java │ │ ├── Example.form │ │ ├── Example.java │ │ ├── ViewContactFrame.form │ │ └── ViewContactFrame.java └── test │ └── test.txt └── first session.txt /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/.DS_Store -------------------------------------------------------------------------------- /3rd day session.txt: -------------------------------------------------------------------------------- 1 | if i register then there is mail and if email is valid. 2 | message - notify -- mail api -code is there we have to add in our code. 3 | 4 | sms gate way : mobile register - add the code of api --- 5 | 6 | url : all details of server, your account, authentication, message gateway. 7 | 8 | paypal gate 9 | 10 | interface : Restfull service is used as a interface. 11 | 12 | billing company: month bill, register, service, , payment recvied -- 6- 10 person 13 | +interface+ 14 | payment com pany : eft, check, cash, ecs, credit card , debit card --- 6 -10 person 15 | 16 | ----------------- 17 | interface 18 | 19 | api - abstrac prgraminig interface 20 | 21 | 6- 10 person team 22 | 1 manager 23 | 1 team lead - developer -- 24 | 2-3 developer ++ 25 | 1 test lead 26 | 2 -3 tester ++ 27 | 1 devop 28 | 1 dba 29 | 30 | accenture: 1 dba team- 500 1000 dba 31 | 2000 compnay - 10 dba 32 | 100000 company - 1000-5000 dba 33 | deliver head 34 | vice deliver manager 35 | . 36 | . 37 | . 38 | ceo 39 | 40 | Anlysis 41 | team allocate 42 | development 43 | tester - test case 44 | environmnet deployed - local, design time, test/qc 1, test/qc2, mock, production 45 | unit test complet/ integration, regression 1 cycle of test final deploy 46 | basic/funtion 47 | 48 | 49 | 50 | ticket - defect log - jira,landdesk,hp alm 51 | 52 | majesc0 - country financial 53 | Utica 54 | Max life 55 | AIG 56 | 57 | --------------------- 58 | defect - jira logging 59 | month bill 10 th of every month 60 | bill come on 12th of month 61 | 62 | tester find issue-> test lead info - > defect log in jira ->id generated - >assign to developer lead -> 63 | developer -> analysis issue- > solve it -> unit test -> doc for changes done -> defect assign to test lead -> tester 64 | -> test the defect -> resolve -> closed ticket 65 | 3 -5 days to reolve the tickt 66 | 67 | pizza ->order id -> acknoldge-> cook- >counter -> delivery boy ->custromer-> order completed 68 | 69 | 70 | document is must needed. 71 | test case doc 72 | chnages doc 73 | unit test doc 74 | 75 | annnual or six appraisal (increment) 76 | behaivour, eager to learn,team handling, knwloged bussiness 77 | 78 | awards- 2k to 3k 79 | weeekend - sun sat off 80 | fridays -activity(navrat - 9 days diff color dress) 81 | year 2 outing 82 | team lunch party -every 3 month once 83 | wfh - 12 13 hr 84 | company -> 9 working - 1 hr lunch -> 2 chai - 30 min-> 2 hr -> 15 min scrum-> 30 min client ->monthly meeting 85 | 5-6 hrs working - 86 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /Example/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Builds, tests, and runs the project Example. 12 | 13 | 71 | 72 | -------------------------------------------------------------------------------- /Example/build/empty/test.txt: -------------------------------------------------------------------------------- 1 | test -------------------------------------------------------------------------------- /Example/build/generated-sources/ap-source-output/test.txt: -------------------------------------------------------------------------------- 1 | test -------------------------------------------------------------------------------- /Example/build/web/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | 3 | -------------------------------------------------------------------------------- /Example/build/web/META-INF/context.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /Example/build/web/WEB-INF/classes/.netbeans_automatic_build: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/Example/build/web/WEB-INF/classes/.netbeans_automatic_build -------------------------------------------------------------------------------- /Example/build/web/WEB-INF/classes/.netbeans_update_resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/Example/build/web/WEB-INF/classes/.netbeans_update_resources -------------------------------------------------------------------------------- /Example/build/web/WEB-INF/classes/servlet/DbConnection.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/Example/build/web/WEB-INF/classes/servlet/DbConnection.class -------------------------------------------------------------------------------- /Example/build/web/WEB-INF/classes/servlet/Registration.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/Example/build/web/WEB-INF/classes/servlet/Registration.class -------------------------------------------------------------------------------- /Example/build/web/WEB-INF/lib/mysql-connector-java-5.1.23-bin.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/Example/build/web/WEB-INF/lib/mysql-connector-java-5.1.23-bin.jar -------------------------------------------------------------------------------- /Example/build/web/index.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Document : index 3 | Created on : Jan 28, 2021, 11:33:23 PM 4 | Author : Sagar Varma 5 | --%> 6 | 7 | <%@page contentType="text/html" pageEncoding="UTF-8"%> 8 | 9 | 10 | 15 | 16 | 17 | TODO supply a title 18 | 19 | 20 | 21 | 22 |
Welcome here
23 |

User

24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/build/web/registration.jsp: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | Registration Form 7 | 8 | 9 | 10 | 11 | 12 | 13 | 64 | 65 | <% 66 | if(request.getParameter("success")!=null){ 67 | out.println(""); 68 | } 69 | 70 | if(request.getParameter("Exist")!=null){ 71 | out.println(""); 72 | } 73 | %> 74 |
75 |
76 |
77 | 78 | 79 | 80 |
81 |
82 | 83 |
84 |
85 |
86 | 87 |
88 | 96 |
97 | 98 |
99 |
100 | 106 |
107 |
108 | 109 |
110 | 119 |
120 | 121 |
122 |
123 |
124 | 125 | 126 |
127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 |
New Registration !
First Name:
Last Name:
Gender:
Contact No.:
Email:
Password:
    
175 |
176 | 177 | 178 |
179 |
180 |
181 |
182 | 183 |
184 | 199 |
200 | 201 |
202 | 207 |
208 | 209 | -------------------------------------------------------------------------------- /Example/build/web/success.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Document : success 3 | Created on : Jan 28, 2021, 11:50:13 PM 4 | Author : Sagar Varma 5 | --%> 6 | <%@page import="java.sql.ResultSet"%> 7 | <%@page import="java.sql.PreparedStatement"%> 8 | <%@page import="servlet.DbConnection"%> 9 | <%@page import="java.sql.Connection"%> 10 | <%@page contentType="text/html" pageEncoding="UTF-8"%> 11 | 12 | 19 | 20 | 21 | 22 | JSP Page 23 | 24 | 25 |

User registered successfully !!!

26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | <% 40 | int srno=1; 41 | Connection con = DbConnection.getConnection(); 42 | PreparedStatement ps = con.prepareStatement("select * from user"); 43 | ResultSet rs = ps.executeQuery(); 44 | while(rs.next()) 45 | { 46 | String id = rs.getString("id"); 47 | String email = rs.getString("email"); 48 | %> 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | <% 61 | } 62 | %> 63 | 64 |
SrNoIDFirst NameLAst NameGenderMobileEmail IdStatus
<%=srno++ %>100<%=rs.getString("id") %><%=rs.getString("fname") %><%=rs.getString("lname") %><%=rs.getString("gender") %><%=rs.getString("mobile") %><%=rs.getString("email") %><%=rs.getString("status") %>
65 | 66 |

New Registration ?

67 | 68 | 69 | -------------------------------------------------------------------------------- /Example/dist/Example.war: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/Example/dist/Example.war -------------------------------------------------------------------------------- /Example/nbproject/ant-deploy.xml: -------------------------------------------------------------------------------- 1 | 2 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 64 | 67 | 68 | 69 | 70 | 71 | 73 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /Example/nbproject/genfiles.properties: -------------------------------------------------------------------------------- 1 | build.xml.data.CRC32=d8d62220 2 | build.xml.script.CRC32=0848e5eb 3 | build.xml.stylesheet.CRC32=651128d4@1.77.1.1 4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. 5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. 6 | nbproject/build-impl.xml.data.CRC32=d8d62220 7 | nbproject/build-impl.xml.script.CRC32=b66f6b5a 8 | nbproject/build-impl.xml.stylesheet.CRC32=99ea4b56@1.77.1.1 9 | -------------------------------------------------------------------------------- /Example/nbproject/private/private.properties: -------------------------------------------------------------------------------- 1 | deploy.ant.properties.file=C:\\Users\\Sagar Varma\\AppData\\Roaming\\NetBeans\\8.2\\tomcat80.properties 2 | j2ee.server.domain=C:/Users/Sagar Varma/AppData/Roaming/NetBeans/8.2/apache-tomcat-8.0.27.0_base 3 | j2ee.server.home=C:/Program Files/Apache Software Foundation/Apache Tomcat 8.0.27 4 | j2ee.server.instance=tomcat80:home=C:\\Program Files\\Apache Software Foundation\\Apache Tomcat 8.0.27:base=apache-tomcat-8.0.27.0_base 5 | javac.debug=true 6 | javadoc.preview=true 7 | selected.browser=default 8 | user.properties.file=C:\\Users\\Sagar Varma\\AppData\\Roaming\\NetBeans\\8.2\\build.properties 9 | -------------------------------------------------------------------------------- /Example/nbproject/private/private.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | file:/C:/Users/Sagar%20Varma/Documents/NetBeansProjects/Example/src/java/servlet/Registration.java 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Example/nbproject/project.properties: -------------------------------------------------------------------------------- 1 | annotation.processing.enabled=true 2 | annotation.processing.enabled.in.editor=true 3 | annotation.processing.processors.list= 4 | annotation.processing.run.all.processors=true 5 | annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output 6 | build.classes.dir=${build.web.dir}/WEB-INF/classes 7 | build.classes.excludes=**/*.java,**/*.form 8 | build.dir=build 9 | build.generated.dir=${build.dir}/generated 10 | build.generated.sources.dir=${build.dir}/generated-sources 11 | build.test.classes.dir=${build.dir}/test/classes 12 | build.test.results.dir=${build.dir}/test/results 13 | build.web.dir=${build.dir}/web 14 | build.web.excludes=${build.classes.excludes} 15 | client.urlPart= 16 | compile.jsps=false 17 | conf.dir=${source.root}/conf 18 | debug.classpath=${build.classes.dir}:${javac.classpath} 19 | debug.test.classpath=\ 20 | ${run.test.classpath} 21 | display.browser=true 22 | # Files to be excluded from distribution war 23 | dist.archive.excludes= 24 | dist.dir=dist 25 | dist.ear.war=${dist.dir}/${war.ear.name} 26 | dist.javadoc.dir=${dist.dir}/javadoc 27 | dist.war=${dist.dir}/${war.name} 28 | endorsed.classpath=\ 29 | ${libs.javaee-endorsed-api-7.0.classpath} 30 | excludes= 31 | file.reference.mysql-connector-java-5.1.23-bin.jar=D:\\eew data\\Jar files\\mysql-connector-java-5.1.23-bin.jar\\mysql-connector-java-5.1.23-bin.jar 32 | includes=** 33 | j2ee.compile.on.save=true 34 | j2ee.copy.static.files.on.save=true 35 | j2ee.deploy.on.save=true 36 | j2ee.platform=1.7-web 37 | j2ee.platform.classpath=${j2ee.server.home}/lib/annotations-api.jar:${j2ee.server.home}/lib/catalina-ant.jar:${j2ee.server.home}/lib/catalina-ha.jar:${j2ee.server.home}/lib/catalina-storeconfig.jar:${j2ee.server.home}/lib/catalina-tribes.jar:${j2ee.server.home}/lib/catalina.jar:${j2ee.server.home}/lib/ecj-4.4.2.jar:${j2ee.server.home}/lib/el-api.jar:${j2ee.server.home}/lib/jasper-el.jar:${j2ee.server.home}/lib/jasper.jar:${j2ee.server.home}/lib/jsp-api.jar:${j2ee.server.home}/lib/servlet-api.jar:${j2ee.server.home}/lib/tomcat-api.jar:${j2ee.server.home}/lib/tomcat-coyote.jar:${j2ee.server.home}/lib/tomcat-dbcp.jar:${j2ee.server.home}/lib/tomcat-i18n-es.jar:${j2ee.server.home}/lib/tomcat-i18n-fr.jar:${j2ee.server.home}/lib/tomcat-i18n-ja.jar:${j2ee.server.home}/lib/tomcat-jdbc.jar:${j2ee.server.home}/lib/tomcat-jni.jar:${j2ee.server.home}/lib/tomcat-util-scan.jar:${j2ee.server.home}/lib/tomcat-util.jar:${j2ee.server.home}/lib/tomcat-websocket.jar:${j2ee.server.home}/lib/websocket-api.jar 38 | j2ee.server.type=Tomcat 39 | jar.compress=false 40 | javac.classpath=\ 41 | ${file.reference.mysql-connector-java-5.1.23-bin.jar} 42 | # Space-separated list of extra javac options 43 | javac.compilerargs= 44 | javac.debug=true 45 | javac.deprecation=false 46 | javac.processorpath=\ 47 | ${javac.classpath} 48 | javac.source=1.8 49 | javac.target=1.8 50 | javac.test.classpath=\ 51 | ${javac.classpath}:\ 52 | ${build.classes.dir} 53 | javac.test.processorpath=\ 54 | ${javac.test.classpath} 55 | javadoc.additionalparam= 56 | javadoc.author=false 57 | javadoc.encoding=${source.encoding} 58 | javadoc.noindex=false 59 | javadoc.nonavbar=false 60 | javadoc.notree=false 61 | javadoc.preview=true 62 | javadoc.private=false 63 | javadoc.splitindex=true 64 | javadoc.use=true 65 | javadoc.version=false 66 | javadoc.windowtitle= 67 | lib.dir=${web.docbase.dir}/WEB-INF/lib 68 | persistence.xml.dir=${conf.dir} 69 | platform.active=default_platform 70 | resource.dir=setup 71 | run.test.classpath=\ 72 | ${javac.test.classpath}:\ 73 | ${build.test.classes.dir} 74 | # Space-separated list of JVM arguments used when running a class with a main method or a unit test 75 | # (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value): 76 | runmain.jvmargs= 77 | source.encoding=UTF-8 78 | source.root=src 79 | src.dir=${source.root}/java 80 | test.src.dir=test 81 | war.content.additional= 82 | war.ear.name=${war.name} 83 | war.name=Example.war 84 | web.docbase.dir=web 85 | webinf.dir=web/WEB-INF 86 | -------------------------------------------------------------------------------- /Example/nbproject/project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.netbeans.modules.web.project 4 | 5 | 6 | Example 7 | 1.6.5 8 | 9 | 10 | ${file.reference.mysql-connector-java-5.1.23-bin.jar} 11 | WEB-INF/lib 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Example/script/script.sql: -------------------------------------------------------------------------------- 1 | 2 | drop database db_ExampleRegistration; 3 | CREATE DATABASE IF NOT EXISTS `db_ExampleRegistration` /*!40100 DEFAULT CHARACTER SET latin1 */; 4 | USE `db_ExampleRegistration`; 5 | 6 | 7 | 8 | 9 | CREATE TABLE IF NOT EXISTS `user` ( 10 | `id` int(11) NOT NULL AUTO_INCREMENT, 11 | `fname` varchar(500) NOT NULL DEFAULT '0', 12 | `lname` varchar(500) NOT NULL DEFAULT '0', 13 | `gender` varchar(500) NOT NULL DEFAULT '0', 14 | `mobile` varchar(500) NOT NULL DEFAULT '0', 15 | `email` varchar(500) NOT NULL DEFAULT '0', 16 | `password` varchar(500) NOT NULL DEFAULT '0', 17 | `field1` varchar(500) NOT NULL DEFAULT '0', 18 | `field2` varchar(500) NOT NULL DEFAULT '0', 19 | `status` varchar(50) NOT NULL DEFAULT 'pending', 20 | PRIMARY KEY (`id`) 21 | ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1; 22 | 23 | 24 | INSERT INTO `user` (`id`, `fname`, `lname`, `gender`, `mobile`, `email`, `password`, `status`) VALUES 25 | (1, 'jaydeep', 'salokhe', 'Male', '9898989898', 'jaydeep@gmail.com', '123', 'accept'), 26 | (2, 'priti', 'sdkfjl', 'FeMale', '8787878787', 'priti@gmail.com', '123', 'accept'), 27 | (3, 'tejas', 'sankpal', 'Male', '9898989898', 'tejas@gmail.com', '123', 'accept'); -------------------------------------------------------------------------------- /Example/src/conf/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | 3 | -------------------------------------------------------------------------------- /Example/src/java/servlet/DbConnection.java: -------------------------------------------------------------------------------- 1 | package servlet; 2 | 3 | 4 | import java.sql.Connection; 5 | import java.sql.DriverManager; 6 | import java.sql.SQLException; 7 | 8 | public class DbConnection 9 | { 10 | private static Connection con=null; 11 | public static int threshould = 50; 12 | public static String path=""; 13 | 14 | public static Connection getConnection(){ 15 | try{ 16 | 17 | if(con==null){ 18 | Class.forName("com.mysql.jdbc.Driver"); 19 | con=DriverManager.getConnection("jdbc:mysql://localhost:3306/db_ExampleRegistration","root",""); 20 | return con; 21 | }else{ 22 | return con; 23 | } 24 | 25 | } catch(Exception e){ 26 | e.printStackTrace(); 27 | } 28 | return con; 29 | } 30 | 31 | 32 | } 33 | 34 | -------------------------------------------------------------------------------- /Example/src/java/servlet/Registration.java: -------------------------------------------------------------------------------- 1 | package servlet; 2 | 3 | import java.io.IOException; 4 | import java.io.PrintWriter; 5 | import java.sql.Connection; 6 | import java.sql.PreparedStatement; 7 | import java.sql.ResultSet; 8 | import java.sql.Statement; 9 | import java.text.DateFormat; 10 | import java.text.SimpleDateFormat; 11 | import java.util.Calendar; 12 | import java.util.Date; 13 | import java.util.TimeZone; 14 | 15 | import javax.servlet.ServletException; 16 | import javax.servlet.annotation.WebServlet; 17 | import javax.servlet.http.HttpServlet; 18 | import javax.servlet.http.HttpServletRequest; 19 | import javax.servlet.http.HttpServletResponse; 20 | import javax.servlet.http.HttpSession; 21 | 22 | @WebServlet("/Registration") 23 | public class Registration extends HttpServlet { 24 | 25 | private static final long serialVersionUID = 1L; 26 | 27 | @Override 28 | protected void doGet(HttpServletRequest request, HttpServletResponse response) 29 | throws ServletException, IOException { 30 | processRequest(request, response); 31 | } 32 | 33 | @Override 34 | protected void doPost(HttpServletRequest request, HttpServletResponse response) 35 | throws ServletException, IOException { 36 | processRequest(request, response); 37 | } 38 | 39 | private void processRequest(HttpServletRequest request, 40 | HttpServletResponse response) throws ServletException, IOException { 41 | 42 | response.setContentType("text/html;charset=UTF-8"); 43 | PrintWriter out = response.getWriter(); 44 | HttpSession session = request.getSession(); 45 | try { 46 | 47 | DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy"); 48 | Date date = new Date(); 49 | TimeZone estTime = TimeZone.getTimeZone("Asia/Kolkata"); 50 | dateFormat.setTimeZone(estTime); 51 | String Addeddate = dateFormat.format(date); 52 | 53 | String fname = request.getParameter("fname");// this is the name attribute in the html 54 | String lname = request.getParameter("lname"); 55 | String email = request.getParameter("email"); 56 | String gender = request.getParameter("gender"); 57 | String password = request.getParameter("password"); 58 | String contactNo = request.getParameter("contactNo"); 59 | 60 | Connection con = DbConnection.getConnection(); 61 | 62 | Statement st = con.createStatement(); 63 | // Statement stat = con.createStatement(); 64 | 65 | ResultSet rs = st.executeQuery("select * from user where email='" + email + "'"); 66 | 67 | if (rs.next()) { 68 | 69 | response.sendRedirect("registration.jsp?Exist=Exist"); 70 | } else { 71 | 72 | int r = st.executeUpdate("insert into user (fname,email,lname,gender,password,mobile) values('" + fname + "','" + email + "','" + lname + "','" + gender + "','" + password + "','" + contactNo + "')"); 73 | if (r > 0) { 74 | 75 | response.sendRedirect("success.jsp?");// transver the page to the definete url 76 | 77 | } 78 | 79 | } 80 | } catch (Exception e) { 81 | e.getMessage(); 82 | } finally { 83 | out.close(); 84 | 85 | } 86 | } 87 | 88 | @Override 89 | public String getServletInfo() { 90 | return "Short description"; 91 | }// 92 | 93 | } 94 | -------------------------------------------------------------------------------- /Example/test/test.txt: -------------------------------------------------------------------------------- 1 | test -------------------------------------------------------------------------------- /Example/web/META-INF/context.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /Example/web/WEB-INF/test.txt: -------------------------------------------------------------------------------- 1 | test -------------------------------------------------------------------------------- /Example/web/index.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Document : index 3 | Created on : Jan 28, 2021, 11:33:23 PM 4 | Author : Sagar Varma 5 | --%> 6 | 7 | <%@page contentType="text/html" pageEncoding="UTF-8"%> 8 | 9 | 10 | 15 | 16 | 17 | TODO supply a title 18 | 19 | 20 | 21 | 22 |
Welcome here
23 |

User

24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/web/registration.jsp: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | Registration Form 7 | 8 | 9 | 10 | 11 | 12 | 13 | 64 | 65 | <% 66 | if(request.getParameter("success")!=null){ 67 | out.println(""); 68 | } 69 | 70 | if(request.getParameter("Exist")!=null){ 71 | out.println(""); 72 | } 73 | %> 74 |
75 |
76 |
77 | 78 | 79 | 80 |
81 |
82 | 83 |
84 |
85 |
86 | 87 |
88 | 96 |
97 | 98 |
99 |
100 | 106 |
107 |
108 | 109 |
110 | 119 |
120 | 121 |
122 |
123 |
124 | 125 | 126 |
127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 |
New Registration !
First Name:
Last Name:
Gender:
Contact No.:
Email:
Password:
    
175 |
176 | 177 | 178 |
179 |
180 |
181 |
182 | 183 |
184 | 199 |
200 | 201 |
202 | 207 |
208 | 209 | -------------------------------------------------------------------------------- /Example/web/success.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Document : success 3 | Created on : Jan 28, 2021, 11:50:13 PM 4 | Author : Sagar Varma 5 | --%> 6 | <%@page import="java.sql.ResultSet"%> 7 | <%@page import="java.sql.PreparedStatement"%> 8 | <%@page import="servlet.DbConnection"%> 9 | <%@page import="java.sql.Connection"%> 10 | <%@page contentType="text/html" pageEncoding="UTF-8"%> 11 | 12 | 19 | 20 | 21 | 22 | JSP Page 23 | 24 | 25 |

User registered successfully !!!

26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | <% 40 | int srno=1; 41 | Connection con = DbConnection.getConnection(); 42 | PreparedStatement ps = con.prepareStatement("select * from user"); 43 | ResultSet rs = ps.executeQuery(); 44 | while(rs.next()) 45 | { 46 | String id = rs.getString("id"); 47 | String email = rs.getString("email"); 48 | %> 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | <% 61 | } 62 | %> 63 | 64 |
SrNoIDFirst NameLAst NameGenderMobileEmail IdStatus
<%=srno++ %>100<%=rs.getString("id") %><%=rs.getString("fname") %><%=rs.getString("lname") %><%=rs.getString("gender") %><%=rs.getString("mobile") %><%=rs.getString("email") %><%=rs.getString("status") %>
65 | 66 |

New Registration ?

67 | 68 | 69 | -------------------------------------------------------------------------------- /ProjectDemo/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Builds, tests, and runs the project ProjectDemo. 12 | 13 | 73 | 74 | -------------------------------------------------------------------------------- /ProjectDemo/build/classes/.netbeans_automatic_build: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/ProjectDemo/build/classes/.netbeans_automatic_build -------------------------------------------------------------------------------- /ProjectDemo/build/classes/.netbeans_update_resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/ProjectDemo/build/classes/.netbeans_update_resources -------------------------------------------------------------------------------- /ProjectDemo/build/classes/Service/StudentService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/ProjectDemo/build/classes/Service/StudentService.class -------------------------------------------------------------------------------- /ProjectDemo/build/classes/View/Calculator$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/ProjectDemo/build/classes/View/Calculator$1.class -------------------------------------------------------------------------------- /ProjectDemo/build/classes/View/Calculator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/ProjectDemo/build/classes/View/Calculator.class -------------------------------------------------------------------------------- /ProjectDemo/build/classes/View/Calculator.form: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 |
51 | -------------------------------------------------------------------------------- /ProjectDemo/build/classes/View/Student.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/ProjectDemo/build/classes/View/Student.class -------------------------------------------------------------------------------- /ProjectDemo/build/classes/View/StudentView$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/ProjectDemo/build/classes/View/StudentView$1.class -------------------------------------------------------------------------------- /ProjectDemo/build/classes/View/StudentView$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/ProjectDemo/build/classes/View/StudentView$2.class -------------------------------------------------------------------------------- /ProjectDemo/build/classes/View/StudentView$3.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/ProjectDemo/build/classes/View/StudentView$3.class -------------------------------------------------------------------------------- /ProjectDemo/build/classes/View/StudentView$4.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/ProjectDemo/build/classes/View/StudentView$4.class -------------------------------------------------------------------------------- /ProjectDemo/build/classes/View/StudentView.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/ProjectDemo/build/classes/View/StudentView.class -------------------------------------------------------------------------------- /ProjectDemo/build/classes/View/StudentView.form: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 |
171 | -------------------------------------------------------------------------------- /ProjectDemo/build/classes/model/StudentModel.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/ProjectDemo/build/classes/model/StudentModel.class -------------------------------------------------------------------------------- /ProjectDemo/build/classes/projectdemo/test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/ProjectDemo/build/classes/projectdemo/test.txt -------------------------------------------------------------------------------- /ProjectDemo/build/classes/refactor/IConstantManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/ProjectDemo/build/classes/refactor/IConstantManager.class -------------------------------------------------------------------------------- /ProjectDemo/build/classes/refactor/SingoltonConnection.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/ProjectDemo/build/classes/refactor/SingoltonConnection.class -------------------------------------------------------------------------------- /ProjectDemo/lib/mysql-connector-java-5.1.6.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/ProjectDemo/lib/mysql-connector-java-5.1.6.jar -------------------------------------------------------------------------------- /ProjectDemo/lib/ojdbc8-12.2.0.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/ProjectDemo/lib/ojdbc8-12.2.0.1.jar -------------------------------------------------------------------------------- /ProjectDemo/lib/rs2xml (1).jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/ProjectDemo/lib/rs2xml (1).jar -------------------------------------------------------------------------------- /ProjectDemo/manifest.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | X-COMMENT: Main-Class will be added automatically by build 3 | 4 | -------------------------------------------------------------------------------- /ProjectDemo/nbproject/genfiles.properties: -------------------------------------------------------------------------------- 1 | build.xml.data.CRC32=ad8a19ba 2 | build.xml.script.CRC32=2765b4b7 3 | build.xml.stylesheet.CRC32=8064a381@1.80.1.48 4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. 5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. 6 | nbproject/build-impl.xml.data.CRC32=ad8a19ba 7 | nbproject/build-impl.xml.script.CRC32=a6ca3c72 8 | nbproject/build-impl.xml.stylesheet.CRC32=830a3534@1.80.1.48 9 | -------------------------------------------------------------------------------- /ProjectDemo/nbproject/private/config.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/ProjectDemo/nbproject/private/config.properties -------------------------------------------------------------------------------- /ProjectDemo/nbproject/private/private.properties: -------------------------------------------------------------------------------- 1 | compile.on.save=true 2 | do.depend=false 3 | do.jar=true 4 | javac.debug=true 5 | javadoc.preview=true 6 | user.properties.file=C:\\Users\\Sagar Varma\\AppData\\Roaming\\NetBeans\\8.2\\build.properties 7 | -------------------------------------------------------------------------------- /ProjectDemo/nbproject/private/private.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | file:/C:/Users/Sagar%20Varma/Documents/NetBeansProjects/ProjectDemo/src/View/StudentView.java 7 | file:/C:/Users/Sagar%20Varma/Documents/NetBeansProjects/ProjectDemo/src/refactor/SingoltonConnection.java 8 | file:/C:/Users/Sagar%20Varma/Documents/NetBeansProjects/ProjectDemo/src/model/StudentModel.java 9 | file:/C:/Users/Sagar%20Varma/Documents/NetBeansProjects/ProjectDemo/script.sql 10 | file:/C:/Users/Sagar%20Varma/Documents/NetBeansProjects/ProjectDemo/src/Service/StudentService.java 11 | file:/C:/Users/Sagar%20Varma/Documents/NetBeansProjects/ProjectDemo/script/script.sql 12 | file:/C:/Users/Sagar%20Varma/Documents/NetBeansProjects/ProjectDemo/src/View/Calculator.java 13 | file:/C:/Users/Sagar%20Varma/Documents/NetBeansProjects/ProjectDemo/src/View/Student.java 14 | file:/C:/Users/Sagar%20Varma/Documents/NetBeansProjects/ProjectDemo/src/refactor/IConstantManager.java 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /ProjectDemo/nbproject/project.properties: -------------------------------------------------------------------------------- 1 | annotation.processing.enabled=true 2 | annotation.processing.enabled.in.editor=false 3 | annotation.processing.processors.list= 4 | annotation.processing.run.all.processors=true 5 | annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output 6 | application.title=ProjectDemo 7 | application.vendor=Sagar Varma 8 | build.classes.dir=${build.dir}/classes 9 | build.classes.excludes=**/*.java,**/*.form 10 | # This directory is removed when the project is cleaned: 11 | build.dir=build 12 | build.generated.dir=${build.dir}/generated 13 | build.generated.sources.dir=${build.dir}/generated-sources 14 | # Only compile against the classpath explicitly listed here: 15 | build.sysclasspath=ignore 16 | build.test.classes.dir=${build.dir}/test/classes 17 | build.test.results.dir=${build.dir}/test/results 18 | # Uncomment to specify the preferred debugger connection transport: 19 | #debug.transport=dt_socket 20 | debug.classpath=\ 21 | ${run.classpath} 22 | debug.test.classpath=\ 23 | ${run.test.classpath} 24 | # Files in build.classes.dir which should be excluded from distribution jar 25 | dist.archive.excludes= 26 | # This directory is removed when the project is cleaned: 27 | dist.dir=dist 28 | dist.jar=${dist.dir}/ProjectDemo.jar 29 | dist.javadoc.dir=${dist.dir}/javadoc 30 | endorsed.classpath= 31 | excludes= 32 | file.reference.mysql-connector-java-5.1.23-bin.jar=D:\\eew data\\Jar files\\mysql-connector-java-5.1.23-bin.jar\\mysql-connector-java-5.1.23-bin.jar 33 | includes=** 34 | jar.compress=false 35 | javac.classpath=\ 36 | ${file.reference.mysql-connector-java-5.1.23-bin.jar} 37 | # Space-separated list of extra javac options 38 | javac.compilerargs= 39 | javac.deprecation=false 40 | javac.external.vm=true 41 | javac.processorpath=\ 42 | ${javac.classpath} 43 | javac.source=1.8 44 | javac.target=1.8 45 | javac.test.classpath=\ 46 | ${javac.classpath}:\ 47 | ${build.classes.dir} 48 | javac.test.processorpath=\ 49 | ${javac.test.classpath} 50 | javadoc.additionalparam= 51 | javadoc.author=false 52 | javadoc.encoding=${source.encoding} 53 | javadoc.noindex=false 54 | javadoc.nonavbar=false 55 | javadoc.notree=false 56 | javadoc.private=false 57 | javadoc.splitindex=true 58 | javadoc.use=true 59 | javadoc.version=false 60 | javadoc.windowtitle= 61 | main.class=projectdemo.ProjectDemo 62 | manifest.file=manifest.mf 63 | meta.inf.dir=${src.dir}/META-INF 64 | mkdist.disabled=false 65 | platform.active=default_platform 66 | run.classpath=\ 67 | ${javac.classpath}:\ 68 | ${build.classes.dir} 69 | # Space-separated list of JVM arguments used when running the project. 70 | # You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. 71 | # To set system properties for unit tests define test-sys-prop.name=value: 72 | run.jvmargs= 73 | run.test.classpath=\ 74 | ${javac.test.classpath}:\ 75 | ${build.test.classes.dir} 76 | source.encoding=UTF-8 77 | src.dir=src 78 | test.src.dir=test 79 | -------------------------------------------------------------------------------- /ProjectDemo/nbproject/project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.netbeans.modules.java.j2seproject 4 | 5 | 6 | ProjectDemo 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /ProjectDemo/script.sql: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this license header, choose License Headers in Project Properties. 3 | * To change this template file, choose Tools | Templates 4 | * and open the template in the editor. 5 | */ 6 | /** 7 | * Author: Sagar Varma 8 | * Created: Jan 28, 2021 9 | */ 10 | drop database if exists dblibrary; 11 | create database dbLibrary; 12 | use dbLibrary; 13 | 14 | create table books( 15 | bookid int (11) not null, 16 | bookname varchar (30), 17 | author varchar(30), 18 | isssueBy int(20), 19 | issuedate date , 20 | tilldate date, 21 | isactive varchar(2)); 22 | -------------------------------------------------------------------------------- /ProjectDemo/script/script.sql: -------------------------------------------------------------------------------- 1 | DROP DATABASE IF EXISTS db_student; 2 | CREATE DATABASE db_student; 3 | USE db_student; 4 | 5 | CREATE TABLE tbl_contact( 6 | id INT(11) primary key auto_increment, 7 | firstname varchar(255), 8 | lastname varchar(255), 9 | roll varchar(11), 10 | classes varchar(11) 11 | ); 12 | -------------------------------------------------------------------------------- /ProjectDemo/src/Controller/controller.txt: -------------------------------------------------------------------------------- 1 | add controller file -------------------------------------------------------------------------------- /ProjectDemo/src/Service/StudentService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this license header, choose License Headers in Project Properties. 3 | * To change this template file, choose Tools | Templates 4 | * and open the template in the editor. 5 | */ 6 | package Service; 7 | 8 | /** 9 | * 10 | * @author Sagar Varma 11 | */ 12 | public class StudentService { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /ProjectDemo/src/View/Calculator.form: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 |
51 | -------------------------------------------------------------------------------- /ProjectDemo/src/View/Calculator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this license header, choose License Headers in Project Properties. 3 | * To change this template file, choose Tools | Templates 4 | * and open the template in the editor. 5 | */ 6 | package View; 7 | 8 | /** 9 | * 10 | * @author Sagar Varma 11 | */ 12 | public class Calculator extends javax.swing.JFrame { 13 | 14 | /** 15 | * Creates new form Calculator 16 | */ 17 | public Calculator() { 18 | initComponents(); 19 | } 20 | 21 | /** 22 | * This method is called from within the constructor to initialize the form. 23 | * WARNING: Do NOT modify this code. The content of this method is always 24 | * regenerated by the Form Editor. 25 | */ 26 | @SuppressWarnings("unchecked") 27 | // //GEN-BEGIN:initComponents 28 | private void initComponents() { 29 | 30 | jLabel1 = new javax.swing.JLabel(); 31 | 32 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); 33 | 34 | jLabel1.setText("jLabel1"); 35 | 36 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); 37 | getContentPane().setLayout(layout); 38 | layout.setHorizontalGroup( 39 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 40 | .addGroup(layout.createSequentialGroup() 41 | .addContainerGap() 42 | .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE) 43 | .addContainerGap(332, Short.MAX_VALUE)) 44 | ); 45 | layout.setVerticalGroup( 46 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 47 | .addGroup(layout.createSequentialGroup() 48 | .addGap(39, 39, 39) 49 | .addComponent(jLabel1) 50 | .addContainerGap(247, Short.MAX_VALUE)) 51 | ); 52 | 53 | pack(); 54 | }// //GEN-END:initComponents 55 | 56 | /** 57 | * @param args the command line arguments 58 | */ 59 | public static void main(String args[]) { 60 | /* Set the Nimbus look and feel */ 61 | // 62 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. 63 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 64 | */ 65 | try { 66 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { 67 | if ("Nimbus".equals(info.getName())) { 68 | javax.swing.UIManager.setLookAndFeel(info.getClassName()); 69 | break; 70 | } 71 | } 72 | } catch (ClassNotFoundException ex) { 73 | java.util.logging.Logger.getLogger(Calculator.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 74 | } catch (InstantiationException ex) { 75 | java.util.logging.Logger.getLogger(Calculator.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 76 | } catch (IllegalAccessException ex) { 77 | java.util.logging.Logger.getLogger(Calculator.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 78 | } catch (javax.swing.UnsupportedLookAndFeelException ex) { 79 | java.util.logging.Logger.getLogger(Calculator.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 80 | } 81 | // 82 | 83 | /* Create and display the form */ 84 | java.awt.EventQueue.invokeLater(new Runnable() { 85 | public void run() { 86 | new Calculator().setVisible(true); 87 | } 88 | }); 89 | } 90 | 91 | // Variables declaration - do not modify//GEN-BEGIN:variables 92 | private javax.swing.JLabel jLabel1; 93 | // End of variables declaration//GEN-END:variables 94 | } 95 | -------------------------------------------------------------------------------- /ProjectDemo/src/View/Student.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this license header, choose License Headers in Project Properties. 3 | * To change this template file, choose Tools | Templates 4 | * and open the template in the editor. 5 | */ 6 | package View; 7 | 8 | /** 9 | * 10 | * @author Sagar Varma 11 | */ 12 | public class Student { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /ProjectDemo/src/View/StudentView.form: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 |
171 | -------------------------------------------------------------------------------- /ProjectDemo/src/View/ViewStudent.form: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 | -------------------------------------------------------------------------------- /ProjectDemo/src/View/ViewStudent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this license header, choose License Headers in Project Properties. 3 | * To change this template file, choose Tools | Templates 4 | * and open the template in the editor. 5 | */ 6 | package View; 7 | 8 | import com.mysql.jdbc.PreparedStatement; 9 | import java.sql.Connection; 10 | import java.sql.DriverManager; 11 | import java.sql.ResultSet; 12 | import java.sql.SQLException; 13 | import java.sql.Statement; 14 | import java.util.logging.Level; 15 | import java.util.logging.Logger; 16 | import net.proteanit.sql.DbUtils; 17 | import refactor.SingoltonConnection; 18 | 19 | /** 20 | * 21 | * @author Sagar Varma 22 | */ 23 | public class ViewStudent extends javax.swing.JFrame { 24 | 25 | /** 26 | * Creates new form ViewStudent 27 | */ 28 | Connection con; 29 | // PreparedStatement stmt; 30 | PreparedStatement pst; 31 | ResultSet rs; 32 | ResultSet res; 33 | Connection conn; 34 | 35 | public ViewStudent() { 36 | initComponents(); 37 | 38 | try { 39 | 40 | con=SingoltonConnection.getConnection(); 41 | Statement stmt=con.createStatement(); 42 | 43 | rs=stmt.executeQuery("SELECT * FROM `tbl_contact`"); 44 | // code to show the data in the table 45 | // used rs2xml jar for this Dbutils code. 46 | tab.setModel(DbUtils.resultSetToTableModel(rs)); 47 | 48 | } catch (ClassNotFoundException | SQLException ex) { 49 | System.out.println("Error: "+ex); 50 | 51 | } 52 | } 53 | 54 | /** 55 | * This method is called from within the constructor to initialize the form. 56 | * WARNING: Do NOT modify this code. The content of this method is always 57 | * regenerated by the Form Editor. 58 | */ 59 | @SuppressWarnings("unchecked") 60 | // //GEN-BEGIN:initComponents 61 | private void initComponents() { 62 | 63 | jPanel1 = new javax.swing.JPanel(); 64 | jScrollPane1 = new javax.swing.JScrollPane(); 65 | tab = new javax.swing.JTable(); 66 | 67 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); 68 | 69 | tab.setModel(new javax.swing.table.DefaultTableModel( 70 | new Object [][] { 71 | {null, null, null, null}, 72 | {null, null, null, null}, 73 | {null, null, null, null}, 74 | {null, null, null, null} 75 | }, 76 | new String [] { 77 | "Title 1", "Title 2", "Title 3", "Title 4" 78 | } 79 | )); 80 | jScrollPane1.setViewportView(tab); 81 | 82 | javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); 83 | jPanel1.setLayout(jPanel1Layout); 84 | jPanel1Layout.setHorizontalGroup( 85 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 86 | .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE) 87 | ); 88 | jPanel1Layout.setVerticalGroup( 89 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 90 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() 91 | .addContainerGap(102, Short.MAX_VALUE) 92 | .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE) 93 | .addGap(94, 94, 94)) 94 | ); 95 | 96 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); 97 | getContentPane().setLayout(layout); 98 | layout.setHorizontalGroup( 99 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 100 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 101 | ); 102 | layout.setVerticalGroup( 103 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 104 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 105 | ); 106 | 107 | pack(); 108 | }// //GEN-END:initComponents 109 | 110 | /** 111 | * @param args the command line arguments 112 | */ 113 | public static void main(String args[]) { 114 | /* Set the Nimbus look and feel */ 115 | // 116 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. 117 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 118 | */ 119 | try { 120 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { 121 | if ("Nimbus".equals(info.getName())) { 122 | javax.swing.UIManager.setLookAndFeel(info.getClassName()); 123 | break; 124 | } 125 | } 126 | } catch (ClassNotFoundException ex) { 127 | java.util.logging.Logger.getLogger(ViewStudent.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 128 | } catch (InstantiationException ex) { 129 | java.util.logging.Logger.getLogger(ViewStudent.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 130 | } catch (IllegalAccessException ex) { 131 | java.util.logging.Logger.getLogger(ViewStudent.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 132 | } catch (javax.swing.UnsupportedLookAndFeelException ex) { 133 | java.util.logging.Logger.getLogger(ViewStudent.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 134 | } 135 | // 136 | 137 | /* Create and display the form */ 138 | java.awt.EventQueue.invokeLater(new Runnable() { 139 | public void run() { 140 | new ViewStudent().setVisible(true); 141 | } 142 | }); 143 | } 144 | 145 | // Variables declaration - do not modify//GEN-BEGIN:variables 146 | private javax.swing.JPanel jPanel1; 147 | private javax.swing.JScrollPane jScrollPane1; 148 | private javax.swing.JTable tab; 149 | // End of variables declaration//GEN-END:variables 150 | } 151 | -------------------------------------------------------------------------------- /ProjectDemo/src/model/StudentModel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this license header, choose License Headers in Project Properties. 3 | * To change this template file, choose Tools | Templates 4 | * and open the template in the editor. 5 | */ 6 | package model; 7 | 8 | /** 9 | * SAGAR 10 | * @author Sagar Varma 11 | */ 12 | public class StudentModel {// camel case 13 | 14 | } 15 | -------------------------------------------------------------------------------- /ProjectDemo/src/refactor/IConstantManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor.16000 4 | */ 5 | package refactor; 6 | 7 | /** 8 | * 9 | * @author namita 10 | */ 11 | public interface IConstantManager { 12 | 13 | final static String DATABASE_NAME = "db_student"; 14 | //--------------------------------------------// 15 | final static String DATABASE_DRIVER = "com.mysql.jdbc.Driver"; 16 | final static String DATABASE_URL = "jdbc:mysql://localhost:3306/" + DATABASE_NAME; 17 | final static String DATABASE_USERNAME = "root"; 18 | final static String DATABASE_PASSWORD = ""; 19 | //--------------------------------------------// 20 | final static String TABLE_CUSTOMER = "tbl_contact"; 21 | final static String TABLE_PAYMENT = ""; 22 | final static String TABLE_GREETINGS = ""; 23 | //--------------------------------------------// 24 | } 25 | -------------------------------------------------------------------------------- /ProjectDemo/src/refactor/SingoltonConnection.java: -------------------------------------------------------------------------------- 1 | package refactor; 2 | 3 | import java.sql.Connection; 4 | import java.sql.DriverManager; 5 | import java.sql.PreparedStatement; 6 | import java.sql.ResultSet; 7 | import java.sql.SQLException; 8 | 9 | public class SingoltonConnection implements IConstantManager { 10 | 11 | private static Connection connection; 12 | 13 | public static Connection getConnection() throws SQLException, ClassNotFoundException { 14 | Class.forName(DATABASE_DRIVER); 15 | System.out.println("CONNECTED" ); 16 | if (connection == null || connection.isClosed()) { 17 | connection = DriverManager.getConnection(DATABASE_URL, DATABASE_USERNAME, DATABASE_PASSWORD); 18 | System.out.println("DATABASE_NAME = " + DATABASE_NAME); 19 | } 20 | return connection; 21 | } 22 | 23 | public static PreparedStatement makePreparedStatement(String sql) throws SQLException, ClassNotFoundException { 24 | return getConnection().prepareStatement(sql); 25 | } 26 | 27 | public static void deleteOrInactiveRecord(String subqury) { 28 | try { 29 | System.out.println("DELETE FROM " + subqury); 30 | makePreparedStatement("DELETE FROM " + subqury).execute(); 31 | makePreparedStatement("DELETE FROM " + subqury).execute(); 32 | } catch (Exception e) { 33 | } 34 | } 35 | 36 | public static Integer getPrimaryKe(String tableName, String pkColumnName) throws SQLException, ClassNotFoundException { 37 | String sql_pk = "SELECT " + pkColumnName + " FROM " + tableName; 38 | ResultSet executeQuery = makePreparedStatement(sql_pk).executeQuery(); 39 | System.out.println("sql_pk = " + sql_pk); 40 | Integer primaryKey = null; 41 | while (executeQuery.next()) { 42 | primaryKey = executeQuery.getInt(pkColumnName); 43 | } 44 | if (primaryKey == null) { 45 | return 1; 46 | } else { 47 | return primaryKey + 1; 48 | } 49 | } 50 | 51 | public static void main(String[] args) { 52 | try { 53 | getConnection(); 54 | } catch (Exception e) { 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /ProjectDemo/test/test.txt: -------------------------------------------------------------------------------- 1 | test file 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # JavaProjectTraining 2 | Workshop trained project 3 | 4 | How to add new element: 5 | 6 | 1. Change script file 7 | add one element "emailid varchar(255)" 8 | 2. Runsql 9 | 3. Check database-> localhost 10 | 11 | view :- 12 | 4. AddContactFrame.java-> add new lable and textfield., Change lable by right click and edit text. 13 | double click on save button -> 14 | add: String trim3 = jTextField3.getText().trim(); // getting value from ui 15 | contactDTO.setEmailid(trim3); // set value in object. 16 | 17 | DTO:- 18 | 5. ContactDTO.java-> add new private variable. 19 | private String emailid; 20 | right click on class and go in insertCode-> generate getter and setter. -> select it -> ok. 21 | 22 | Service:- 23 | 6.ContactService 24 | add opertion: 25 | change saveContact(ContactDTO dTO) method. 26 | insert query change, add dto.getEmailid(). 27 | 28 | update operation: 29 | same we do for updateContact(ContactDTO dTO, String id) method also. 30 | update query change, add dto.getEmailid(). 31 | example: + "emailid = '" + dTO.getEmailid() + "'," 32 | 33 | view operation: 34 | searchOrListContact(String id, String mode) 35 | add this line to add the view of new element 36 | dTO.setEmailid(executeQuery.getString("emailid")); 37 | 38 | 7. ContactTableModel.java 39 | add coloumn name like : "EMAIL ID" 40 | add coloumnclass : String.class, 41 | 42 | add case to set the value in table: 43 | case 3: 44 | return dTO.getEmailid(); 45 | -------------------------------------------------------------------------------- /SampleCRUD/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/SampleCRUD/.DS_Store -------------------------------------------------------------------------------- /SampleCRUD/Ticket$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/SampleCRUD/Ticket$1.class -------------------------------------------------------------------------------- /SampleCRUD/Ticket$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/SampleCRUD/Ticket$2.class -------------------------------------------------------------------------------- /SampleCRUD/Ticket$3.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/SampleCRUD/Ticket$3.class -------------------------------------------------------------------------------- /SampleCRUD/Ticket.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/SampleCRUD/Ticket.class -------------------------------------------------------------------------------- /SampleCRUD/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Builds, tests, and runs the project SampleCRUD. 12 | 13 | 73 | 74 | -------------------------------------------------------------------------------- /SampleCRUD/build/built-jar.properties: -------------------------------------------------------------------------------- 1 | #Tue, 09 Jan 2024 15:42:10 +0530 2 | 3 | 4 | /Users/sagarverma/Documents/Code/SampleCRUD= 5 | -------------------------------------------------------------------------------- /SampleCRUD/build/classes/.netbeans_automatic_build: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/SampleCRUD/build/classes/.netbeans_automatic_build -------------------------------------------------------------------------------- /SampleCRUD/build/classes/.netbeans_update_resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/SampleCRUD/build/classes/.netbeans_update_resources -------------------------------------------------------------------------------- /SampleCRUD/build/classes/Ticket$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/SampleCRUD/build/classes/Ticket$1.class -------------------------------------------------------------------------------- /SampleCRUD/build/classes/Ticket$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/SampleCRUD/build/classes/Ticket$2.class -------------------------------------------------------------------------------- /SampleCRUD/build/classes/Ticket$3.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/SampleCRUD/build/classes/Ticket$3.class -------------------------------------------------------------------------------- /SampleCRUD/build/classes/Ticket.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/SampleCRUD/build/classes/Ticket.class -------------------------------------------------------------------------------- /SampleCRUD/build/classes/Ticket.form: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | -------------------------------------------------------------------------------- /SampleCRUD/build/classes/WorkToDo: -------------------------------------------------------------------------------- 1 | 2 | 1. Change script file 3 | add one element "emailid varchar(255)" 4 | 2. Runsql 5 | 3. Check database-> localhost 6 | 7 | view :- 8 | 4. AddContactFrame.java-> add new lable and textfield., Change lable by right click and edit text. 9 | double click on save button -> 10 | add: String trim3 = jTextField3.getText().trim(); // getting value from ui 11 | contactDTO.setEmailid(trim3); // set value in object. 12 | 13 | DTO:- 14 | 5. ContactDTO.java-> add new private variable. 15 | private String emailid; 16 | right click on class and go in insertCode-> generate getter and setter. -> select it -> ok. 17 | 18 | Service:- 19 | 6.ContactService 20 | add opertion: 21 | change saveContact(ContactDTO dTO) method. 22 | insert query change, add dto.getEmailid(). 23 | 24 | update operation: 25 | same we do for updateContact(ContactDTO dTO, String id) method also. 26 | update query change, add dto.getEmailid(). 27 | example: + "emailid = '" + dTO.getEmailid() + "'," 28 | 29 | view operation: 30 | searchOrListContact(String id, String mode) 31 | add this line to add the view of new element 32 | dTO.setEmailid(executeQuery.getString("emailid")); 33 | 34 | 7. ContactTableModel.java 35 | add coloumn name like : "EMAIL ID" 36 | add coloumnclass : String.class, 37 | 38 | add case to set the value in table: 39 | case 3: 40 | return dTO.getEmailid(); 41 | 42 | -------------------------------------------------------------------------------- /SampleCRUD/build/classes/com/main/dto/ContactDTO.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/SampleCRUD/build/classes/com/main/dto/ContactDTO.class -------------------------------------------------------------------------------- /SampleCRUD/build/classes/com/main/dto/SampleDTO.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/SampleCRUD/build/classes/com/main/dto/SampleDTO.class -------------------------------------------------------------------------------- /SampleCRUD/build/classes/com/main/model/ContactTableModel.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/SampleCRUD/build/classes/com/main/model/ContactTableModel.class -------------------------------------------------------------------------------- /SampleCRUD/build/classes/com/main/refector/IConstantManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/SampleCRUD/build/classes/com/main/refector/IConstantManager.class -------------------------------------------------------------------------------- /SampleCRUD/build/classes/com/main/refector/SingoltonConnection.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/SampleCRUD/build/classes/com/main/refector/SingoltonConnection.class -------------------------------------------------------------------------------- /SampleCRUD/build/classes/com/main/service/ContactService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/SampleCRUD/build/classes/com/main/service/ContactService.class -------------------------------------------------------------------------------- /SampleCRUD/build/classes/com/main/view/AddContactFrame$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/SampleCRUD/build/classes/com/main/view/AddContactFrame$1.class -------------------------------------------------------------------------------- /SampleCRUD/build/classes/com/main/view/AddContactFrame$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/SampleCRUD/build/classes/com/main/view/AddContactFrame$2.class -------------------------------------------------------------------------------- /SampleCRUD/build/classes/com/main/view/AddContactFrame$3.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/SampleCRUD/build/classes/com/main/view/AddContactFrame$3.class -------------------------------------------------------------------------------- /SampleCRUD/build/classes/com/main/view/AddContactFrame$4.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/SampleCRUD/build/classes/com/main/view/AddContactFrame$4.class -------------------------------------------------------------------------------- /SampleCRUD/build/classes/com/main/view/AddContactFrame$5.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/SampleCRUD/build/classes/com/main/view/AddContactFrame$5.class -------------------------------------------------------------------------------- /SampleCRUD/build/classes/com/main/view/AddContactFrame.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/SampleCRUD/build/classes/com/main/view/AddContactFrame.class -------------------------------------------------------------------------------- /SampleCRUD/build/classes/com/main/view/AddContactFrame.form: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 |
170 | -------------------------------------------------------------------------------- /SampleCRUD/build/classes/com/main/view/Example$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/SampleCRUD/build/classes/com/main/view/Example$1.class -------------------------------------------------------------------------------- /SampleCRUD/build/classes/com/main/view/Example$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/SampleCRUD/build/classes/com/main/view/Example$2.class -------------------------------------------------------------------------------- /SampleCRUD/build/classes/com/main/view/Example.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/SampleCRUD/build/classes/com/main/view/Example.class -------------------------------------------------------------------------------- /SampleCRUD/build/classes/com/main/view/Example.form: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 |
151 | -------------------------------------------------------------------------------- /SampleCRUD/build/classes/com/main/view/ViewContactFrame$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/SampleCRUD/build/classes/com/main/view/ViewContactFrame$1.class -------------------------------------------------------------------------------- /SampleCRUD/build/classes/com/main/view/ViewContactFrame$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/SampleCRUD/build/classes/com/main/view/ViewContactFrame$2.class -------------------------------------------------------------------------------- /SampleCRUD/build/classes/com/main/view/ViewContactFrame$3.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/SampleCRUD/build/classes/com/main/view/ViewContactFrame$3.class -------------------------------------------------------------------------------- /SampleCRUD/build/classes/com/main/view/ViewContactFrame$4.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/SampleCRUD/build/classes/com/main/view/ViewContactFrame$4.class -------------------------------------------------------------------------------- /SampleCRUD/build/classes/com/main/view/ViewContactFrame$5.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/SampleCRUD/build/classes/com/main/view/ViewContactFrame$5.class -------------------------------------------------------------------------------- /SampleCRUD/build/classes/com/main/view/ViewContactFrame.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/SampleCRUD/build/classes/com/main/view/ViewContactFrame.class -------------------------------------------------------------------------------- /SampleCRUD/build/classes/com/main/view/ViewContactFrame.form: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 |
97 |
98 |
99 | 100 | 101 | 102 |
103 |
104 |
105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 |
132 |
133 | -------------------------------------------------------------------------------- /SampleCRUD/dist/README.TXT: -------------------------------------------------------------------------------- 1 | ======================== 2 | BUILD OUTPUT DESCRIPTION 3 | ======================== 4 | 5 | When you build an Java application project that has a main class, the IDE 6 | automatically copies all of the JAR 7 | files on the projects classpath to your projects dist/lib folder. The IDE 8 | also adds each of the JAR files to the Class-Path element in the application 9 | JAR files manifest file (MANIFEST.MF). 10 | 11 | To run the project from the command line, go to the dist folder and 12 | type the following: 13 | 14 | java -jar "SampleCRUD.jar" 15 | 16 | To distribute this project, zip up the dist folder (including the lib folder) 17 | and distribute the ZIP file. 18 | 19 | Notes: 20 | 21 | * If two JAR files on the project classpath have the same name, only the first 22 | JAR file is copied to the lib folder. 23 | * Only JAR files are copied to the lib folder. 24 | If the classpath contains other types of files or folders, these files (folders) 25 | are not copied. 26 | * If a library on the projects classpath also has a Class-Path element 27 | specified in the manifest,the content of the Class-Path element has to be on 28 | the projects runtime path. 29 | * To set a main class in a standard Java project, right-click the project node 30 | in the Projects window and choose Properties. Then click Run and enter the 31 | class name in the Main Class field. Alternatively, you can manually type the 32 | class name in the manifest Main-Class element. 33 | -------------------------------------------------------------------------------- /SampleCRUD/dist/SampleCRUD.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/SampleCRUD/dist/SampleCRUD.jar -------------------------------------------------------------------------------- /SampleCRUD/manifest.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | X-COMMENT: Main-Class will be added automatically by build 3 | 4 | -------------------------------------------------------------------------------- /SampleCRUD/nbproject/genfiles.properties: -------------------------------------------------------------------------------- 1 | build.xml.data.CRC32=ac388ab6 2 | build.xml.script.CRC32=89b52a75 3 | build.xml.stylesheet.CRC32=f85dc8f2@1.102.0.48 4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. 5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. 6 | nbproject/build-impl.xml.data.CRC32=ac388ab6 7 | nbproject/build-impl.xml.script.CRC32=44d803c4 8 | nbproject/build-impl.xml.stylesheet.CRC32=12e0a6c2@1.102.0.48 9 | -------------------------------------------------------------------------------- /SampleCRUD/nbproject/private/config.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eewsagar/JavaProjectTraining/504c82891a2e80bba16fee95965133e19e8c4e21/SampleCRUD/nbproject/private/config.properties -------------------------------------------------------------------------------- /SampleCRUD/nbproject/private/private.properties: -------------------------------------------------------------------------------- 1 | compile.on.save=true 2 | do.depend=false 3 | do.jar=true 4 | do.jlink=false 5 | javac.debug=true 6 | javadoc.preview=true 7 | jlink.strip=false 8 | user.properties.file=/Users/sagarverma/Library/Application Support/NetBeans/13/build.properties 9 | -------------------------------------------------------------------------------- /SampleCRUD/nbproject/private/private.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | file:/F:/Workshop/Java/SampleCRUD/src/com/main/dto/SampleDTO.java 7 | file:/F:/Workshop/Java/SampleCRUD/src/com/main/service/ContactService.java 8 | file:/F:/Workshop/Java/SampleCRUD/src/com/main/view/ViewContactFrame.java 9 | file:/F:/Workshop/Java/SampleCRUD/src/com/main/view/AddContactFrame.java 10 | file:/F:/Workshop/Java/SampleCRUD/src/com/main/model/ContactTableModel.java 11 | file:/F:/Workshop/Java/SampleCRUD/src/com/main/dto/ContactDTO.java 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /SampleCRUD/nbproject/project.properties: -------------------------------------------------------------------------------- 1 | annotation.processing.enabled=true 2 | annotation.processing.enabled.in.editor=false 3 | annotation.processing.processors.list= 4 | annotation.processing.run.all.processors=true 5 | annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output 6 | application.title=SampleCRUD 7 | application.vendor=yuvraj 8 | build.classes.dir=${build.dir}/classes 9 | build.classes.excludes=**/*.java,**/*.form 10 | # This directory is removed when the project is cleaned: 11 | build.dir=build 12 | build.generated.dir=${build.dir}/generated 13 | build.generated.sources.dir=${build.dir}/generated-sources 14 | # Only compile against the classpath explicitly listed here: 15 | build.sysclasspath=ignore 16 | build.test.classes.dir=${build.dir}/test/classes 17 | build.test.results.dir=${build.dir}/test/results 18 | # Uncomment to specify the preferred debugger connection transport: 19 | #debug.transport=dt_socket 20 | debug.classpath=\ 21 | ${run.classpath} 22 | debug.modulepath=\ 23 | ${run.modulepath} 24 | debug.test.classpath=\ 25 | ${run.test.classpath} 26 | debug.test.modulepath=\ 27 | ${run.test.modulepath} 28 | # Files in build.classes.dir which should be excluded from distribution jar 29 | dist.archive.excludes= 30 | # This directory is removed when the project is cleaned: 31 | dist.dir=dist 32 | dist.jar=${dist.dir}/SampleCRUD.jar 33 | dist.javadoc.dir=${dist.dir}/javadoc 34 | endorsed.classpath= 35 | excludes= 36 | file.reference.mysql-connector-java-5.1.23-bin.jar=../../../Desktop/BCCE-pranay wadekar/PHASE3/lib/mysql-connector-java-5.1.23-bin.jar 37 | includes=** 38 | jar.compress=false 39 | javac.classpath=\ 40 | ${file.reference.mysql-connector-java-5.1.23-bin.jar} 41 | # Space-separated list of extra javac options 42 | javac.compilerargs= 43 | javac.deprecation=false 44 | javac.external.vm=false 45 | javac.modulepath= 46 | javac.processormodulepath= 47 | javac.processorpath=\ 48 | ${javac.classpath} 49 | javac.source=1.7 50 | javac.target=1.7 51 | javac.test.classpath=\ 52 | ${javac.classpath}:\ 53 | ${build.classes.dir} 54 | javac.test.modulepath=\ 55 | ${javac.modulepath} 56 | javac.test.processorpath=\ 57 | ${javac.test.classpath} 58 | javadoc.additionalparam= 59 | javadoc.author=false 60 | javadoc.encoding=${source.encoding} 61 | javadoc.html5=false 62 | javadoc.noindex=false 63 | javadoc.nonavbar=false 64 | javadoc.notree=false 65 | javadoc.private=false 66 | javadoc.splitindex=true 67 | javadoc.use=true 68 | javadoc.version=false 69 | javadoc.windowtitle= 70 | jlink.launcher=false 71 | jlink.launcher.name=SampleCRUD 72 | main.class=com.main.view.AddContactFrame 73 | manifest.file=manifest.mf 74 | meta.inf.dir=${src.dir}/META-INF 75 | mkdist.disabled=false 76 | platform.active=default_platform 77 | run.classpath=\ 78 | ${javac.classpath}:\ 79 | ${build.classes.dir} 80 | # Space-separated list of JVM arguments used when running the project. 81 | # You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. 82 | # To set system properties for unit tests define test-sys-prop.name=value: 83 | run.jvmargs= 84 | run.modulepath=\ 85 | ${javac.modulepath} 86 | run.test.classpath=\ 87 | ${javac.test.classpath}:\ 88 | ${build.test.classes.dir} 89 | run.test.modulepath=\ 90 | ${javac.test.modulepath} 91 | source.encoding=UTF-8 92 | src.dir=src 93 | test.src.dir=test 94 | -------------------------------------------------------------------------------- /SampleCRUD/nbproject/project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.netbeans.modules.java.j2seproject 4 | 5 | 6 | SampleCRUD 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /SampleCRUD/script/script.sql: -------------------------------------------------------------------------------- 1 | DROP DATABASE IF EXISTS db_contact; 2 | CREATE DATABASE db_contact; 3 | USE db_contact; 4 | 5 | CREATE TABLE tbl_contact( 6 | id INT(11) primary key auto_increment, 7 | fullName varchar(255), 8 | address varchar(255), 9 | emailid varchar(255), 10 | isActive varchar(1) 11 | ); 12 | -------------------------------------------------------------------------------- /SampleCRUD/src/Ticket.form: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | -------------------------------------------------------------------------------- /SampleCRUD/src/WorkToDo: -------------------------------------------------------------------------------- 1 | 2 | 1. Change script file 3 | add one element "emailid varchar(255)" 4 | 2. Runsql 5 | 3. Check database-> localhost 6 | 7 | view :- 8 | 4. AddContactFrame.java-> add new lable and textfield., Change lable by right click and edit text. 9 | double click on save button -> 10 | add: String trim3 = jTextField3.getText().trim(); // getting value from ui 11 | contactDTO.setEmailid(trim3); // set value in object. 12 | 13 | DTO:- 14 | 5. ContactDTO.java-> add new private variable. 15 | private String emailid; 16 | right click on class and go in insertCode-> generate getter and setter. -> select it -> ok. 17 | 18 | Service:- 19 | 6.ContactService 20 | add opertion: 21 | change saveContact(ContactDTO dTO) method. 22 | insert query change, add dto.getEmailid(). 23 | 24 | update operation: 25 | same we do for updateContact(ContactDTO dTO, String id) method also. 26 | update query change, add dto.getEmailid(). 27 | example: + "emailid = '" + dTO.getEmailid() + "'," 28 | 29 | view operation: 30 | searchOrListContact(String id, String mode) 31 | add this line to add the view of new element 32 | dTO.setEmailid(executeQuery.getString("emailid")); 33 | 34 | 7. ContactTableModel.java 35 | add coloumn name like : "EMAIL ID" 36 | add coloumnclass : String.class, 37 | 38 | add case to set the value in table: 39 | case 3: 40 | return dTO.getEmailid(); 41 | 42 | -------------------------------------------------------------------------------- /SampleCRUD/src/com/main/dto/ContactDTO.java: -------------------------------------------------------------------------------- 1 | package com.main.dto; // pojo 2 | 3 | public class ContactDTO { 4 | 5 | public ContactDTO() { 6 | 7 | } 8 | private String id; 9 | private String fullName; 10 | private String Address; 11 | private String emailid; 12 | 13 | public String getEmailid() { 14 | return emailid; 15 | } 16 | 17 | public void setEmailid(String emailid) { 18 | this.emailid = emailid; 19 | } 20 | 21 | public String getAddress() { 22 | return Address; 23 | } 24 | 25 | public void setAddress(String Address) { 26 | this.Address = Address; 27 | } 28 | private String isActive; 29 | 30 | public String getId() { 31 | return id; 32 | } 33 | 34 | public void setId(String id) { 35 | this.id = id; 36 | } 37 | 38 | public String getFullName() { 39 | return fullName; 40 | } 41 | 42 | public void setFullName(String fullName) { 43 | this.fullName = fullName; 44 | } 45 | 46 | public String getIsActive() { 47 | return isActive; 48 | } 49 | 50 | public void setIsActive(String isActive) { 51 | this.isActive = isActive; 52 | } 53 | 54 | 55 | 56 | } 57 | -------------------------------------------------------------------------------- /SampleCRUD/src/com/main/dto/SampleDTO.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this license header, choose License Headers in Project Properties. 3 | * To change this template file, choose Tools | Templates 4 | * and open the template in the editor. 5 | */ 6 | package com.main.dto; 7 | 8 | /** 9 | * 10 | * @author Sagar Das 11 | */ 12 | public class SampleDTO { 13 | private String name; 14 | private String age; 15 | 16 | public String getName() { 17 | return name; 18 | } 19 | 20 | public void setName(String name) { 21 | this.name = name; 22 | } 23 | 24 | public String getAge() { 25 | return age; 26 | } 27 | 28 | public void setAge(String age) { 29 | this.age = age; 30 | } 31 | 32 | 33 | } 34 | -------------------------------------------------------------------------------- /SampleCRUD/src/com/main/model/ContactTableModel.java: -------------------------------------------------------------------------------- 1 | package com.main.model; 2 | 3 | import com.main.dto.ContactDTO; 4 | import java.util.ArrayList; 5 | import javax.swing.event.TableModelListener; 6 | import javax.swing.table.TableModel; 7 | 8 | public class ContactTableModel implements TableModel { // view of table value 9 | 10 | private String[] columnName = {"ID", "FULL NAMEs","ADDRESS" ,"EMAIL ID","IS ACTIVE"}; 11 | private Class[] columnClass = {String.class, String.class,String.class,String.class, String.class}; 12 | ArrayList arrayList; 13 | 14 | public ContactTableModel(ArrayList arrayList) { 15 | this.arrayList = arrayList; 16 | } 17 | 18 | public int getRowCount() { 19 | return arrayList.size(); 20 | } 21 | 22 | public int getColumnCount() { 23 | return columnName.length; 24 | } 25 | 26 | public String getColumnName(int columnIndex) { 27 | return columnName[columnIndex]; 28 | } 29 | 30 | public Class getColumnClass(int columnIndex) { 31 | return columnClass[columnIndex]; 32 | } 33 | 34 | public boolean isCellEditable(int rowIndex, int columnIndex) { 35 | return false; 36 | } 37 | 38 | public Object getValueAt(int rowIndex, int columnIndex) { 39 | ContactDTO dTO = arrayList.get(rowIndex); 40 | switch (columnIndex) { 41 | case 0: 42 | return dTO.getId(); 43 | case 1: 44 | return dTO.getFullName(); 45 | case 2: 46 | return dTO.getAddress(); // data transfer object 47 | case 3: 48 | return dTO.getEmailid(); // data transfer object 49 | case 4: 50 | return dTO.getIsActive(); 51 | } 52 | return null; 53 | } 54 | 55 | public void setValueAt(Object aValue, int rowIndex, int columnIndex) { 56 | } 57 | 58 | public void addTableModelListener(TableModelListener l) { 59 | } 60 | 61 | public void removeTableModelListener(TableModelListener l) { 62 | } 63 | 64 | public ContactDTO getSelectedObject(int selectedRow) { 65 | return arrayList.get(selectedRow); 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /SampleCRUD/src/com/main/refector/IConstantManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor.16000 4 | */ 5 | package com.main.refector; 6 | 7 | /** 8 | * 9 | * @author namita 10 | */ 11 | public interface IConstantManager { 12 | 13 | final static String DATABASE_NAME = "db_contact"; 14 | //--------------------------------------------// 15 | final static String DATABASE_DRIVER = "com.mysql.jdbc.Driver"; 16 | final static String DATABASE_URL = "jdbc:mysql://localhost:3306/" + DATABASE_NAME; 17 | final static String DATABASE_USERNAME = "root"; 18 | final static String DATABASE_PASSWORD = ""; 19 | //--------------------------------------------// 20 | final static String TABLE_CUSTOMER = "tbl_customer"; 21 | final static String TABLE_PAYMENT = ""; 22 | final static String TABLE_GREETINGS = ""; 23 | //--------------------------------------------// 24 | } 25 | -------------------------------------------------------------------------------- /SampleCRUD/src/com/main/refector/SingoltonConnection.java: -------------------------------------------------------------------------------- 1 | package com.main.refector; 2 | 3 | import java.sql.Connection; 4 | import java.sql.DriverManager; 5 | import java.sql.PreparedStatement; 6 | import java.sql.ResultSet; 7 | import java.sql.SQLException; 8 | 9 | public class SingoltonConnection implements IConstantManager { 10 | 11 | private static Connection connection; 12 | 13 | public static Connection getConnection() throws SQLException, ClassNotFoundException { 14 | Class.forName(DATABASE_DRIVER); 15 | System.out.println("CONNECTED" ); 16 | if (connection == null || connection.isClosed()) { 17 | connection = DriverManager.getConnection(DATABASE_URL, DATABASE_USERNAME, DATABASE_PASSWORD); 18 | System.out.println("DATABASE_NAME = " + DATABASE_NAME); 19 | } 20 | return connection; 21 | } 22 | 23 | public static PreparedStatement makePreparedStatement(String sql) throws SQLException, ClassNotFoundException { 24 | return getConnection().prepareStatement(sql); 25 | } 26 | 27 | public static void deleteOrInactiveRecord(String subqury) { 28 | try { 29 | System.out.println("DELETE FROM " + subqury); 30 | makePreparedStatement("DELETE FROM " + subqury).execute(); 31 | makePreparedStatement("DELETE FROM " + subqury).execute(); 32 | } catch (Exception e) { 33 | } 34 | } 35 | 36 | public static Integer getPrimaryKe(String tableName, String pkColumnName) throws SQLException, ClassNotFoundException { 37 | String sql_pk = "SELECT " + pkColumnName + " FROM " + tableName; 38 | ResultSet executeQuery = makePreparedStatement(sql_pk).executeQuery(); 39 | System.out.println("sql_pk = " + sql_pk); 40 | Integer primaryKey = null; 41 | while (executeQuery.next()) { 42 | primaryKey = executeQuery.getInt(pkColumnName); 43 | } 44 | if (primaryKey == null) { 45 | return 1; 46 | } else { 47 | return primaryKey + 1; 48 | } 49 | } 50 | 51 | public static void main(String[] args) { 52 | try { 53 | System.out.println("hello connection"); 54 | getConnection(); 55 | 56 | } catch (Exception e) { 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /SampleCRUD/src/com/main/service/ContactService.java: -------------------------------------------------------------------------------- 1 | package com.main.service; 2 | 3 | 4 | import com.main.dto.ContactDTO; 5 | import com.main.refector.SingoltonConnection; 6 | import java.sql.ResultSet; 7 | import java.util.ArrayList; 8 | import java.util.logging.Logger; 9 | 10 | public class ContactService { 11 | 12 | public static Integer saveContact(ContactDTO dTO) { 13 | String insertQuery = "INSERT INTO tbl_contact( fullName,address,emailid,isActive)VALUES (" 14 | + "'" + dTO.getFullName() + "'," 15 | + "'" + dTO.getAddress()+ "'," 16 | + "'" + dTO.getEmailid()+ "'," 17 | + "'" + dTO.getIsActive() + "');"; 18 | System.out.println("insertQuery = " + insertQuery); 19 | 20 | try { 21 | SingoltonConnection.makePreparedStatement(insertQuery).execute(); 22 | 23 | return 1; 24 | } catch (Exception e) { 25 | Logger.getLogger(ContactService.class.getName()); 26 | } 27 | return null; 28 | } 29 | 30 | public static Integer updateContact(ContactDTO dTO, String id) { 31 | String updateQuery = "UPDATE tbl_contact SET " 32 | + "fullName = '" + dTO.getFullName() + "'," 33 | + "address = '" + dTO.getAddress() + "'," 34 | + "emailid = '" + dTO.getEmailid() + "'," 35 | + "isActive = '" + dTO.getIsActive() + "' WHERE id = '" + id + "' "; 36 | System.out.println("updateQuery = " + updateQuery); 37 | 38 | try { 39 | SingoltonConnection.makePreparedStatement(updateQuery).execute(); 40 | 41 | return 1; 42 | } catch (Exception e) { 43 | Logger.getLogger(ContactService.class.getName()); 44 | } 45 | return null; 46 | } 47 | 48 | public static ArrayList searchOrListContact(String id, String mode) { 49 | String searchQuery = ""; 50 | if (mode.equals("all")) { 51 | 52 | searchQuery = "SELECT * FROM tbl_contact"; 53 | 54 | } 55 | if (mode.equals("search")) { 56 | searchQuery = "SELECT * FROM tbl_contact WHERE id = '" + id + "'"; 57 | 58 | } 59 | System.out.println("searchQuery = " + searchQuery); 60 | ArrayList arrayList = new ArrayList(); 61 | try { 62 | ResultSet executeQuery = SingoltonConnection.makePreparedStatement(searchQuery).executeQuery(); 63 | 64 | while (executeQuery.next()) { 65 | ContactDTO dTO = new ContactDTO(); 66 | dTO.setId(executeQuery.getString("id")); 67 | dTO.setFullName(executeQuery.getString("fullName")); 68 | dTO.setAddress(executeQuery.getString("address")); 69 | dTO.setEmailid(executeQuery.getString("emailid")); 70 | dTO.setIsActive(executeQuery.getString("isActive")); 71 | arrayList.add(dTO); 72 | } 73 | executeQuery.close(); 74 | } catch (Exception e) { 75 | Logger.getLogger(ContactService.class.getName()); 76 | } 77 | return arrayList; 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /SampleCRUD/src/com/main/view/AddContactFrame.form: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 |
170 | -------------------------------------------------------------------------------- /SampleCRUD/src/com/main/view/Example.form: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 |
151 | -------------------------------------------------------------------------------- /SampleCRUD/src/com/main/view/Example.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this license header, choose License Headers in Project Properties. 3 | * To change this template file, choose Tools | Templates 4 | * and open the template in the editor. 5 | */ 6 | package com.main.view; 7 | 8 | /** 9 | * 10 | * @author Sagar Das 11 | */ 12 | public class Example extends javax.swing.JFrame { 13 | 14 | /** 15 | * Creates new form Example 16 | */ 17 | public Example() { 18 | initComponents(); 19 | } 20 | 21 | /** 22 | * This method is called from within the constructor to initialize the form. 23 | * WARNING: Do NOT modify this code. The content of this method is always 24 | * regenerated by the Form Editor. 25 | */ 26 | @SuppressWarnings("unchecked") 27 | // //GEN-BEGIN:initComponents 28 | private void initComponents() { 29 | 30 | jMenu4 = new javax.swing.JMenu(); 31 | jMenuItem2 = new javax.swing.JMenuItem(); 32 | jPanel1 = new javax.swing.JPanel(); 33 | jLabel1 = new javax.swing.JLabel(); 34 | jButton1 = new javax.swing.JButton(); 35 | jScrollPane1 = new javax.swing.JScrollPane(); 36 | jMenuBar1 = new javax.swing.JMenuBar(); 37 | jMenu1 = new javax.swing.JMenu(); 38 | jMenu3 = new javax.swing.JMenu(); 39 | jMenu2 = new javax.swing.JMenu(); 40 | jMenuItem1 = new javax.swing.JMenuItem(); 41 | 42 | jMenu4.setText("jMenu4"); 43 | 44 | jMenuItem2.setText("jMenuItem2"); 45 | 46 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); 47 | 48 | jLabel1.setText("jLabel1"); 49 | 50 | javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); 51 | jPanel1.setLayout(jPanel1Layout); 52 | jPanel1Layout.setHorizontalGroup( 53 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 54 | .addGroup(jPanel1Layout.createSequentialGroup() 55 | .addContainerGap() 56 | .addComponent(jLabel1) 57 | .addContainerGap(56, Short.MAX_VALUE)) 58 | ); 59 | jPanel1Layout.setVerticalGroup( 60 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 61 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() 62 | .addContainerGap(51, Short.MAX_VALUE) 63 | .addComponent(jLabel1) 64 | .addGap(35, 35, 35)) 65 | ); 66 | 67 | jButton1.setText("jButton1"); 68 | jButton1.addActionListener(new java.awt.event.ActionListener() { 69 | public void actionPerformed(java.awt.event.ActionEvent evt) { 70 | jButton1ActionPerformed(evt); 71 | } 72 | }); 73 | 74 | jMenu1.setText("File"); 75 | 76 | jMenu3.setText("jMenu3"); 77 | jMenu1.add(jMenu3); 78 | 79 | jMenuBar1.add(jMenu1); 80 | 81 | jMenu2.setText("Edit"); 82 | 83 | jMenuItem1.setText("jMenuItem1"); 84 | jMenu2.add(jMenuItem1); 85 | 86 | jMenuBar1.add(jMenu2); 87 | 88 | setJMenuBar(jMenuBar1); 89 | 90 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); 91 | getContentPane().setLayout(layout); 92 | layout.setHorizontalGroup( 93 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 94 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() 95 | .addContainerGap(129, Short.MAX_VALUE) 96 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 97 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() 98 | .addComponent(jButton1) 99 | .addGap(40, 40, 40)) 100 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() 101 | .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE) 102 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))) 103 | .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 104 | .addGap(58, 58, 58)) 105 | ); 106 | layout.setVerticalGroup( 107 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 108 | .addGroup(layout.createSequentialGroup() 109 | .addGap(33, 33, 33) 110 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 111 | .addComponent(jButton1) 112 | .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 113 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 114 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() 115 | .addContainerGap(129, Short.MAX_VALUE) 116 | .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE) 117 | .addGap(50, 50, 50)) 118 | ); 119 | 120 | pack(); 121 | }// //GEN-END:initComponents 122 | 123 | private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed 124 | // TODO add your handling code here: 125 | jLabel1.setVisible(false); 126 | }//GEN-LAST:event_jButton1ActionPerformed 127 | 128 | /** 129 | * @param args the command line arguments 130 | */ 131 | public static void main(String args[]) { 132 | /* Set the Nimbus look and feel */ 133 | // 134 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. 135 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 136 | */ 137 | try { 138 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { 139 | if ("Nimbus".equals(info.getName())) { 140 | javax.swing.UIManager.setLookAndFeel(info.getClassName()); 141 | break; 142 | } 143 | } 144 | } catch (ClassNotFoundException ex) { 145 | java.util.logging.Logger.getLogger(Example.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 146 | } catch (InstantiationException ex) { 147 | java.util.logging.Logger.getLogger(Example.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 148 | } catch (IllegalAccessException ex) { 149 | java.util.logging.Logger.getLogger(Example.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 150 | } catch (javax.swing.UnsupportedLookAndFeelException ex) { 151 | java.util.logging.Logger.getLogger(Example.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 152 | } 153 | // 154 | 155 | /* Create and display the form */ 156 | java.awt.EventQueue.invokeLater(new Runnable() { 157 | public void run() { 158 | new Example().setVisible(true); 159 | } 160 | }); 161 | } 162 | 163 | // Variables declaration - do not modify//GEN-BEGIN:variables 164 | private javax.swing.JButton jButton1; 165 | private javax.swing.JLabel jLabel1; 166 | private javax.swing.JMenu jMenu1; 167 | private javax.swing.JMenu jMenu2; 168 | private javax.swing.JMenu jMenu3; 169 | private javax.swing.JMenu jMenu4; 170 | private javax.swing.JMenuBar jMenuBar1; 171 | private javax.swing.JMenuItem jMenuItem1; 172 | private javax.swing.JMenuItem jMenuItem2; 173 | private javax.swing.JPanel jPanel1; 174 | private javax.swing.JScrollPane jScrollPane1; 175 | // End of variables declaration//GEN-END:variables 176 | } 177 | -------------------------------------------------------------------------------- /SampleCRUD/src/com/main/view/ViewContactFrame.form: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 |
97 |
98 |
99 | 100 | 101 | 102 |
103 |
104 |
105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 |
132 |
133 | -------------------------------------------------------------------------------- /SampleCRUD/test/test.txt: -------------------------------------------------------------------------------- 1 | test file 2 | -------------------------------------------------------------------------------- /first session.txt: -------------------------------------------------------------------------------- 1 | SLDC 2 | Agile??- 3 | Waterfall?- define requiremnt -> requirment gthering - > doc -> start development - > test-> clint 4 | monolithic ? define reuiremnt -> requirment gthering - > doc -> start development - > test-> clint 5 | microservice? micro level - define reuiremnt -> requirment gthering - > doc -> start development - > test-> clint (models) 6 | test driven -> developed code -> test -> develop-> test 7 | vshape-> define reuiremnt -> requirment gthering - > doc -> start development - > test-> clint 8 | 9 | scrum?-- details small - 15 min - kal , aj , aj jo b coding any issue 10 | sprint? -- module , part of project 11 | releases? -- every month , 45 day, 15 days 12 | 13 | IDE : integreated developement envireonment 14 | 15 | 16 | 1) analysis-- give more 17 | 2) tool 18 | 3) developement - less time 19 | 4) test 20 | 21 | java -- middel 22 | swing - frnt end developement 23 | mysql - back end 24 | 25 | desktop application 26 | web appliction 27 | 28 | 29 | 30 | 31 | view : UI 32 | controller : controlling 33 | service : CRUD (create, Read, Update,delete) 34 | model : attributes or entity // not mended 35 | refactoring : database connection file 36 | 37 | 38 | 39 | 40 | 1. make calculutr 41 | 42 | 30: 43 | 44 | class name: camel case 45 | varibale : small 46 | method: small camel case 47 | 48 | text field : prefix txt 49 | button : btn 50 | lbl 51 | chkbx 52 | 53 | 54 | 55 | 56 | library -- 57 | book,student,staff,benches 58 | book - id, name, author,isssue by, issue date , till date,renew, 59 | studnet - name, roll, class, bookid 60 | staff - name, post, salary, timing, id 61 | benches - bencheid , status, 62 | 63 | 64 | school 65 | money 66 | shop 67 | inventory 68 | car washing center 69 | ticket booking 70 | hospital 71 | 72 | 73 | 74 | sample curd - mvc 75 | projectdemo student - direct db connection --------------------------------------------------------------------------------