├── .gitignore ├── src └── main │ ├── resources │ ├── hibernate.properties │ ├── Doctor.hbm.xml │ ├── doctor.sql │ └── orm-sample.xml │ └── java │ └── me │ └── sumithpuri │ └── github │ └── tripura │ ├── spring │ └── orm │ │ └── sample │ │ ├── HibernatePatientDao.java │ │ ├── Doctor.java │ │ └── HibernateDoctorDao.java │ └── app │ └── Tripura.java ├── LICENSE ├── pom.xml └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /src/main/resources/hibernate.properties: -------------------------------------------------------------------------------- 1 | hibernate.dialect org.hibernate.dialect.MySQLDialect -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Sumith Kumar Puri 4 | 5 | [Refer Each Code File for the Actual Licence Statement] 6 | -------------------------------------------------------------------------------- /src/main/resources/Doctor.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/main/resources/doctor.sql: -------------------------------------------------------------------------------- 1 | CREATE DATABASE `data_explosion` /*!40100 DEFAULT CHARACTER SET utf8 */; 2 | 3 | 4 | USE `data_explosion`; 5 | 6 | 7 | CREATE TABLE `doctor_table` ( 8 | `doctor_id` int(11) NOT NULL, 9 | `doctor_name` varchar(75) DEFAULT NULL, 10 | `doctor_speciality` varchar(25) DEFAULT NULL, 11 | PRIMARY KEY (`doctor_id`) 12 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 13 | 14 | 15 | INSERT INTO `data_explosion`.`doctor_table` (`doctor_id`, `doctor_name`, `doctor_speciality`) VALUES ('1', 'Deepak', 'Urologist'); 16 | INSERT INTO `data_explosion`.`doctor_table` (`doctor_id`, `doctor_name`, `doctor_speciality`) VALUES ('2', 'Naveen', 'Cosmetologist'); 17 | INSERT INTO `data_explosion`.`doctor_table` (`doctor_id`, `doctor_name`, `doctor_speciality`) VALUES ('3', 'Syed', 'Dermatologist'); 18 | INSERT INTO `data_explosion`.`doctor_table` (`doctor_id`, `doctor_name`, `doctor_speciality`) VALUES ('4', 'Thomas', 'Cardiologist'); 19 | INSERT INTO `data_explosion`.`doctor_table` (`doctor_id`, `doctor_name`, `doctor_speciality`) VALUES ('5', 'Singh', 'Physician'); 20 | -------------------------------------------------------------------------------- /src/main/resources/orm-sample.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | Doctor.hbm.xml 14 | 15 | 16 | 17 | 18 | ${hibernate.dialect} 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /src/main/java/me/sumithpuri/github/tripura/spring/orm/sample/HibernatePatientDao.java: -------------------------------------------------------------------------------- 1 | package me.sumithpuri.github.tripura.spring.orm.sample; 2 | 3 | import org.springframework.orm.hibernate3.HibernateTemplate; 4 | 5 | /** 6 | * MIT License 7 | * 8 | * Copyright (c) 2018-19, Sumith Kumar Puri 9 | 10 | * GitHub URL https://github.com/sumithpuri 11 | * Code Sample Brainbench Spring 2.5 Certification [+ Spring In Action Samples] 12 | * Sample Topic Core Spring (ORM) 13 | * Certificate URL https://goo.gl/X321kd 14 | * Package Prefix me.sumithpuri.github.tripura 15 | * Project Codename tripura 16 | * Contact E-Mail code@sumithpuri.me 17 | * Contact WhatsApp +91 9591497974 18 | * 19 | * 20 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 21 | * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the 22 | * rights to use, copy, modify, merge, publish, distribute, sub-license and/or sell copies of the Software and to permit 23 | * persons to whom the Software is furnished to do so, subject to the following conditions: 24 | * 25 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the 26 | * Software. 27 | * 28 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 29 | * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 30 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 31 | * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 32 | */ 33 | public class HibernatePatientDao { 34 | 35 | 36 | HibernateTemplate hibernateTemplate; 37 | 38 | public HibernateTemplate getHibernateTemplate() { 39 | return hibernateTemplate; 40 | } 41 | 42 | public void setHibernateTemplate(HibernateTemplate hibernateTemplate) { 43 | this.hibernateTemplate = hibernateTemplate; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/me/sumithpuri/github/tripura/spring/orm/sample/Doctor.java: -------------------------------------------------------------------------------- 1 | package me.sumithpuri.github.tripura.spring.orm.sample; 2 | 3 | /** 4 | * MIT License 5 | * 6 | * Copyright (c) 2018-19, Sumith Kumar Puri 7 | 8 | * GitHub URL https://github.com/sumithpuri 9 | * Code Sample Brainbench Spring 2.5 Certification [+ Spring In Action Samples] 10 | * Sample Topic Core Spring (ORM) 11 | * Certificate URL https://goo.gl/X321kd 12 | * Package Prefix me.sumithpuri.github.tripura 13 | * Project Codename tripura 14 | * Contact E-Mail code@sumithpuri.me 15 | * Contact WhatsApp +91 9591497974 16 | * 17 | * 18 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 19 | * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the 20 | * rights to use, copy, modify, merge, publish, distribute, sub-license and/or sell copies of the Software and to permit 21 | * persons to whom the Software is furnished to do so, subject to the following conditions: 22 | * 23 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the 24 | * Software. 25 | * 26 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 27 | * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 28 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 29 | * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | */ 31 | public class Doctor { 32 | 33 | private int doctor_id; 34 | private String doctor_name; 35 | private String doctor_speciality; 36 | 37 | public Doctor() { 38 | 39 | } 40 | 41 | public Doctor(int doctor_id, String doctor_name, String doctor_speciality) { 42 | super(); 43 | this.doctor_id = doctor_id; 44 | this.doctor_name = doctor_name; 45 | this.doctor_speciality = doctor_speciality; 46 | } 47 | 48 | public int getDoctor_id() { 49 | return doctor_id; 50 | } 51 | 52 | public void setDoctor_id(int doctor_id) { 53 | this.doctor_id = doctor_id; 54 | } 55 | 56 | public String getDoctor_name() { 57 | return doctor_name; 58 | } 59 | 60 | public void setDoctor_name(String doctor_name) { 61 | this.doctor_name = doctor_name; 62 | } 63 | 64 | public String getDoctor_speciality() { 65 | return doctor_speciality; 66 | } 67 | 68 | public void setDoctor_speciality(String doctor_speciality) { 69 | this.doctor_speciality = doctor_speciality; 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /src/main/java/me/sumithpuri/github/tripura/spring/orm/sample/HibernateDoctorDao.java: -------------------------------------------------------------------------------- 1 | package me.sumithpuri.github.tripura.spring.orm.sample; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.orm.hibernate3.HibernateTemplate; 6 | 7 | /** 8 | * MIT License 9 | * 10 | * Copyright (c) 2018-19, Sumith Kumar Puri 11 | 12 | * GitHub URL https://github.com/sumithpuri 13 | * Code Sample Brainbench Spring 2.5 Certification [+ Spring In Action Samples] 14 | * Sample Topic Core Spring (ORM) 15 | * Certificate URL https://goo.gl/X321kd 16 | * Package Prefix me.sumithpuri.github.tripura 17 | * Project Codename tripura 18 | * Contact E-Mail code@sumithpuri.me 19 | * Contact WhatsApp +91 9591497974 20 | * 21 | * 22 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 23 | * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the 24 | * rights to use, copy, modify, merge, publish, distribute, sub-license and/or sell copies of the Software and to permit 25 | * persons to whom the Software is furnished to do so, subject to the following conditions: 26 | * 27 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the 28 | * Software. 29 | * 30 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 31 | * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 32 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 33 | * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 34 | */ 35 | public class HibernateDoctorDao { 36 | 37 | HibernateTemplate hibernateTemplate; 38 | 39 | public HibernateTemplate getHibernateTemplate() { 40 | return hibernateTemplate; 41 | } 42 | 43 | public void setHibernateTemplate(HibernateTemplate hibernateTemplate) { 44 | this.hibernateTemplate = hibernateTemplate; 45 | } 46 | 47 | public Doctor getDoctorById(int doctorId) { 48 | 49 | return (Doctor) hibernateTemplate.get(Doctor.class, doctorId); 50 | } 51 | 52 | public List getAllDoctorsOnSecondLevelCache() { 53 | 54 | List results = hibernateTemplate.find(" FROM com.sumsoft.spring.orm.hibernate.Doctor"); 55 | return results; 56 | } 57 | 58 | public List getAllDoctorsOnHibernateOnly() { 59 | 60 | List results = hibernateTemplate.find(" FROM com.sumsoft.spring.orm.hibernate.Doctor"); 61 | return results; 62 | } 63 | 64 | public void saveDoctor(Doctor doctor) { 65 | hibernateTemplate.save(doctor); 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | 6 | me.sumithpuri.github 7 | skp-mini-marathon-tripura 8 | 0.0.1-SNAPSHOT 9 | jar 10 | 11 | 12 | Tripura : Brainbench Spring 2.5 Certification 13 | http://maven.apache.org 14 | 15 | 16 | UTF-8 17 | 9 18 | 9 19 | false 20 | 21 | 22 | 23 | 24 | junit 25 | junit 26 | 3.8.1 27 | test 28 | 29 | 30 | 31 | org.springframework 32 | spring 33 | 2.5.5 34 | 35 | 36 | org.springframework 37 | spring-aspects 38 | 2.5.5 39 | 40 | 41 | org.hibernate 42 | hibernate 43 | 3.1.3 44 | 45 | 46 | javax.transaction 47 | jta 48 | 1.1 49 | 50 | 51 | commons-dbcp 52 | commons-dbcp 53 | 1.2.2 54 | 55 | 56 | mysql 57 | mysql-connector-java 58 | 5.0.8 59 | 60 | 61 | 62 | 63 | 64 | org.apache.maven.plugins 65 | maven-compiler-plugin 66 | 3.6.1 67 | 68 | 69 | org.codehaus.mojo 70 | exec-maven-plugin 71 | 1.6.0 72 | 73 | 74 | test 75 | 76 | java 77 | 78 | 79 | me.sumithpuri.github.tripura.app.Tripura 80 | true 81 | 82 | 83 | 84 | 85 | 86 | 87 | Brainbench Spring 2.5 Certification (+ Spring In Action Samples) 88 | 89 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Tripura (Brainbench Spring 2.5 Certification) 2 | Brainbench Spring 2.5 Certification (+ Spring In Action Samples) 3 |
4 | MIT License, Copyright (c) 2018-19, Sumith Kumar Puri
5 | https://github.com/sumithpuri 6 |
7 | 8 |

9 | 10 |

11 | 12 |
13 | 14 | 15 |
16 | 17 | 18 | |Project Codename|Tripura| 19 | |--|--| 20 | |Certification|Brainbench Spring 2.5 Certification| 21 | |Certificate URL|https://goo.gl/X321kd| 22 | |Sample Topic|Core Spring (ORM)| 23 | |Package Prefix|me.sumithpuri.github.tripura| 24 | |GitHub URL|https://github.com/sumithpuri/skp-mini-marathon-tripura| 25 | |Contact E-Mail |code@sumithpuri.xyz| 26 | |Contact Number|+91 9591497974 (WhatsApp, Viber, Telegram)| 27 | |Historical|✅ Started this Movement of 1000s of Lines of Java/EE* Code to GitHub
✅ Was a Senior Software Architect (Java/EE) in Manila*, 2018 (At Start) 
✅ Named this Initial Code Journey as [ Manila Code Marathon - 2018 ]
✅ Code Is Non-Proprietary / Non-Copyright from my Work Experience.
✅ Was Back to Bangalore, Named as [ Bangalore Code Nights - 2019. ]
✅ Added More Code under [ -20 Days of Code in Benglauru- ] in 2020
✅ Celebration of Java/Java EE Code as Java Turned 25 in the Year 2020! | 28 | 29 | 30 |
31 | 32 |
33 | 34 |
35 | 36 | 37 | 38 | 39 | 41 |

❤️ Ex-Yahoo, Symantec, Huawei, Oracle*, OpenText*, Finastra*, Atos*
🧡 Xth, XIIth (Computer Science) - Naval Public School, Kochi, India
💛 Bachelor of Engineering (Computer Science)* - SRSIT, Bangalore
💜 Executive Program ( Data Mining and Analytics ) - [IIT, Roorkee]
💚 Executive Certificate Program (Entrepreneurship) - IIM, Kashipur


💙 Proficience (Cryptography & Network Security) - IISc, Bangalore
🤎 Proficience (Innovative Product Design & Dev.) - IISc, Bangalore
🖤 Proficience (Artficial Intelligence/Intelli Agents) - IISc, Bangalore


💎 Sun Certified Java Programmer 1.4 (Core Java)
💎 Sun Certified Java Programmer 5.0 (Core Java)
💎 Sun Certified Business Component Developer 1.3 (EJB/J2EE)
💎 Sun Certified Business Component Developer 5.0 (EJB/J2EE)
💎 Brainbench Spring 2.x Certification*, ( J2EE/Spring )
💎 Brainbench Hibernate 3.x Certification* (Hibernate)
💎 Brainbench Java EE 6.x Certification*, ( J2EE )
💎 Quest C Lang. Certification (C Programming)
💎 Quest C++ Certification (C++ Programming)
💎 Quest Data Structures Certification ( C/C++ )


40 | 🏁 Highest IQ (147) ~ Among Entire Secondary School Batch ~ (Xth)
🏁 MVIT Inter-Collegiate C Programming Contest (Finalist, Top 8)
🏁 SJCIT Inter-Collegiate Web Design (Runners-Up)
🏁 Google India Code Jam 2005 (#376/14,000) - India + SE Asia
🏁 Microsoft Bizspark Startup 2011-'12 (Shortlisted/Recognized)
🏁 Societe Generale Brainwaves Hackathon 2015 (Corp Finalist, AI)
🏁 Mphasis Internal Hackathon Challenge, Season-07 (#07/106)*
🏁 Techgig Code Gladiators 2015 (Open, Top 500)
🏁 Accenture in India YouTube Contest 2015 (BigData, Winner)
🏁 Xebia-Microsoft-GitHub Blogathon 2022 (Microservices, Winner)


🏆 Senior Member, ACM (Elevated) and Senior Member, IEEE (Elevated)
🏆 Author/Blogger, Technology Advice (Developer.com and jGuru)
🏆 DZone Most Valuable Blogger and DZone Core (Elevated)**
🏆 Author and Blogger, Friends of Open JDK Community (Foojay.IO)
🏆 Blogger, Java Code Geeks Program (Shortlisted/Recognized)
🏆 Paid Blogger, Developer.com and jGuru; Blogger, HackerNoon;
🎯 19y Across Associate/Engineer (2003) to Java Practice Leader (2024)

42 | 43 |
44 | 45 |
46 |
47 |
🔴 ALL COPYRIGHTS FOR THE ABOVE PUBLICLY AVAILABLE IMAGE OR PARTS OF THE IMAGE ARE WITH THEIR RESPECTIVE OWNERS, SOURCED/USED FROM GOOGLE SEARCH
48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /src/main/java/me/sumithpuri/github/tripura/app/Tripura.java: -------------------------------------------------------------------------------- 1 | package me.sumithpuri.github.tripura.app; 2 | 3 | import org.springframework.context.ApplicationContext; 4 | import org.springframework.context.support.ClassPathXmlApplicationContext; 5 | 6 | import me.sumithpuri.github.tripura.spring.orm.sample.Doctor; 7 | import me.sumithpuri.github.tripura.spring.orm.sample.HibernateDoctorDao; 8 | 9 | /** 10 | * MIT License 11 | * 12 | * Copyright (c) 2018-19, Sumith Kumar Puri 13 | 14 | * GitHub URL https://github.com/sumithpuri 15 | * Code Sample Brainbench Spring 2.5 Certification [+ Spring In Action Samples] 16 | * Sample Topic Core Spring (ORM) 17 | * Certificate URL https://goo.gl/X321kd 18 | * Package Prefix me.sumithpuri.github.tripura 19 | * Project Codename tripura 20 | * Contact E-Mail code@sumithpuri.me 21 | * Contact WhatsApp +91 9591497974 22 | * 23 | * 24 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 25 | * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the 26 | * rights to use, copy, modify, merge, publish, distribute, sub-license and/or sell copies of the Software and to permit 27 | * persons to whom the Software is furnished to do so, subject to the following conditions: 28 | * 29 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the 30 | * Software. 31 | * 32 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 33 | * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 34 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 35 | * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 36 | */ 37 | public class Tripura { 38 | 39 | private static boolean isDatabaseSetup = false; 40 | 41 | public static void main(String args[]) { 42 | 43 | System.out.println("Copyright (c) 2018-19, Sumith Kumar Puri"); 44 | System.out.println(); 45 | System.out.println("Project Codename Tripura"); 46 | System.out.println("Project Description Core Spring (ORM)"); 47 | System.out.println("Certification Brainbench Spring 2.5 Certification"); 48 | System.out.println("Certificate URL https://goo.gl/X321kd"); 49 | System.out.println("[Developer Notes] [01] Use Java Version 9.0+ Compiler"); 50 | System.out.println("[Developer Notes] [02] Use MySQL 5.7+ Community Version"); 51 | System.out.println(); 52 | 53 | System.out.println(); 54 | System.out.println("Example of Spring ORM using Application Context"); 55 | System.out.println("###############################################"); 56 | 57 | if(isDatabaseSetup) { 58 | 59 | ApplicationContext context = new ClassPathXmlApplicationContext("orm-sample.xml"); 60 | 61 | HibernateDoctorDao doctorDao = (HibernateDoctorDao) context.getBean("doctorDao"); 62 | Doctor doctor = doctorDao.getDoctorById(2); 63 | 64 | System.out.println("Entity Data from Database (Doctor Table)"); 65 | System.out.println("========================================"); 66 | System.out.println("Doctor Id: " + doctor.getDoctor_id()); 67 | System.out.println("Doctor Name: " + doctor.getDoctor_name()); 68 | System.out.println("Doctor Speciality: " + doctor.getDoctor_speciality()); 69 | 70 | } else { 71 | 72 | System.out.println("000. You may choose to Import the Project in Eclipse / Other IDE"); 73 | System.out.println("000. Make Sure that Dependencies & Resources are in ClassPath"); 74 | System.out.println("01a. Install MySQL Community Server Version 5.7.0+ [Developer Default]"); 75 | System.out.println("01b. Make Sure that Schema is Created using [doctor.sql]"); 76 | System.out.println("000. You may use MySQL Workbench or Eclipse to execute [doctor.sql]"); 77 | System.out.println("02a. Make Sure you add the Password in the [orm-sample.xml]"); 78 | System.out.println("000. *Update the [isDatabaseSetup] attribute to [true] in [Tripura]*"); 79 | System.out.println("02b. Next, Run [Tripura] from Eclipse / Command Line (With Classpath Set)"); 80 | System.out.println("003. [Tripura] Spring-Hibernate ORM Demo should show data from Database"); 81 | System.out.println(); 82 | } 83 | } 84 | } 85 | --------------------------------------------------------------------------------