<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3285107159307150268</id><updated>2024-09-17T07:58:48.441+05:30</updated><category term="java"/><category term="java basic"/><category term="Personal"/><category term="J2EE"/><category term="Collection Framework"/><category term="Hibernate"/><category term="Java persistence"/><category term="ORM"/><category term="Database"/><category term="Db2"/><category term="HashMap"/><category term="Java interview questions"/><category term="Learning SQL"/><category term="Oracle"/><category term="SQL basics"/><category term="Hibernate concepts"/><category term="Java Thread"/><category term="Javascript"/><category term="Jsp"/><category term="Spring Framework"/><category term="Thread basic"/><category term="AOP"/><category term="AOP basics"/><category term="AOP class weaving"/><category term="AOP proxy"/><category term="AWS cloud"/><category term="ActiveMQ sample application"/><category term="Advantages of Collection framework"/><category term="Amazon Cloud getting started"/><category term="Android"/><category term="Android example on ubuntu"/><category term="Android on UBUNTU"/><category term="Android using Netbeans"/><category term="Application Servers"/><category term="ArrayList"/><category term="ArrayList sort"/><category term="Automatic dirty checking"/><category term="Class initialization"/><category term="Collection Interfaces"/><category term="Collection framework General purpose implementation classes"/><category term="Comparator"/><category term="Configuring SessionFactory"/><category term="Connect to AWS VM using Putty"/><category term="Create VM on  AWS cloud"/><category term="Diff Tool"/><category term="Diff Tool for RapidSVN on UBUNTU"/><category term="Encapsulation"/><category term="Exception in java"/><category term="Expression language in jsp"/><category term="Forts in Maharashtra"/><category term="Generics"/><category term="Generics and Inheritance"/><category term="HIbernate and Ibatis"/><category term="HashSet"/><category term="How hashmap works internally"/><category term="I18N of website"/><category term="Ibatis"/><category term="Interceptor for Spring Rest controller"/><category term="Interview questions on Exception"/><category term="JBoss and webservices"/><category term="JMS"/><category term="JMS Basics"/><category term="JMS Overview"/><category term="JMS standalone example"/><category term="JSP best practices"/><category term="Java 1.6"/><category term="Java 1.6 New Features"/><category term="Java 8"/><category term="Java 8 release date"/><category term="Java 9"/><category term="Java 9 documentation"/><category term="Java 9 download"/><category term="Java 9 release"/><category term="Java Books"/><category term="Job switching"/><category term="Jsp EL"/><category term="Maven"/><category term="Modular Java"/><category term="New Features"/><category term="OOPS basics"/><category term="OOPS interview questions"/><category term="Object oriented programming basic"/><category term="Raigad"/><category term="Raigad ropeway"/><category term="React 16.0"/><category term="React Fiber"/><category term="React js"/><category term="Regret letter"/><category term="SOAP"/><category term="SOAP timeout"/><category term="SVN linux"/><category term="SVN repository migration"/><category term="Sample Hibernate Application using annotations"/><category term="Sample Hibernate application using mapping file"/><category term="Shambhuraje"/><category term="Spring Notes"/><category term="Spring basics"/><category term="Started Learning UML"/><category term="Thread wait notify example"/><category term="Transactional write-behind"/><category term="Travel"/><category term="Travel Maharashtra"/><category term="TreeList"/><category term="TreeSet"/><category term="Types of AOP"/><category term="UBUNTU"/><category term="UML"/><category term="UML Distilled by Martin Fowler"/><category term="UTF8 in javascript"/><category term="WSDL"/><category term="Webservice"/><category term="Websphere"/><category term="Yash Technologies"/><category term="best java books"/><category term="downloading source of dependency jar using maven"/><category term="finally block in Java"/><category term="instance initialization block"/><category term="internationalization"/><category term="invalid constant pool index 0000"/><category term="meld"/><category term="meld ubuntu"/><category term="missing dear"/><category term="multiple instances"/><category term="mvc:interceptors"/><category term="port already in use"/><category term="problems using threadlocal cache in web application"/><category term="release port of tomcat on ubuntu"/><category term="repository migration"/><category term="repository migration on linux"/><category term="static initialization block"/><category term="stored procedure and Ibatis"/><category term="storing null key in Hashmap"/><category term="subversion migration"/><category term="svn command"/><category term="threadlocal cache"/><category term="threadsafe"/><category term="tomcat notes"/><category term="top java books"/><title type='text'>Shambhuraje - Technology</title><subtitle type='html'>Blog dedicated to Shambhuraje ....</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://shava28.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://shava28.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>shava28</name><uri>http://www.blogger.com/profile/01033288258605439141</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>50</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3285107159307150268.post-313384863149479464</id><published>2017-09-27T09:03:00.001+05:30</published><updated>2017-09-27T15:45:50.261+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="React 16.0"/><category scheme="http://www.blogger.com/atom/ns#" term="React Fiber"/><category scheme="http://www.blogger.com/atom/ns#" term="React js"/><title type='text'>React 16.0 released</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot;&gt;
React 16.0 is released today which is built on top of new core architecture named &#39;Fiber&#39;.&lt;br /&gt;
Most importantly, they are not breaking backward compatibility like what Angular did while releasing 2.0.&lt;/div&gt;
&lt;div dir=&quot;ltr&quot;&gt;
They are now using MIT open source licence so all the confusion around licencing issues is gone.&lt;/div&gt;
&lt;div dir=&quot;ltr&quot;&gt;
&lt;br /&gt;
Here is a link which gives detailed overview of the release.&lt;/div&gt;
&lt;div dir=&quot;ltr&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot;&gt;
&lt;a href=&quot;https://facebook.github.io/react/blog/2017/09/26/react-v16.0.html&quot;&gt;https://facebook.github.io/react/blog/2017/09/26/react-v16.0.html&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://shava28.blogspot.com/feeds/313384863149479464/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3285107159307150268/313384863149479464' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/313384863149479464'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/313384863149479464'/><link rel='alternate' type='text/html' href='http://shava28.blogspot.com/2017/09/react-160-released.html' title='React 16.0 released'/><author><name>shava28</name><uri>http://www.blogger.com/profile/01033288258605439141</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3285107159307150268.post-1910392117700426764</id><published>2017-09-11T21:42:00.000+05:30</published><updated>2017-09-22T10:30:22.185+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="Java 9"/><category scheme="http://www.blogger.com/atom/ns#" term="Java 9 documentation"/><category scheme="http://www.blogger.com/atom/ns#" term="Java 9 download"/><category scheme="http://www.blogger.com/atom/ns#" term="Java 9 release"/><category scheme="http://www.blogger.com/atom/ns#" term="Modular Java"/><title type='text'>Java 9 releasing on 21 September 2017</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
After postponing release many times, finally Java 9 will be releasing on 21 September 2017.&lt;br /&gt;
It is much awaited release of Java as there are many structural changes coming with this release in platform.&lt;br /&gt;
Java 9 is Modular Java.&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;neue helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 14px;&quot;&gt;Pre-general availability documentation is available on Oracle website.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;neue helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;neue helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 14px;&quot;&gt;Link to documentation:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-size: 14px;&quot;&gt;&lt;span style=&quot;color: #222222; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;neue helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;a href=&quot;https://docs.oracle.com/javase/9/whatsnew/toc.htm#JSNEW-GUID-C23AFD78-C777-460B-8ACE-58BE5EA681F6&quot;&gt;https://docs.oracle.com/javase/9/whatsnew/toc.htm#JSNEW-GUID-C23AFD78-C777-460B-8ACE-58BE5EA681F6&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-size: 14px;&quot;&gt;More details about Java 9 project is available at:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-size: 14px;&quot;&gt;&lt;a href=&quot;http://openjdk.java.net/projects/jdk9/&quot;&gt;http://openjdk.java.net/projects/jdk9/&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Java 9 is finally released and JDK download link is:&lt;br /&gt;
&lt;a href=&quot;http://www.oracle.com/technetwork/java/javase/downloads/jdk9-downloads-3848520.html&quot;&gt;http://www.oracle.com/technetwork/java/javase/downloads/jdk9-downloads-3848520.html&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://shava28.blogspot.com/feeds/1910392117700426764/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3285107159307150268/1910392117700426764' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/1910392117700426764'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/1910392117700426764'/><link rel='alternate' type='text/html' href='http://shava28.blogspot.com/2017/09/java-9-releasing-on-21-september-2017.html' title='Java 9 releasing on 21 September 2017'/><author><name>shava28</name><uri>http://www.blogger.com/profile/01033288258605439141</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3285107159307150268.post-8513590627913237222</id><published>2017-09-10T17:05:00.001+05:30</published><updated>2017-09-10T17:07:22.077+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Interceptor for Spring Rest controller"/><category scheme="http://www.blogger.com/atom/ns#" term="J2EE"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="mvc:interceptors"/><category scheme="http://www.blogger.com/atom/ns#" term="Spring Framework"/><title type='text'>Interceptor for Spring Rest controller</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;tr_bq&quot;&gt;
Create a java class which extends&amp;nbsp;HandlerInterceptorAdapter.&lt;/div&gt;
You can override preHandle and postHandle methods as per your requirement.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;System.out.println(&quot;In Prehandle&quot;);&lt;br /&gt;
}&lt;br /&gt;
public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; System.out.println(&quot;In postHandle&quot;);&lt;br /&gt;
}&lt;/blockquote&gt;
&lt;br /&gt;
In spring-mvc-context.xml file, define class as interceptor as&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;mvc:interceptors&gt;&lt;br /&gt;&amp;nbsp; &lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;bean class=&quot;test.MyIntercepter&quot;&gt;&lt;br /&gt;&lt;/bean&gt;&lt;/mvc:interceptors&gt;&amp;nbsp;&amp;nbsp;&lt;/blockquote&gt;
&lt;br /&gt;
Now your interceptor class should intercept all requests towards Rest controller.&amp;nbsp;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://shava28.blogspot.com/feeds/8513590627913237222/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3285107159307150268/8513590627913237222' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/8513590627913237222'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/8513590627913237222'/><link rel='alternate' type='text/html' href='http://shava28.blogspot.com/2017/09/intercepter-for-spring-rest-controller.html' title='Interceptor for Spring Rest controller'/><author><name>shava28</name><uri>http://www.blogger.com/profile/01033288258605439141</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3285107159307150268.post-7574812225356445140</id><published>2017-07-30T12:29:00.000+05:30</published><updated>2017-10-13T14:54:43.597+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Amazon Cloud getting started"/><category scheme="http://www.blogger.com/atom/ns#" term="AWS cloud"/><category scheme="http://www.blogger.com/atom/ns#" term="Connect to AWS VM using Putty"/><category scheme="http://www.blogger.com/atom/ns#" term="Create VM on  AWS cloud"/><title type='text'>Amazon Web Services - Getting started</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;Registration:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;After filling basic information, you need to fill billing information (Credit card details) during the registration process.&lt;/li&gt;
&lt;li&gt;After entering billing information, Transaction of Rs. 2 will be initiated to verify your Billing details (Transaction will be cancelled later by Amazon automatically).&lt;/li&gt;
&lt;li&gt;Verification of Phone/Mobile with Automated Call.&lt;/li&gt;
&lt;li&gt;Post verification, your account will be created.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Getting Started with Amazon Web Service Cloud:&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;On AWS dashboard, there are different options to start with, Choose - Launch a Virtual Machine option&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-W76ecJogR62GanTjOY9zx1Xwq9sm8NfRmlaiMNMo0-bcAFPJcC7u9zsaL9y5DbFRtP0NUmlqiepWLISCCmDfjiaS97nSSrJetbsb7iPSeKEsK8s_GpSwp875dsfUEM4x-EVrRoBB_YCm/s1600/aws-dashboard.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;382&quot; data-original-width=&quot;964&quot; height=&quot;158&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-W76ecJogR62GanTjOY9zx1Xwq9sm8NfRmlaiMNMo0-bcAFPJcC7u9zsaL9y5DbFRtP0NUmlqiepWLISCCmDfjiaS97nSSrJetbsb7iPSeKEsK8s_GpSwp875dsfUEM4x-EVrRoBB_YCm/s400/aws-dashboard.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Type Name for your instance.&lt;/li&gt;
&lt;li&gt;There will be option to download private key to connect to instance.&lt;/li&gt;
&lt;li&gt;Download private key(*.pem format)&lt;/li&gt;
&lt;li&gt;After you submit, your instance will be launched successfully.&lt;/li&gt;
&lt;li&gt;You can view the instance from Instances option of EC2 Dashboard.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqU_aj16QVTGZj3Vu1_OKs89DNbcZGoiAwYn08aZp9yiVXcb5dJBp4RqRfejRTTkNyx74fS9iFD2HLeyruc4Ppdpp_JonhA9bqspMg4gzxt8zWatozTpFXChDQlU6ivySZDj4PWxh2tkyM/s1600/2-dashboard.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;594&quot; data-original-width=&quot;1600&quot; height=&quot;148&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqU_aj16QVTGZj3Vu1_OKs89DNbcZGoiAwYn08aZp9yiVXcb5dJBp4RqRfejRTTkNyx74fS9iFD2HLeyruc4Ppdpp_JonhA9bqspMg4gzxt8zWatozTpFXChDQlU6ivySZDj4PWxh2tkyM/s400/2-dashboard.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Connecting to Virtual Machine using Putty:&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;You need to generate private key using PuttyGen application.&lt;/li&gt;
&lt;li&gt;Load your_key.pem in PuttyGen by clicking Load button.&lt;/li&gt;
&lt;li&gt;Click on generate private key button. (It will warning message to save key without passcode. Select Yes).&lt;/li&gt;
&lt;li&gt;Save the private key (format *.ppk)&lt;/li&gt;
&lt;li&gt;Open Putty terminal window.&lt;/li&gt;
&lt;li&gt;Default user for VM is &quot;ec2-user&quot;.&lt;/li&gt;
&lt;li&gt;Check Public DNS of your Virtual machine on EC2 dashboard. Format of DNS is like ëc2-*-2.compute.amazonaws.com&lt;/li&gt;
&lt;li&gt;Enter hostname as : ec2-user@public-DNS of your VM. - ec2-user@ec2-*-us-east-2.compute.amazonaws.com&lt;/li&gt;
&lt;li&gt;Enter port as 22.&lt;/li&gt;
&lt;li&gt;Open SSH tab on left and on Auth tab - Select private key file as *.ppk file which is generated using PuttyGen tool.&lt;/li&gt;
&lt;li&gt;Click on Open. You should be able to connect to Virtual Machine.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;b&gt;TroubleShooting while connecting to VM:&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;By default, IP address for Inbound connections on VM is the one from which you have created Virtual Machine and it is managed by Security Groups.&lt;/li&gt;
&lt;li&gt;Check which Security Group is assigned to your VM in Description at the bottom.&lt;/li&gt;
&lt;li&gt;View Inbound Rules - Set source IP as 0.0.0.0/0 for Port 22 if it is not already set as 0.0.0.0/0&lt;/li&gt;
&lt;li&gt;Now you should be able to connect.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
You will see Terminal console with following message:&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
Using username &quot;ec2-user&quot;.&lt;br /&gt;
Authenticating with public key &quot;imported-openssh-key&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;__| &amp;nbsp;__|_ &amp;nbsp;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_| &amp;nbsp;( &amp;nbsp; &amp;nbsp; / &amp;nbsp; Amazon Linux AMI&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; ___|\___|___|&lt;br /&gt;
https://aws.amazon.com/amazon-linux-ami/2017.03-release-notes/&lt;br /&gt;
1 package(s) needed for security, out of 3 available&lt;br /&gt;
Run &quot;sudo yum update&quot; to apply all updates.&lt;br /&gt;
[machine-info/] $&lt;/blockquote&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;Note:&lt;/b&gt;&lt;br /&gt;
By default, JDK version .7 is installed on VM. You can change it to JDK version 8&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://shava28.blogspot.com/feeds/7574812225356445140/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3285107159307150268/7574812225356445140' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/7574812225356445140'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/7574812225356445140'/><link rel='alternate' type='text/html' href='http://shava28.blogspot.com/2017/07/amazon-web-services-getting-started.html' title='Amazon Web Services - Getting started'/><author><name>shava28</name><uri>http://www.blogger.com/profile/01033288258605439141</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-W76ecJogR62GanTjOY9zx1Xwq9sm8NfRmlaiMNMo0-bcAFPJcC7u9zsaL9y5DbFRtP0NUmlqiepWLISCCmDfjiaS97nSSrJetbsb7iPSeKEsK8s_GpSwp875dsfUEM4x-EVrRoBB_YCm/s72-c/aws-dashboard.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3285107159307150268.post-6207426046666077338</id><published>2015-08-14T17:41:00.002+05:30</published><updated>2015-08-14T17:41:42.835+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="J2EE"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="JBoss and webservices"/><category scheme="http://www.blogger.com/atom/ns#" term="Webservice"/><category scheme="http://www.blogger.com/atom/ns#" term="WSDL"/><title type='text'>Error on JBoss 6.2 while calling webservice when wsdl:binding tag is before wsdl:portType in WSDL</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot;&gt;
Exception while calling webservice call Jboss server when wsdl:binding tag is before wsdl:portType tag &amp;nbsp;in wsdl.&amp;nbsp;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot;&gt;
Stack trace for error :&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
13:29:59,406 INFO &amp;nbsp;[stdout] (http-localhost/127.0.0.1:8080-1) Caused by: java.lang.NullPointerException&lt;br /&gt;
13:29:59,406 INFO &amp;nbsp;[stdout] (http-localhost/127.0.0.1:8080-1) at com.ibm.wsdl.xml.WSDLReaderImpl.parseExtensibilityAttributes(WSDLReaderImpl.java:1334)&lt;br /&gt;
13:29:59,407 INFO &amp;nbsp;[stdout] (http-localhost/127.0.0.1:8080-1) at com.ibm.wsdl.xml.WSDLReaderImpl.parseOperation(WSDLReaderImpl.java:1684)&lt;br /&gt;
13:29:59,407 INFO &amp;nbsp;[stdout] (http-localhost/127.0.0.1:8080-1) at com.ibm.wsdl.xml.WSDLReaderImpl.parsePortType(WSDLReaderImpl.java:1474)&lt;br /&gt;
13:29:59,407 INFO &amp;nbsp;[stdout] (http-localhost/127.0.0.1:8080-1) at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(WSDLReaderImpl.java:313)&lt;br /&gt;
13:29:59,407 INFO &amp;nbsp;[stdout] (http-localhost/127.0.0.1:8080-1) at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2265)&lt;br /&gt;
13:29:59,407 INFO &amp;nbsp;[stdout] (http-localhost/127.0.0.1:8080-1) at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2251)&lt;br /&gt;
13:29:59,407 INFO &amp;nbsp;[stdout] (http-localhost/127.0.0.1:8080-1) at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:261)&lt;br /&gt;
13:29:59,407 INFO &amp;nbsp;[stdout] (http-localhost/127.0.0.1:8080-1) at org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:206)&lt;br /&gt;
13:29:59,407 INFO &amp;nbsp;[stdout] (http-localhost/127.0.0.1:8080-1) at org.apache.cxf.wsdl11.WSDLServiceFactory.(WSDLServiceFactory.java:98)&lt;br /&gt;
13:29:59,408 INFO &amp;nbsp;[stdout] (http-localhost/127.0.0.1:8080-1) at org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:204)&lt;br /&gt;
13:29:59,408 INFO &amp;nbsp;[stdout] (http-localhost/127.0.0.1:8080-1) at org.apache.cxf.jaxws.ServiceImpl.(ServiceImpl.java:149)&lt;br /&gt;
13:29:59,408 INFO &amp;nbsp;[stdout] (http-localhost/127.0.0.1:8080-1) at org.jboss.wsf.stack.cxf.client.ProviderImpl$JBossWSServiceImpl.(ProviderImpl.java:509)&lt;br /&gt;
13:29:59,408 INFO &amp;nbsp;[stdout] (http-localhost/127.0.0.1:8080-1) at org.jboss.wsf.stack.cxf.client.ProviderImpl.createServiceDelegate(ProviderImpl.java:204)&lt;br /&gt;
13:29:59,408 INFO &amp;nbsp;[stdout] (http-localhost/127.0.0.1:8080-1) at javax.xml.ws.Service.(Service.java:57)&lt;br /&gt;
&lt;br /&gt;
Reason:&lt;br /&gt;
JBoss uses&amp;nbsp;wsdl4j-1.6.2.redhat-6.jar (Jboss version 6.2), which does not contain fix for the issue.&lt;br /&gt;
Path to jar in JBoss :&amp;nbsp;\jboss-eap-6.2\modules\system\layers\base\javax\wsdl4j\api\main&lt;br /&gt;
&lt;br /&gt;
[A NPE occurs when parsing a WSDL with the &lt;binding&gt; defined before the &lt;porttype&gt; element. See stack trace below. The cause is in parseOperation - the line that sets &#39;op&#39; to null if retrieved = true should be moved after the invocation of parseExtensibilityAttributes]&lt;/porttype&gt;&lt;/binding&gt;&lt;br /&gt;
&lt;br /&gt;
Detailed information is available at: &amp;nbsp;&lt;a href=&quot;http://sourceforge.net/p/wsdl4j/bugs/37/&quot;&gt;http://sourceforge.net/p/wsdl4j/bugs/37/&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://shava28.blogspot.com/feeds/6207426046666077338/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3285107159307150268/6207426046666077338' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/6207426046666077338'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/6207426046666077338'/><link rel='alternate' type='text/html' href='http://shava28.blogspot.com/2015/08/error-on-jboss-62-while-calling.html' title='Error on JBoss 6.2 while calling webservice when wsdl:binding tag is before wsdl:portType in WSDL'/><author><name>shava28</name><uri>http://www.blogger.com/profile/01033288258605439141</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3285107159307150268.post-3601531747036443847</id><published>2015-01-04T21:41:00.000+05:30</published><updated>2015-01-04T21:41:11.834+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="Spring basics"/><category scheme="http://www.blogger.com/atom/ns#" term="Spring Framework"/><category scheme="http://www.blogger.com/atom/ns#" term="Spring Notes"/><title type='text'>Spring Notes : What is Spring Framework</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
What is Spring Framework?&lt;br /&gt;
Spring is a lightweight&amp;nbsp; framework for building Enterprise applications using Java. It provides all infrastructure support for developing applications. You can build your applications using POJO (Plain old java objects) without worrying about enterprise service code like transaction management, logging etc. It is a modular framework which helps you to use only those modules which are required for your application. You can easily integrate Spring features with other frameworks like Hibernate, Struts etc. Dependency Injection is main feature of Spring.&lt;br /&gt;
&lt;br /&gt;
Dependency Injection:&lt;br /&gt;
Dependency Injection is core of Spring framework. In Dependency Injection, Container is responsible for Object Life-cycle (object creation, resolving dependencies for object etc) and enterprise applications can be built using POJO&#39;s. It can be achieved using configuration files or annotations.&lt;br /&gt;
&lt;br /&gt;
Different modules of Spring:&lt;br /&gt;
1. Core container: Core, Beans, Context, Spring Expression language(SpEL) modules&lt;br /&gt;
2. Spring AOP (Aspect oriented programming) :AOP module&lt;br /&gt;
3. Data Access/ Integration: JDBC, ORM, OMX, JMS, Transactions modules&lt;br /&gt;
4. Web: Web, Web-Servlet, Web-Socket, Web-Portlet modules&lt;br /&gt;
5. Test : Test module for testing Spring components usinh JUnit or TestNG frameworks.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://shava28.blogspot.com/feeds/3601531747036443847/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3285107159307150268/3601531747036443847' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/3601531747036443847'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/3601531747036443847'/><link rel='alternate' type='text/html' href='http://shava28.blogspot.com/2015/01/spring-notes-what-is-spring-framework.html' title='Spring Notes : What is Spring Framework'/><author><name>shava28</name><uri>http://www.blogger.com/profile/01033288258605439141</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3285107159307150268.post-7772147219147187667</id><published>2014-12-18T21:48:00.000+05:30</published><updated>2014-12-18T21:48:23.792+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Expression language in jsp"/><category scheme="http://www.blogger.com/atom/ns#" term="Jsp"/><category scheme="http://www.blogger.com/atom/ns#" term="JSP best practices"/><category scheme="http://www.blogger.com/atom/ns#" term="Jsp EL"/><title type='text'>Expression language (EL) and jstl tags in JSP</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Expression language is very useful and powerful tool available for developers. With JSTL tags and expression language, we can avoid Scriptlets in JSP to make JSP code more clear and maintainable. &lt;br /&gt;
&lt;br /&gt;
Here are few examples to use EL with jstl tags to perform logical operations required in JSP:&lt;br /&gt;
&lt;br /&gt;
1. Condition to check value is not null or blank:&lt;br /&gt;
If you want to check value of &quot;abc&quot;&amp;nbsp; variable is not blank and not null&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;lt;c:if test=&quot;${not empty abc}&quot;&amp;gt;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
Your HTML/JSP code&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;lt;/c:if&amp;gt;&lt;/blockquote&gt;
To print value you can also use&lt;br /&gt;
${not empty abc ?abc:xyz}&lt;br /&gt;
&lt;br /&gt;
2. Comparision&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;lt;c:if test=&quot;${abc eq &#39;1&#39;}&quot;&amp;gt;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
Your HTML/JSP code&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;lt;/c:if&amp;gt;&lt;/blockquote&gt;
3. Multiple condition&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;You can use multiple if-else condition &lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;lt;c:choose&amp;gt;&lt;/blockquote&gt;
&lt;/blockquote&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;c:when test=&quot;${not empty abc}&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Code when abc not empty&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/c:when&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;c:when test=&quot;${not empty xyz}&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Code when xyz not empty&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/c:when&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;c:otherwise&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Code when both abc and xyz empty&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/c:otherwise&amp;gt;&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;lt;/c:choose&amp;gt; &lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://shava28.blogspot.com/feeds/7772147219147187667/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3285107159307150268/7772147219147187667' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/7772147219147187667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/7772147219147187667'/><link rel='alternate' type='text/html' href='http://shava28.blogspot.com/2014/12/expression-language-el-and-jstl-tags-in.html' title='Expression language (EL) and jstl tags in JSP'/><author><name>shava28</name><uri>http://www.blogger.com/profile/01033288258605439141</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3285107159307150268.post-1096773719399620635</id><published>2014-07-01T09:55:00.001+05:30</published><updated>2014-09-13T08:26:04.300+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Application Servers"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="java basic"/><category scheme="http://www.blogger.com/atom/ns#" term="SOAP"/><category scheme="http://www.blogger.com/atom/ns#" term="SOAP timeout"/><category scheme="http://www.blogger.com/atom/ns#" term="Websphere"/><title type='text'>How to increase SOAP request timeout value in Websphere</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
How to increase SOAP request timeout value in Websphere?&lt;br /&gt;
Change &quot;com.ibm.SOAP.requestTimeout&quot; configuration setting.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Path &lt;/b&gt;: {WebSphere-Profile-Root-Folder}\properties&lt;br /&gt;
&lt;b&gt;File name&lt;/b&gt;: soap.client.props&lt;br /&gt;
&lt;b&gt;Parameter&lt;/b&gt;:&lt;br /&gt;
&lt;i&gt;com.ibm.SOAP.requestTimeout&lt;/i&gt; : Default value is 180, 0 implies no timeout&lt;br /&gt;
&lt;br /&gt;
So when is 180 seconds timeout  not enough?&lt;br /&gt;
Answer: &amp;nbsp;Build automation tools like Jenkins use SOAP connectivity port to deploy applications and there might be &quot;Connection reset&quot; error if deployment step takes more than 180 seconds.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;Exception stack trace :


&lt;br /&gt;
&lt;pre&gt;exception information: com.ibm.websphere.management.exception.ConnectorException&lt;/pre&gt;
&lt;pre&gt;[wsadmin] org.apache.soap.SOAPException: [SOAPException:&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;faultCode=SOAP-ENV:Client; msg=Connection reset;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;targetException=java.net.SocketException: Connection reset]

&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://shava28.blogspot.com/feeds/1096773719399620635/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3285107159307150268/1096773719399620635' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/1096773719399620635'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/1096773719399620635'/><link rel='alternate' type='text/html' href='http://shava28.blogspot.com/2014/07/how-to-increase-soap-timeout-value-in.html' title='How to increase SOAP request timeout value in Websphere'/><author><name>shava28</name><uri>http://www.blogger.com/profile/01033288258605439141</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3285107159307150268.post-407746981971010703</id><published>2014-03-04T21:58:00.001+05:30</published><updated>2014-03-05T07:48:32.792+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="Java 8"/><category scheme="http://www.blogger.com/atom/ns#" term="Java 8 release date"/><category scheme="http://www.blogger.com/atom/ns#" term="java basic"/><title type='text'>Java 8: Release date 18th March 2014</title><content type='html'>&lt;p&gt;Finally, Java 8 is releasing in few days on 18th March. Every java developer is excited to know what new features are coming. &lt;br&gt;
Lambda expressions, default and static methods in Interface are few new features.&lt;br&gt;
Lambda expressions will be much talked subject after people start using it.&lt;br&gt;
Reality is, industry is always 5 years behind in using latest version of java.&lt;br&gt;
Lets see and explore Java 8 after 18th March.&lt;/p&gt;
</content><link rel='replies' type='application/atom+xml' href='http://shava28.blogspot.com/feeds/407746981971010703/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3285107159307150268/407746981971010703' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/407746981971010703'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/407746981971010703'/><link rel='alternate' type='text/html' href='http://shava28.blogspot.com/2014/03/java-8-release-date-18th-march-2014.html' title='Java 8: Release date 18th March 2014'/><author><name>shava28</name><uri>http://www.blogger.com/profile/01033288258605439141</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3285107159307150268.post-5456135006628969921</id><published>2014-02-20T17:01:00.002+05:30</published><updated>2014-02-20T17:01:44.591+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Exception in java"/><category scheme="http://www.blogger.com/atom/ns#" term="finally block in Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Interview questions on Exception"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="java basic"/><category scheme="http://www.blogger.com/atom/ns#" term="Java interview questions"/><title type='text'>Java : Few basic things to know about &quot;finally&quot; block in Exception handling</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;i&gt;finally &lt;/i&gt;block is used to as cleanup facility in case of program abruptly interrupts due to exception. e.g. Closing I/O resources, closing connection etc.&lt;br /&gt;
&lt;br /&gt;
Lets find out more details about finally block and answers to few basic questions.&lt;br /&gt;
Question 1: Can we write try block without catch?&lt;br /&gt;
Answer: Yes. we can write try - finally block as shown in below code example.&lt;br /&gt;
&lt;br /&gt;
Question 2 : Whether finally block is executed if exception is thrown from try block?&lt;br /&gt;
Answer : Yes. Code in finally block will be executed even if exception is thrown from try block.&lt;br /&gt;
&lt;br /&gt;
Question 3: Exception A is thrown from try block and while executing finally block, exception B is thrown. Which exception will be thrown to calling method?&lt;br /&gt;
Answer : Exception B which is thrown from finally block. Exception thrown from try block is discarded&lt;br /&gt;
&lt;br /&gt;
Code to verify above scenarios:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
* Program to show how exception in try block is discarded if there is exception in finally block&lt;br /&gt;
*/&lt;br /&gt;
public class TestException {&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public static void main(String[] args) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;try {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;testException();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;} catch (Exception e) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;System.out.println(e);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public static void testException(){&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;Integer j = null;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;Integer k;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;String [] strArray = new String []{&quot;aa&quot;};&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;try {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;System.out.println(&quot;In try&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;//ArrayIndexOutOfBoundsException will be thrown from below code&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;String testStr = strArray[1];&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;finally{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;System.out.println(&quot;in finally&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;//NullPointerException will be thrown from below code as j is null.&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;k = j *10;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Output after program execution:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
In try&lt;br /&gt;
in finally&lt;br /&gt;
java.lang.NullPointerException&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://shava28.blogspot.com/feeds/5456135006628969921/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3285107159307150268/5456135006628969921' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/5456135006628969921'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/5456135006628969921'/><link rel='alternate' type='text/html' href='http://shava28.blogspot.com/2014/02/java-few-basic-things-to-know-about.html' title='Java : Few basic things to know about &quot;finally&quot; block in Exception handling'/><author><name>shava28</name><uri>http://www.blogger.com/profile/01033288258605439141</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3285107159307150268.post-2742179005453588795</id><published>2014-01-13T15:48:00.001+05:30</published><updated>2014-01-13T15:48:36.846+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Generics"/><category scheme="http://www.blogger.com/atom/ns#" term="Generics and Inheritance"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="java basic"/><category scheme="http://www.blogger.com/atom/ns#" term="Java interview questions"/><title type='text'>Java: Generics and Inheritance- Important things</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Generics helps to write code in easy way.&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;-Generics makes code robust by adding strong type check at compile time check.&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;- Casting is not required as you define type while creating objects.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There is very important point to note related to Generics and Inheritance concept of OOPS.&lt;br /&gt;
&lt;br /&gt;
Consider following java class:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
import java.util.ArrayList;&lt;br /&gt;
import java.util.Iterator;&lt;br /&gt;
import java.util.List;&lt;br /&gt;
&lt;br /&gt;
public class TestGenericList {&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;/**&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; * @param args&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; */&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public static void main(String[] args) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;List&amp;lt; String &amp;gt;&amp;nbsp;strList&amp;nbsp;&amp;nbsp;= new ArrayList &amp;lt;&amp;nbsp;String &amp;gt;&lt;string&gt;();&lt;/string&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &amp;nbsp;&lt;/span&gt;strList&amp;nbsp;.add(&quot;a&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &amp;nbsp;&lt;/span&gt;strList&amp;nbsp;.add(&quot;b&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &amp;nbsp;&lt;/span&gt;strList&amp;nbsp;.add(&quot;c&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;TestGenericList t = new TestGenericList();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: red; white-space: pre;&quot;&gt;&lt;b&gt;// Can we use below code to call printList?&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;//  &lt;/span&gt;t.printList(strList&amp;nbsp;);&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public void printList(List &amp;lt; Object &amp;gt; list &amp;nbsp;){&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;for (Iterator iterator = list.iterator(); iterator.hasNext();) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;Object object = (Object) iterator.next();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;System.out.println(object);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We know that String extends Object so you assume that you can pass strList object to printList function.&lt;br /&gt;
&lt;b&gt;WRONG&lt;/b&gt;&lt;br /&gt;
You can not pass strList to printList function as function accept list of Object.&lt;br /&gt;
&lt;br /&gt;
Even though String extends Object but List &lt;string&gt;&lt;string&gt; does not extend List&amp;lt; Object &amp;gt;&lt;/string&gt;&lt;/string&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjajSiTEgVWWbjzpJR50Rvln_oBc5_2s-7m7Gc_hH6jcsUP9iapC_LbR0Ro-7tDGXZgAu3KghExOR-1W1nsM0Pzlp5u4r3x7c8xO5pDmN9S-99sLpiBiQWqVxj3dBttL8Ryho_hyzsCJxng/s1600/generics_inheritance.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjajSiTEgVWWbjzpJR50Rvln_oBc5_2s-7m7Gc_hH6jcsUP9iapC_LbR0Ro-7tDGXZgAu3KghExOR-1W1nsM0Pzlp5u4r3x7c8xO5pDmN9S-99sLpiBiQWqVxj3dBttL8Ryho_hyzsCJxng/s1600/generics_inheritance.png&quot; height=&quot;300&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
You can refer java tutorials for more details at:&lt;br /&gt;
&lt;a href=&quot;http://docs.oracle.com/javase/tutorial/java/generics/inheritance.html&quot;&gt;http://docs.oracle.com/javase/tutorial/java/generics/inheritance.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;string&gt;&lt;/string&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://shava28.blogspot.com/feeds/2742179005453588795/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3285107159307150268/2742179005453588795' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/2742179005453588795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/2742179005453588795'/><link rel='alternate' type='text/html' href='http://shava28.blogspot.com/2014/01/java-generics-and-inheritance-important.html' title='Java: Generics and Inheritance- Important things'/><author><name>shava28</name><uri>http://www.blogger.com/profile/01033288258605439141</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjajSiTEgVWWbjzpJR50Rvln_oBc5_2s-7m7Gc_hH6jcsUP9iapC_LbR0Ro-7tDGXZgAu3KghExOR-1W1nsM0Pzlp5u4r3x7c8xO5pDmN9S-99sLpiBiQWqVxj3dBttL8Ryho_hyzsCJxng/s72-c/generics_inheritance.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3285107159307150268.post-3926568833455151582</id><published>2013-12-31T12:05:00.000+05:30</published><updated>2013-12-31T12:06:44.019+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="downloading source of dependency jar using maven"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="Maven"/><title type='text'>How to download source of dependencies jars using Maven</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
To download source of dependencies jars in local repository while building project using Maven, you need to add &quot;dependency:sources&quot; goal while building your project.&lt;br /&gt;
&lt;br /&gt;
Run following command for your project and it will download all sources for dependencies if it exists.&lt;br /&gt;
Command : mvn&amp;nbsp;dependency:sources&lt;br /&gt;
&lt;br /&gt;
You can find more information related to dependency plugin at &lt;a href=&quot;http://maven.apache.org/plugins/maven-dependency-plugin/&quot; target=&quot;_blank&quot;&gt;Maven Dependency Plugin&lt;/a&gt; project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://shava28.blogspot.com/feeds/3926568833455151582/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3285107159307150268/3926568833455151582' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/3926568833455151582'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/3926568833455151582'/><link rel='alternate' type='text/html' href='http://shava28.blogspot.com/2013/12/how-to-download-source-of-dependencies.html' title='How to download source of dependencies jars using Maven'/><author><name>shava28</name><uri>http://www.blogger.com/profile/01033288258605439141</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3285107159307150268.post-8609178836773211075</id><published>2013-12-01T07:52:00.000+05:30</published><updated>2014-01-01T18:24:37.524+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="best java books"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="Java Books"/><category scheme="http://www.blogger.com/atom/ns#" term="top java books"/><title type='text'>Java: List of books you must read</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Here is list of must read books if you are java developer.&lt;br /&gt;
1. Head first OOAD &lt;br/&gt;
2. Effective java&lt;br /&gt;
3. Java puzzlers&lt;br /&gt;
4. Java concurrency in practice&lt;br /&gt;
5. Design patterns by GOF &lt;br /&gt;
6. Spring in action
&lt;/div&gt;

Your comments are welcome if you want to add to this list.
</content><link rel='replies' type='application/atom+xml' href='http://shava28.blogspot.com/feeds/8609178836773211075/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3285107159307150268/8609178836773211075' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/8609178836773211075'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/8609178836773211075'/><link rel='alternate' type='text/html' href='http://shava28.blogspot.com/2013/12/java-must-read-list-of-books.html' title='Java: List of books you must read'/><author><name>shava28</name><uri>http://www.blogger.com/profile/01033288258605439141</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3285107159307150268.post-114525599558931307</id><published>2013-08-26T15:20:00.000+05:30</published><updated>2013-08-26T15:20:05.375+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="java basic"/><category scheme="http://www.blogger.com/atom/ns#" term="Java Thread"/><category scheme="http://www.blogger.com/atom/ns#" term="Thread basic"/><category scheme="http://www.blogger.com/atom/ns#" term="Thread wait notify example"/><title type='text'>Java: Thread program to demonstrate wait and notify</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Below question was asked to one of my friend during interview:&lt;br /&gt;
&lt;br /&gt;
Write program to create 2 Threads &quot;Jack&quot; and &quot;Jill&quot;. You write a program which will print &quot; Jack Jill Jack Jill&quot;&lt;br /&gt;
Thread execution: &amp;nbsp;Thread1, Thread2, again Thread2, then Thread2.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I tried to write program for above problem :&lt;br /&gt;
&lt;div&gt;
&lt;b&gt;T1. Java&lt;/b&gt;:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
public class T1 implements Runnable {&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;private static int count = 0;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public synchronized void run() {&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;int threadCount = 0;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;while (true) {&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;count++;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;threadCount = count;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;System.out.println(Thread.currentThread().getName());&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;try {&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;notifyAll();&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;while (threadCount &amp;gt;= count) {&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;wait();&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;}&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;} catch (InterruptedException e) {&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;e.printStackTrace();&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;// If you comment below if block, Jack , jill threads will run&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;// forever one after another.&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;// So added to check if Jack and Jill threads run one after another&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;// 2 times&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;if (count &amp;gt;= 4) {&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;count++;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;System.out.println(Thread.currentThread().getName() + &quot; End&quot;);&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;notifyAll();&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;break;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public static void main(String[] args) {&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;T1 t = new T1();&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;Thread t1 = new Thread(t, &quot;Jack&quot;);&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;Thread t2 = new Thread(t , &quot;Jill&quot;);&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;t1.start();&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;t2.start();&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Output&lt;/b&gt;:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
Jack&lt;/div&gt;
&lt;div&gt;
Jill&lt;/div&gt;
&lt;div&gt;
Jack&lt;/div&gt;
&lt;div&gt;
Jill&lt;/div&gt;
&lt;div&gt;
Jack End&lt;/div&gt;
&lt;div&gt;
Jill End&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://shava28.blogspot.com/feeds/114525599558931307/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3285107159307150268/114525599558931307' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/114525599558931307'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/114525599558931307'/><link rel='alternate' type='text/html' href='http://shava28.blogspot.com/2013/08/java-thread-program-to-demonstrate-wait.html' title='Java: Thread program to demonstrate wait and notify'/><author><name>shava28</name><uri>http://www.blogger.com/profile/01033288258605439141</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3285107159307150268.post-2463775701096005018</id><published>2013-07-27T16:38:00.002+05:30</published><updated>2013-07-27T16:39:22.805+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Collection Framework"/><category scheme="http://www.blogger.com/atom/ns#" term="HashMap"/><category scheme="http://www.blogger.com/atom/ns#" term="How hashmap works internally"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="java basic"/><title type='text'>Java : How HashMap stores and returns element </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial;&quot;&gt;
Hashing technique is useful in searching
exact data in very short time.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial;&quot;&gt;
In Java Collection Framework, Hashmap class provides functionality to store data using hashing techniques.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial;&quot;&gt;
Here is how HashMap works internally.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial;&quot;&gt;
Following main parameters are used to
store data in HashMap:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;background-color: transparent; text-indent: -0.25in;&quot;&gt;Internal
static class Entry which contains following variables&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;Key&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;Value&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;Next element&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;Hash value&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;Array
of Entry objects (Bucket)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;Threshold
(Initial capacity * load factor)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; text-indent: -0.25in;&quot;&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial;&quot;&gt;
&lt;b&gt;While putting element in HashMap:&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; text-indent: -0.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;&quot;&gt;·&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 7pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;If key is null, it allows putting single value
against null key. If you are trying to add another value against null key, it
returns existing value in HashMap against null key and stores new value against
null key.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; margin-left: 1in; text-indent: -0.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; mso-fareast-font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;o&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 7pt;&quot;&gt;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Entry Object is stored at Bucket location 0.
Hash value is also zero for null key.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; margin-left: 0.25in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; text-indent: -0.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;b&gt;&lt;span style=&quot;font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;&quot;&gt;·&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 7pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;How Value is stored against key in HashMap:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;background-color: white; text-align: left; text-indent: -0.25in;&quot;&gt;
&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Internal hash function is used to calculate hash
value for hashcode of key. Hashcode of key is passed to hash function to get
hash value.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;Bu&lt;/span&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;cket index is found based on hash value and
length of bucket. (Bucket is array which is used to store data. Data is Entry
objects which contains key, value, next object and hash values). Bucket index =
hash value &amp;amp; (bucket size-1). Bitwise and operator is used to find out
index value.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;It&lt;/span&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;erator is used to iterate over Entry objects
at given index (if exists) to check if same key is already exists by comparing
hash value and object equality using equals function. If same key is found, new
value is stored against key and old value is returned.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; margin-left: 1in; text-indent: -0.25in;&quot;&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://shava28.blogspot.com/feeds/2463775701096005018/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3285107159307150268/2463775701096005018' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/2463775701096005018'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/2463775701096005018'/><link rel='alternate' type='text/html' href='http://shava28.blogspot.com/2013/07/how-hashmap-works.html' title='Java : How HashMap stores and returns element '/><author><name>shava28</name><uri>http://www.blogger.com/profile/01033288258605439141</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>Pune, Maharashtra, India</georss:featurename><georss:point>18.5204303 73.856743699999925</georss:point><georss:box>18.2795348 73.534020199999929 18.7613258 74.17946719999992</georss:box></entry><entry><id>tag:blogger.com,1999:blog-3285107159307150268.post-8994070617145585668</id><published>2013-07-16T13:32:00.000+05:30</published><updated>2013-07-16T13:32:15.447+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="ActiveMQ sample application"/><category scheme="http://www.blogger.com/atom/ns#" term="J2EE"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="JMS"/><category scheme="http://www.blogger.com/atom/ns#" term="JMS Basics"/><category scheme="http://www.blogger.com/atom/ns#" term="JMS Overview"/><category scheme="http://www.blogger.com/atom/ns#" term="JMS standalone example"/><title type='text'>JMS overview and sample standalone example</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
JMS API is used to allow applications to create, send, receive messages. It is mostly used in enterprise distributed systems (J2EE applications) for processing data asynchronously. It consists of&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;JMS API architecture&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Messaging domain&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Messaging receiver&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;JMS API Architecture:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;JMS application consists of :&lt;br /&gt;
&lt;br /&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;JMS provider: &amp;nbsp;Messaging system that implements JMS interfaces and provide admin and control features&lt;/li&gt;
&lt;li&gt;JMS Client: Programs that produce and consume messages.&lt;/li&gt;
&lt;li&gt;Messages: objects that are transferred between JMS clients to communicate information.&lt;/li&gt;
&lt;li&gt;Administered Objects: pre configured JMS objects created by JMS administrator to be used by clients. Two kind of objects are destinations and connection factories.&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;br /&gt;
There are 2 types of approaches for messaging- Point to point and Publish/subscribe.&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Point to Point messaging: Based on message queue, message sender and message receiver. Message is addressed to specific queue. Queues retain all message until it is consumed by receiver or&amp;nbsp;until message expires.&lt;/li&gt;
&lt;li&gt;Publish/Subscribe messaging: In Pub/Sub messaging, message producer sends message to Topic. Message is delivered to receivers who have subscribed to that topic.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Apache ActiveMQ, Weblogic, OpenJMS, IBM Websphere MQ &amp;nbsp;are few examples of JMS provider implementations.&lt;br /&gt;
Below sample example shows simple standalone example of &amp;nbsp;JMS point to point messaging where administered objects (server configuration) are not used. You need Apache ActiveMQ jars to run this program.&lt;br /&gt;
&lt;br /&gt;
Sample TestJMS.java file:&lt;br /&gt;
&lt;br /&gt;
import javax.jms.Connection;&lt;br /&gt;
import javax.jms.ConnectionFactory;&lt;br /&gt;
import javax.jms.Message;&lt;br /&gt;
import javax.jms.MessageConsumer;&lt;br /&gt;
import javax.jms.MessageProducer;&lt;br /&gt;
import javax.jms.Queue;&lt;br /&gt;
import javax.jms.Session;&lt;br /&gt;
import javax.jms.TextMessage;&lt;br /&gt;
import org.apache.activemq.ActiveMQConnectionFactory;&lt;br /&gt;
import org.apache.activemq.broker.BrokerService;&lt;br /&gt;
import org.apache.activemq.command.ActiveMQQueue;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public class TestJMS {&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public static void main(String[] args) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;try {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;//Start JMS service&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;BrokerService broker = new BrokerService();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;broker.addConnector(&quot;tcp://localhost:61616&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;broker.start();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(&quot;tcp://localhost:61616&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;Connection conn = connectionFactory.createConnection();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;Queue queue = new ActiveMQQueue(&quot;testQueue&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;//Message Producer&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;MessageProducer prod = session.createProducer(queue);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;//Message consumer&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;MessageConsumer consumer = session.createConsumer(queue);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;TextMessage msg = session.createTextMessage(&quot;Hello JMS&quot;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;conn.start();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;prod.send(msg);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;Message message = null;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;while((message = consumer.receiveNoWait()) != null){&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;if(message != null){&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;System.out.println(&quot;Message received:&quot;+((TextMessage)message).getText());&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;}&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;conn.close();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;broker.stop();&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;} catch (Exception e) {&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;e.printStackTrace();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Output of program:&lt;br /&gt;
Message received:Hello JMS&lt;br /&gt;
&lt;br /&gt;
You can download ActiveMQ at :&amp;nbsp;&lt;a href=&quot;http://activemq.apache.org/&quot;&gt;http://activemq.apache.org/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I have used &quot;activemq-all-5.6.0.jar&quot; as Build path library to run above application.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://shava28.blogspot.com/feeds/8994070617145585668/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3285107159307150268/8994070617145585668' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/8994070617145585668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/8994070617145585668'/><link rel='alternate' type='text/html' href='http://shava28.blogspot.com/2013/07/jms-overview-and-sample-standalone.html' title='JMS overview and sample standalone example'/><author><name>shava28</name><uri>http://www.blogger.com/profile/01033288258605439141</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3285107159307150268.post-5387773286313247469</id><published>2013-07-04T21:40:00.000+05:30</published><updated>2013-07-04T21:40:02.040+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="java basic"/><category scheme="http://www.blogger.com/atom/ns#" term="Java interview questions"/><category scheme="http://www.blogger.com/atom/ns#" term="Java Thread"/><category scheme="http://www.blogger.com/atom/ns#" term="Thread basic"/><title type='text'>Java: Thread Basics and Questions</title><content type='html'>Here are few general questions and answers related to Threads in Java&lt;br /&gt;
&lt;br /&gt;
1. What is thread?&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;--&amp;gt;&amp;nbsp;Thread is lightweight process which has its own stack trace but share resources.&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
2. Types of Thread:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;--&amp;gt;&amp;nbsp;Daemon thread and User thread : JVM exits when all user threads complete. It does not care whether daemon threads are complete or not.&lt;br /&gt;
&lt;br /&gt;
3. How can we create Thread in java&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;--&amp;gt; a) &amp;nbsp;By extending Thread class&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; b)&amp;nbsp;By Implementing Runnable interface&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;Implementing Runnable is preferred because extending a Thread is meant to create specialized version of Class Thread where we may need some special behaviour. And We always instantiate&amp;nbsp;thread by creating new instance of Thread class.&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
4. How to start a new thread?&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;--&amp;gt;&amp;nbsp;by calling start() method of thread instance.&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
5. Explain different Thread states:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;--&amp;gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;New : When thread instance is created and start method is not yet invoked. Thread t = new Thread(Runnable r);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;Runnable: When thread is eligible to run but execution is not started. Threads enters in runnable state for first time when start() method is called. Thread also enters&amp;nbsp;in runnable state after coming back from blocked, waiting, sleeping state.&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;Running: When scheduler picks thread for execution from runnable pool.&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;Waiting/Sleeping/Blocking: When thread is still alive but not eligible to run. Thread is not runnable but it might come to runnable when particular event happens.&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;Dead: Thread is dead when its run method completes. Once thread is dead, it cannot be invoke again by calling start(). It will generate runtime exception. Thread object is still&amp;nbsp;valid object but not valid for separate thread of execution.&lt;br /&gt;
&lt;br /&gt;
6. What is yield() method of Thread:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;--&amp;gt;&amp;nbsp;yield() method make currently running thread back to runnable pool to get other threads in runnable pool to get chance. But it is not guaranteed. Same thread&amp;nbsp;can be picked up for execution by thread scheduler. When yield() is called. Thread goes from Running to Runnable state.&lt;br /&gt;
&lt;br /&gt;
7.&amp;nbsp;What is join() method:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;--&amp;gt;&amp;nbsp;Let one thread to join at the end of another thread. when t.join() is called. Currently running thread to join at the end of t. It means that currently running thread is blocked&amp;nbsp;till t thread is complete.&lt;br /&gt;
&lt;br /&gt;
8. When Currently running thread leaves running state:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;a.&amp;nbsp;When thread is complete. (run method is complete)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;b. Thread can not acquire lock on object whose method it is trying to call.&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;c. When scheduler decides to move thread from running to runnable state.&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;d. Call to wait() on object&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
9. How can you prevent more than one threads to access code in Java&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;--&amp;gt;&amp;nbsp;Using synchronization. We can use either synchronized method or synchronized block so that only one thread can access that method/block of code at a time.&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
10. How synchronization works&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;--&amp;gt;&amp;nbsp;Synchronization work with lock on object. Every object in java has built in lock. When non-static method is synchronized, Thread which is running the code acquires&amp;nbsp;lock on object which is calling method. No other thread can call synchronized method for that object unless current thread comes out of sync. method.&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;When synchronized method completes, thread releases lock so that other threads can call synchronized method on that object. Same applies for Synchronized block.&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;We declare synchronized block with synchronized(object){ }. We can pass any object as parameter to synchronized block. Thread acquires lock on that object. If we pass &quot;this&quot;&amp;nbsp;as parameter to synchronized block, current instance of that class is locked.&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;Static methods can be synchronized. There is class instance (only one instance) of every class on which thread acquires lock.&lt;br /&gt;
&lt;br /&gt;
Note: wait() method gives up lock while sleep(), yield(),join(), notify() keeps lock.&lt;br /&gt;
&lt;br /&gt;
11. How thread interact with each other.&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;--&amp;gt;&amp;nbsp;Using wait(), notify(), notifyAll(). Note that these methods should be called from synchronized block/method.</content><link rel='replies' type='application/atom+xml' href='http://shava28.blogspot.com/feeds/5387773286313247469/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3285107159307150268/5387773286313247469' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/5387773286313247469'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/5387773286313247469'/><link rel='alternate' type='text/html' href='http://shava28.blogspot.com/2013/07/java-thread-basics-and-questions.html' title='Java: Thread Basics and Questions'/><author><name>shava28</name><uri>http://www.blogger.com/profile/01033288258605439141</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3285107159307150268.post-3365127133487255549</id><published>2013-07-03T21:32:00.000+05:30</published><updated>2013-07-03T21:32:43.263+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Encapsulation"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="java basic"/><category scheme="http://www.blogger.com/atom/ns#" term="Object oriented programming basic"/><category scheme="http://www.blogger.com/atom/ns#" term="OOPS basics"/><category scheme="http://www.blogger.com/atom/ns#" term="OOPS interview questions"/><title type='text'>Object Oriented Programming Basic Concepts</title><content type='html'>Object oriented programming is useful for many aspects:&lt;br /&gt;
1. Code reuse.&lt;br /&gt;
2. Better design&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Encapsulation:&lt;/b&gt;&amp;nbsp;Hiding data and behaviour of an Object and provide interface (public methods) to outside objects to access data. It helps in preventing users from setting objects state directly which can cause inconsistency.&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;b&gt;Inheritance:&lt;/b&gt; Way to establish relationship between objects. Here class inherit properties and method of parent class. Inheritance is termed as &quot;Is a relationship&quot; (Parent-Child relationship)&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Polymorphism:&lt;/b&gt; Means many forms. Similar type of objects can behave differently for same message.&lt;br /&gt;
It is tightly coupled with Inheritance. Parent class provide interface(method) which is implemented differently by different child classes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://shava28.blogspot.com/feeds/3365127133487255549/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3285107159307150268/3365127133487255549' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/3365127133487255549'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/3365127133487255549'/><link rel='alternate' type='text/html' href='http://shava28.blogspot.com/2013/07/object-oriented-programming-basic.html' title='Object Oriented Programming Basic Concepts'/><author><name>shava28</name><uri>http://www.blogger.com/profile/01033288258605439141</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3285107159307150268.post-1626278504136969659</id><published>2013-06-25T22:35:00.002+05:30</published><updated>2013-06-25T22:35:24.839+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="ArrayList"/><category scheme="http://www.blogger.com/atom/ns#" term="Collection Framework"/><category scheme="http://www.blogger.com/atom/ns#" term="Collection framework General purpose implementation classes"/><category scheme="http://www.blogger.com/atom/ns#" term="HashMap"/><category scheme="http://www.blogger.com/atom/ns#" term="HashSet"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="java basic"/><category scheme="http://www.blogger.com/atom/ns#" term="TreeList"/><category scheme="http://www.blogger.com/atom/ns#" term="TreeSet"/><title type='text'>Java : General purpose Implementation Classes in Collection Framework</title><content type='html'>&lt;br /&gt;
Collection framework consists of general purpose implementation of Set, Map, List interfaces.&lt;br /&gt;
Details of Interfaces in Collection framework is available at&amp;nbsp;&lt;a href=&quot;http://shava28.blogspot.in/2013/06/java-interfaces-in-collection-framework.html&quot; target=&quot;_blank&quot;&gt;Collection Framework Interfaces&lt;/a&gt;&lt;br /&gt;
Main characteristics of General purpose implementation in Collection framework is described as below.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial;&quot;&gt;
&lt;b&gt;HashSet:&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; text-indent: -0.25in;&quot;&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Symbol; text-indent: -0.25in;&quot;&gt;E&lt;/span&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;xtends AbstractSet, implements Set, Cloneable,
Serializable.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;Implements Set interface backed by HashMap
instance.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;Null element is allowed.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;Unordered collection.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;Default initial capacity of 16 and load factor
of 0.75.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;Constant time performances for basic operations
(add, remove, size, contains).&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;Iterating over set requires time proportional to
number of elements in Set and capacity of backing HashMap instance.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;Not synchronized.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;Iterator returned by this class is fail-fast. If
set is modified after iterator is created, iterator throws ConcurrentModificationException.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; text-indent: -0.25in;&quot;&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial;&quot;&gt;
&lt;b&gt;TreeSet:&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; text-indent: -0.25in;&quot;&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Symbol; text-indent: -0.25in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 7pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;Extends AbstractSet, implements NavigableSet,
Cloneable, Serializable&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;Implementation is based on TreeMap.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;Elements are ordered by natural order or by
Comparable provided at the time of creation of Set.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;Not synchronized.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;Null is not allowed.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;Iterator returned by this class is fail-fast. If
set is modified after iterator is created, iterator throws ConcurrentModificationException.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;There are methods available to get subset of
existing Set. Subset is backed by original Set, so any addition of element
within range to set will be reflected to Subset and vice-versa.&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;subset(fromElement, toElement) - fromElement is
inclusive and toElement is excluded&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;subSet(fromElement,&amp;nbsp; boolean fromInclusive, toElement, boolean
toInclusive) –using Boolean fromElement and toElement can be made inclusive or
excluded.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; margin-left: 1in; text-indent: -0.25in;&quot;&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial;&quot;&gt;
&lt;b&gt;ArrayList:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial;&quot;&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;background-color: transparent; text-indent: -0.25in;&quot;&gt;Extends AbstractList, implements List, Cloneable,
Serializable, RandomAccess.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;Random access of elements is fast compared to
LinkedList.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;Element are stored in sequence in array.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;Null is allowed.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;Not synchronized.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;Iterator returned by this class is fail-fast. If
set is modified after iterator is created, iterator throws ConcurrentModificationException.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;ArrayList has capacity which is size of array to
store objects. &lt;/span&gt;&lt;tt style=&quot;text-indent: -0.25in;&quot;&gt;&lt;span style=&quot;background-position: initial initial; background-repeat: initial initial; font-size: 10pt;&quot;&gt;ensureCapacity&lt;/span&gt;&lt;/tt&gt;&lt;span class=&quot;apple-converted-space&quot; style=&quot;text-indent: -0.25in;&quot;&gt;&lt;span style=&quot;background-position: initial initial; background-repeat: initial initial; font-size: 13.5pt;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;method is used to make sure that size of
ArrayList is appropriate.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;Default initial capacity is 10.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; text-indent: -0.25in;&quot;&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial;&quot;&gt;
&lt;b&gt;LinkedList:&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial;&quot;&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;Extends AbstractSequentialList, implements List,
Deque, Cloneable, Serializable.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;Null is allowed.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;Methods available to add, remove, get element at
the beginning and end of the list.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;Not synchronized.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;Iterator returned by this class is fail-fast. If
set is modified after iterator is created, iterator throws ConcurrentModificationException.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; text-indent: -0.25in;&quot;&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial;&quot;&gt;
&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial;&quot;&gt;
&lt;b&gt;HashMap:&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial;&quot;&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;Extends AbstractMap, Implements Map, Serializable,
Cloneable.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;HashMap allows one null key&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;Not synchronized.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;Iterator returned by this class is fail-fast. If
set is modified after iterator is created, iterator throws ConcurrentModificationException.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;HashMap has two parameters – Initial capacity
and load factor which affects performance.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;Default initial capacity 16&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;Default load factor 0.75&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;Rehashing is done when capacity/load factor is
more than number of elements in HashMap.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; text-indent: -0.25in;&quot;&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://shava28.blogspot.com/feeds/1626278504136969659/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3285107159307150268/1626278504136969659' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/1626278504136969659'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/1626278504136969659'/><link rel='alternate' type='text/html' href='http://shava28.blogspot.com/2013/06/basic-collection-framework-implementations.html' title='Java : General purpose Implementation Classes in Collection Framework'/><author><name>shava28</name><uri>http://www.blogger.com/profile/01033288258605439141</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3285107159307150268.post-654006874450038989</id><published>2013-06-19T10:15:00.001+05:30</published><updated>2013-06-19T10:15:36.518+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Collection Framework"/><category scheme="http://www.blogger.com/atom/ns#" term="Collection Interfaces"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="java basic"/><title type='text'>Java : Interfaces in Collection Framework</title><content type='html'>&lt;h2&gt;
&lt;b&gt;Collection Interfaces&lt;/b&gt;:&lt;/h2&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;mso-list: l3 level1 lfo1; text-indent: -.25in;&quot;&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Symbol; text-indent: -0.25in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 7pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;Collection&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;Set&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; text-indent: -0.25in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 7pt;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;SortedSet&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; text-indent: -0.25in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 7pt;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;NavigableSet&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;List&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;Queue&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; text-indent: -0.25in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 7pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;BlockingQueue&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;TransferQueue&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;Deque&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;Map&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;SortedMap&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;NavigableMap&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;ConcurrentMap&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;ConcurrentNavigableMap&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;Main interfaces:&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Collection&lt;/b&gt;:&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;Root interface in Collection hierarchy. It
represents group of objects. Java does not provide direct implementation of
this interface. It provides implementation of more specific interfaces by
extending this interface like Set, List.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;This interface defines basic operations for
group of objects.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;There are also some methods which are tagged as optional
operations which may not be applicable for specific type of collection. E.g. For
read only collections, add(E), remove(Object) methods are not required, so implementation
classes may just throw UnsupportedOperationException in method implementation. &lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot; style=&quot;text-indent: -0.25in;&quot;&gt;&lt;span style=&quot;background-position: initial initial; background-repeat: initial initial; color: #353833; font-family: Arial, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;I&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;f the invocation would
have no effect on the collection, then it may or may not throw exception.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;b&gt;Set&lt;/b&gt;:&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;Collection that contains no duplicate elements
and at most one null element. (some implementations does not allow null)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;You have to be careful when mutable objects are
added as elements of set. Set behaviour is not specified if value of object
which is in set is changed which affects equals comparison.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;Set provides additional constraint on add method
to prevent duplicates.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;b&gt;List&lt;/b&gt;:&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;List is ordered collection. List may contain
duplicates.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;List provides special iterator, called ListIterator,
which allows element insertion, bidirectional access.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;List provides additional constraint over
iterator, add, remove methods to maintain sequence of elements.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;b&gt;Queue&lt;/b&gt;:&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;Queue typically, but not necessarily, order
elements in FIFO manner. Among the exceptions are priority queues, which order
elements according to a supplied comparator or the elements&#39; natural ordering,
and LIFO queues (or stacks) which order the elements LIFO (last-in-first-out)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;Queue provides additional methods for insertion,
removal, inspection operations which returns special value (null or false) if
operation fails. Collection methods add, remove, element throws exception if
method fails.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;Queue generally does not allow null. (Except
LinkedList). Null should not be inserted into queue because null is returned by
poll method to indicate that queue is empty.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;b&gt;Map&lt;/b&gt;:&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;Object that contains key-value pair. Map
interface does not extends Collection.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;Map cannot contain duplicate key. So special
care should be taken when mutable objects are used as keys.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; text-indent: -0.25in;&quot;&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;b&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Additional Interfaces&lt;/span&gt;&lt;/b&gt;:&lt;/h2&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;SortedSet:&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;Ordered collection.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;Elements are by default in natural order or as
per Comparator provided at creation time.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;All elements inserted into a sorted set must
implement the Comparable interface.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;General implementation of SortedSet should
provide 4 standard constructors.&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;Void constructor with no parameter&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;Constructor with parameter as Comparator&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;Constructor with parameter as Collection&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;Constructor with parameter as SortedSet&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;NavigableSet:&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;It extends SortedSet and provides navigation
methods to find closest match for given target.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;Navigation methods are lower, floor, ceiling,
higher.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;pollFirst and pollLast methods that return and
remove the lowest and highest element, if one exists, else returning null.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Deque:&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;Double ended queue. Extends Queue.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;Element insertion and removal at both ends.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;Interface defines methods (add, remove, get) to
access elements at both end of queue. All methods have 2 forms. One throws
exception if operation fails and other returns special value (null or false).&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;BlockingQueue:&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;Interface of concurrent package. Use for
Producer-Consumer type operation.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;While inserting element in queue, it waits if
for space to be available when queue is full.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;While retrieving element from queue, it waits if
queue is empty.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; text-indent: -0.25in;&quot;&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://shava28.blogspot.com/feeds/654006874450038989/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3285107159307150268/654006874450038989' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/654006874450038989'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/654006874450038989'/><link rel='alternate' type='text/html' href='http://shava28.blogspot.com/2013/06/java-interfaces-in-collection-framework.html' title='Java : Interfaces in Collection Framework'/><author><name>shava28</name><uri>http://www.blogger.com/profile/01033288258605439141</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3285107159307150268.post-6007663165979044575</id><published>2013-06-14T16:27:00.000+05:30</published><updated>2013-06-25T22:34:46.016+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Advantages of Collection framework"/><category scheme="http://www.blogger.com/atom/ns#" term="Collection Framework"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="java basic"/><title type='text'>Java Collection Framework Basic</title><content type='html'>&lt;div class=&quot;MsoNormal&quot;&gt;
Java collection framework and its classes are used to
store and process group of objects.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;Advantages of Collection framework&lt;/b&gt;:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Symbol; text-indent: -0.25in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 7pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;Reduces programming effort: Useful data
structures and utility classes to process data for searching/sorting etc. are
readily available in Collection framework.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Symbol; text-indent: -0.25in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 7pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;Provides inter- operability between API’s:
Collection objects are used to pass/return to different API methods instead of
creating different data structures for each API.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;Increased
performance: High performance implementation of data structure in Collection
framework.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -.25in;&quot;&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot;&gt;
&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;Collection framework consists of&lt;/b&gt;:&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;&lt;a href=&quot;http://shava28.blogspot.in/2013/06/java-interfaces-in-collection-framework.html&quot; target=&quot;_blank&quot;&gt;Collection Interfaces&lt;/a&gt;: Different type of collection
interfaces like set, map, list, queue.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;&lt;a href=&quot;http://shava28.blogspot.com/2013/06/basic-collection-framework-implementations.html&quot; target=&quot;_blank&quot;&gt;Collection implementation classes&lt;/a&gt;: Different
type of concrete implementations of collection interfaces.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;Concurrent implementation: Implementations for
concurrent use.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;Algorithms: Utility classes with methods to do
searching, sorting operations.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; You can check n&lt;a href=&quot;http://shava28.blogspot.in/2012/06/java-6-new-features.html&quot; target=&quot;_blank&quot;&gt;ew features introduced in Java 6 in Collection Framework&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;mso-list: l1 level1 lfo2; text-indent: -.25in;&quot;&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://shava28.blogspot.com/feeds/6007663165979044575/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3285107159307150268/6007663165979044575' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/6007663165979044575'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/6007663165979044575'/><link rel='alternate' type='text/html' href='http://shava28.blogspot.com/2013/06/java-collection-framework-basic.html' title='Java Collection Framework Basic'/><author><name>shava28</name><uri>http://www.blogger.com/profile/01033288258605439141</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>Pune, Maharashtra, India</georss:featurename><georss:point>18.5204303 73.856743699999925</georss:point><georss:box>18.2795348 73.534020199999929 18.7613258 74.17946719999992</georss:box></entry><entry><id>tag:blogger.com,1999:blog-3285107159307150268.post-3631911160614811276</id><published>2013-06-13T20:45:00.001+05:30</published><updated>2013-06-22T21:26:45.579+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Collection Framework"/><category scheme="http://www.blogger.com/atom/ns#" term="HashMap"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="java basic"/><category scheme="http://www.blogger.com/atom/ns#" term="storing null key in Hashmap"/><title type='text'>Java: Storing null key in HashMap</title><content type='html'>&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial;&quot;&gt;
HashMap is useful in searching exact data in short time.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial;&quot;&gt;
HashMap allows only one null key. Let&#39;s see how it stores null key internally.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial;&quot;&gt;
&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial;&quot;&gt;
&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;If key is null, HashMap allows putting single value
against null key.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;If you are trying to add another value against null key, it
returns existing value for null key and stores new value against
null key.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; text-indent: -0.25in;&quot;&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
Internally HashMap maintains array of Entry class(internal class of HashMap which is used to store data) which is also called as Bucket.&lt;br /&gt;
Entry class contains key, value, nextElement, hash-value variables.&lt;br /&gt;
&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; margin-left: 1in; text-indent: -0.25in;&quot;&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;Data with null key &lt;/span&gt;is stored at Bucket location 0(array index 0 of Entry array).
Hash value is also zero for null key.&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
HashMap h = new HashMap(); &amp;nbsp;You can also use HashMap&lt;string string=&quot;&quot;&gt; instead of HashMap.&lt;/string&gt;&lt;br /&gt;
h.put(null, &quot;A&quot;); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -- Value &quot;A&quot; is stored against null key&lt;br /&gt;
h.put(null, &quot;B&quot;); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -- Value &quot;B&quot; is stored against null key and old value &quot;A&quot; is returned as return type of put function is V i.e. value object&lt;br /&gt;
h.put(null, &quot;C&quot;); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;-- Value &quot;C&quot; is stored against null key and old value &quot;B&quot; is returned&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; margin-left: 1in; text-indent: -0.25in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; margin-left: 1in; text-indent: -0.25in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; margin-left: 1in; text-indent: -0.25in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://shava28.blogspot.com/feeds/3631911160614811276/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3285107159307150268/3631911160614811276' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/3631911160614811276'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/3631911160614811276'/><link rel='alternate' type='text/html' href='http://shava28.blogspot.com/2013/06/java-storing-null-key-in-hashmap.html' title='Java: Storing null key in HashMap'/><author><name>shava28</name><uri>http://www.blogger.com/profile/01033288258605439141</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>Pune, Maharashtra, India</georss:featurename><georss:point>18.5204303 73.856743699999925</georss:point><georss:box>18.2795348 73.534020199999929 18.7613258 74.17946719999992</georss:box></entry><entry><id>tag:blogger.com,1999:blog-3285107159307150268.post-6761463959047594054</id><published>2013-06-05T17:25:00.000+05:30</published><updated>2013-06-05T20:04:56.785+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Hibernate"/><category scheme="http://www.blogger.com/atom/ns#" term="Hibernate concepts"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="Java persistence"/><category scheme="http://www.blogger.com/atom/ns#" term="ORM"/><category scheme="http://www.blogger.com/atom/ns#" term="Sample Hibernate Application using annotations"/><title type='text'>Sample Hibernate Application Using Eclipse and using annotations</title><content type='html'>&lt;div class=&quot;tr_bq&quot;&gt;
In first example, I have created sample &lt;a href=&quot;http://shava28.blogspot.in/2013/05/sample-hibernate-application-using.html&quot; target=&quot;_blank&quot;&gt;Hibernate project using mapping files&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;tr_bq&quot;&gt;
Next step is to convert same application to use annotations.&lt;/div&gt;
Change Employee.java and Department.java files to use annotations as shown below.&lt;br /&gt;
&lt;br /&gt;
Employee.java&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
package com.test.beans;&lt;br /&gt;
import javax.persistence.CascadeType;&lt;br /&gt;
import javax.persistence.Column;&lt;br /&gt;
import javax.persistence.Entity;&lt;br /&gt;
import javax.persistence.GeneratedValue;&lt;br /&gt;
import javax.persistence.Id;&lt;br /&gt;
import javax.persistence.JoinColumn;&lt;br /&gt;
import javax.persistence.ManyToOne;&lt;br /&gt;
import javax.persistence.Table;&lt;br /&gt;
&lt;br /&gt;
@Entity&lt;br /&gt;
@Table(name=&quot;EMP&quot;)&lt;br /&gt;
public class Employee {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Id @GeneratedValue&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Column(name=&quot;emp_id&quot;)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;private Long empId;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Column(name=&quot;first_name&quot;)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;private String firstName;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Column(name=&quot;last_name&quot;)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;private String lastName;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Column(name=&quot;degn&quot;)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;private String designation;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Column(name=&quot;sal&quot;)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;private double salary;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@ManyToOne(cascade=CascadeType.ALL)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@JoinColumn(name=&quot;dept&quot;)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;private Department dept;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public Long getEmpId() {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;return empId;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public void setEmpId(Long empId) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;this.empId = empId;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public String getFirstName() {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;return firstName;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public void setFirstName(String firstName) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;this.firstName = firstName;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public String getLastName() {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;return lastName;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public void setLastName(String lastName) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;this.lastName = lastName;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public String getDesignation() {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;return designation;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public void setDesignation(String designation) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;this.designation = designation;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public double getSalary() {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;return salary;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public void setSalary(double salary) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;this.salary = salary;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public Department getDept() {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;return dept;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public void setDept(Department dept) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;this.dept = dept;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
}&lt;/blockquote&gt;
&lt;br /&gt;
Department.java:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;
package com.test.beans;&lt;br /&gt;
import javax.persistence.Column;&lt;br /&gt;
import javax.persistence.Entity;&lt;br /&gt;
import javax.persistence.GeneratedValue;&lt;br /&gt;
import javax.persistence.Id;&lt;br /&gt;
import javax.persistence.Table;&lt;br /&gt;
&lt;br /&gt;
@Entity&lt;br /&gt;
@Table(name=&quot;DEPT&quot;)&lt;br /&gt;
public class Department {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Id @GeneratedValue&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Column(name=&quot;dept_id&quot;)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;private long deptId;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Column(name=&quot;dept_name&quot;)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;private String deptName;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Column(name=&quot;loc&quot;)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;private String location;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public long getDeptId() {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;return deptId;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public void setDeptId(long deptId) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;this.deptId = deptId;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public String getDeptName() {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;return deptName;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public void setDeptName(String deptName) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;this.deptName = deptName;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public String getLocation() {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;return location;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public void setLocation(String location) {&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;this.location = location;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
}&lt;/blockquote&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Change hibernate.cfg.xml file as:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;lt;? xml version&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;1.0&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;encoding&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;!&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;DOCTYPE&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;hibernate-configuration&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: xx-small;&quot;&gt;PUBLIC&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&quot;-//Hibernate/Hibernate Configuration DTD/EN&quot;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #3f7f5f; font-size: x-small;&quot;&gt;&quot;http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd&quot;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #3f7f7f;&quot;&gt;hibernate-configuration&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #3f7f7f;&quot;&gt;session-factory&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;dialect&quot;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;org.hibernate.dialect.MySQLDialect&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;hibernate.connection.driver_class&quot;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;com.mysql.jdbc.Driver&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;hibernate.connection.url&quot;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;jdbc:mysql://localhost:3306/test&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;hibernate.connection.username&quot;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;root&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;hibernate.connection.password&quot;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;root&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;hibernate.current_session_context_class&quot;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;thread&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f5fbf; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f5fbf; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f5fbf; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f5fbf; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;hbm2ddl.auto&quot;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;create&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;show_sql&quot;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;format_sql&quot;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;hibernate.use_sql_comments&quot;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;mapping&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f;&quot;&gt;class=&quot;com.test.beans.Employee&quot;&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;mapping&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f;&quot;&gt;class=&quot;com.test.beans.Department&quot;&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;/&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;session-factory&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;hibernate-configuration&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;br /&gt;
You can delete (organization.hbm.xml) hbm mapping file.&lt;br /&gt;
&lt;br /&gt;
Now your sample annotation project is ready. You can run Test.java file to check the output.</content><link rel='replies' type='application/atom+xml' href='http://shava28.blogspot.com/feeds/6761463959047594054/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3285107159307150268/6761463959047594054' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/6761463959047594054'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/6761463959047594054'/><link rel='alternate' type='text/html' href='http://shava28.blogspot.com/2013/06/sample-hibernate-application-using-annotation.html' title='Sample Hibernate Application Using Eclipse and using annotations'/><author><name>shava28</name><uri>http://www.blogger.com/profile/01033288258605439141</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>Pune, Maharashtra, India</georss:featurename><georss:point>18.5204303 73.856743699999925</georss:point><georss:box>18.2795348 73.534020199999929 18.7613258 74.17946719999992</georss:box></entry><entry><id>tag:blogger.com,1999:blog-3285107159307150268.post-746610548793528730</id><published>2013-06-02T18:55:00.001+05:30</published><updated>2013-06-02T18:55:31.110+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Automatic dirty checking"/><category scheme="http://www.blogger.com/atom/ns#" term="Hibernate"/><category scheme="http://www.blogger.com/atom/ns#" term="Hibernate concepts"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="Java persistence"/><category scheme="http://www.blogger.com/atom/ns#" term="ORM"/><category scheme="http://www.blogger.com/atom/ns#" term="Transactional write-behind"/><title type='text'>Automatic Dirty checking and Transaction write-behind concepts of Hibernate</title><content type='html'>&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: NewBaskerville-Roman, serif; font-size: 10.5pt;&quot;&gt;Hibernate uses a sophisticated algorithm to determine an efficient ordering that avoids database foreign key constraint violations but is still sufficiently predictable to the user. This feature is called&amp;nbsp;&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;font-family: NewBaskerville-Italic, serif;&quot;&gt;&lt;b&gt;transaction write-behind&lt;/b&gt;&lt;span style=&quot;font-size: 10.5pt;&quot;&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: NewBaskerville-Italic, serif;&quot;&gt;&lt;b&gt;Automatic Dirty checking&lt;/b&gt;&lt;span style=&quot;font-size: 10.5pt;&quot;&gt;:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;font-family: NewBaskerville-Italic, serif; font-size: 10.5pt;&quot;&gt;If object which is already saved is modified, then Hibernate automatically call update on that object.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: NewBaskerville-Italic, serif; font-size: 10.5pt;&quot;&gt;Hibernate is capable of detecting all objects that are modified or are dirty. It is done with the help of&amp;nbsp;&lt;i&gt;PersistanceContext.&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: NewBaskerville-Italic, serif; font-size: 10.5pt;&quot;&gt;Within&amp;nbsp;&lt;i&gt;PersistanceContext,&amp;nbsp;&lt;/i&gt;Hibernate has copy of all persistent objects that are loaded from database in Session. It compares persistent object to determine whether object is modified.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: NewBaskerville-Italic, serif; font-size: 10.5pt;&quot;&gt;Hibernate allows implementation of custom dirty checking algorithm. This is done by implementing&amp;nbsp;&lt;i&gt;findDirty()&lt;/i&gt;&amp;nbsp;method of org.hibernate.Interceptor interface for a Session.&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://shava28.blogspot.com/feeds/746610548793528730/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3285107159307150268/746610548793528730' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/746610548793528730'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/746610548793528730'/><link rel='alternate' type='text/html' href='http://shava28.blogspot.com/2013/06/automatic-dirty-checking-and.html' title='Automatic Dirty checking and Transaction write-behind concepts of Hibernate'/><author><name>shava28</name><uri>http://www.blogger.com/profile/01033288258605439141</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>Pune, Maharashtra, India</georss:featurename><georss:point>18.5204303 73.856743699999925</georss:point><georss:box>18.2795348 73.534020199999929 18.7613258 74.17946719999992</georss:box></entry><entry><id>tag:blogger.com,1999:blog-3285107159307150268.post-8390267084233641385</id><published>2013-05-31T19:37:00.000+05:30</published><updated>2015-03-15T13:47:17.420+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Hibernate"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="Java persistence"/><category scheme="http://www.blogger.com/atom/ns#" term="ORM"/><category scheme="http://www.blogger.com/atom/ns#" term="Sample Hibernate application using mapping file"/><title type='text'>Sample Hibernate Application Using Eclipse using mapping file</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div&gt;
Here are steps to create sample hibernate application using eclipse. I am using hibernate version 4.2 and MySQL database for reference. &lt;/div&gt;
&lt;div&gt;
First I will create it using mapping xml file. Then &lt;a href=&quot;http://shava28.blogspot.in/2013/06/sample-hibernate-application-using.html&quot; target=&quot;_blank&quot;&gt;convert same application to use annotation&lt;/a&gt; and finally JPA.&lt;/div&gt;
Create Java Project as:&lt;br /&gt;
﻿&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjootGTShU_S550TwHqps8d34hQTbgA9Rcz6ZBYfnxVA9BBbJkXZlU9Av6T6UD6gTSHu0hMaMP284PQdV8XPMkk5DBwBG4DGVUsBgin-CVfReUdSnZrUNFrGHnr2nRbWVrwcQb72BzggP0W/s1600/create-project.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjootGTShU_S550TwHqps8d34hQTbgA9Rcz6ZBYfnxVA9BBbJkXZlU9Av6T6UD6gTSHu0hMaMP284PQdV8XPMkk5DBwBG4DGVUsBgin-CVfReUdSnZrUNFrGHnr2nRbWVrwcQb72BzggP0W/s1600/create-project.png&quot; height=&quot;211&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Create java project - HibernateJPA&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
Create below packages in src folder by using option &quot;create package&quot;&lt;br /&gt;
com.test.beans&lt;br /&gt;
&lt;div&gt;
com.test.resources&lt;/div&gt;
&lt;div&gt;
com.test.dao&lt;/div&gt;
&lt;div&gt;
com.test.util&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;br /&gt;
Add hibernate dependencies for project by right clicking on project &quot;Build Path&quot; --&amp;gt; Configure Build Path.&lt;br /&gt;
&lt;div&gt;
Under Libraries Tab: Add external jar button and add Hibernate required jar files.&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;antlr-2.7.7.jar&lt;/li&gt;
&lt;li&gt;dom4j-1.6.1.jar&lt;/li&gt;
&lt;li&gt;hibernate-commons-annotations-4.0.1.Final.jar&lt;/li&gt;
&lt;li&gt;hibernate-core-4.2.0.Final.jar&lt;/li&gt;
&lt;li&gt;hibernate-jpa-2.0-api-1.0.1.Final.jar&lt;/li&gt;
&lt;li&gt;javassist-3.15.0-GA.jar&lt;/li&gt;
&lt;li&gt;jboss-logging-3.1.0.GA.jar&lt;/li&gt;
&lt;li&gt;jboss-transaction-api_1.1_spec-1.0.0.Final.jar&lt;/li&gt;
&lt;/ul&gt;
Also add mysql connector jar.&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;mysql-connector-java-3.1.14-bin.jar&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&amp;nbsp;Create HibernateUtil.java file under package com.test.util for creating and using SessionFactory object as:&lt;br /&gt;
For more details about building SessionFactory refer post &lt;a href=&quot;http://shava28.blogspot.in/2013/05/hibernate-building-sessionfactory.html&quot; target=&quot;_blank&quot;&gt;Creating SessionFactory&lt;/a&gt;.&lt;br /&gt;
HibernateUtil.java&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;b&gt;package &lt;/b&gt;&lt;span style=&quot;color: black;&quot;&gt;com.test.util;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;b&gt;import &lt;/b&gt;&lt;span style=&quot;color: black;&quot;&gt;org.hibernate.SessionFactory;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;b&gt;import &lt;/b&gt;&lt;span style=&quot;color: black;&quot;&gt;org.hibernate.cfg.Configuration;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;b&gt;public &lt;/b&gt;&lt;span style=&quot;color: black;&quot;&gt;class&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; HibernateUtil {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;static&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; SessionFactory &lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;sessionFactory&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;static&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;i&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sessionFactory&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; = &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;new&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; Configuration().configure(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;com/test/resources/hibernate.cfg.xml&quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;).buildSessionFactory();&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; catch&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; (Exception e) {&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;new&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; ExceptionInInitializerError(e);&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;static&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; SessionFactory getSessionFactory(){&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;return&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;sessionFactory&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
}&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;static&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;void&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; shutDown(){&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;i&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; getSessionFactory&lt;/i&gt;().close();&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
}&lt;br /&gt;

}&lt;/span&gt;&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&amp;nbsp;Employee and Department classes which are persistace objects in package com.test.beans:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Employee.java&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;b&gt;package&amp;nbsp; &lt;/b&gt;&lt;span style=&quot;color: black;&quot;&gt;com.test.beans;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;b&gt;public class&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;span style=&quot;color: black;&quot;&gt;Employee {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;private&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; Long &lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;empId&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;private&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; String &lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;firstName&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;private&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; String &lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;lastName&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;private&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; String &lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;designation&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;private&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;double&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;salary&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;private&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; Department &lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;dept&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; Long getEmpId() {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;return&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;empId&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;void&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; setEmpId(Long empId) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;empId&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; = empId;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; String getFirstName() {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;firstName&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;void&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; setFirstName(String firstName) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;firstName&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; = firstName;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; String getLastName() {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;lastName&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;void&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; setLastName(String lastName) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;lastName&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; = lastName;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; String getDesignation() {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;designation&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;void&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; setDesignation(String designation) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;this&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;designation&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; = designation;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;double&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; getSalary() {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;salary&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;void&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; setSalary(&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;double&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; salary) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;salary&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; = salary;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; Department getDept() {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;dept&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;void&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; setDept(Department dept) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;this&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;dept&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; = dept;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;Department.java&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&lt;b&gt;package&amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black;&quot;&gt;com.test.beans;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #7f0055; font-size: x-small;&quot;&gt;&lt;b&gt;
&lt;/b&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&lt;b&gt;public&lt;/b&gt; &lt;span style=&quot;color: black;&quot;&gt;class&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; Department &lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;private&lt;/span&gt;&lt;/b&gt; &lt;b&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;long&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&lt;/span&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000c0;&quot;&gt;&lt;span style=&quot;color: #0000c0;&quot;&gt;deptId&lt;/span&gt;&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;private&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; String &lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;deptName&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;private&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; String &lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;location&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;long&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; getDeptId() {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;return&lt;/span&gt;&lt;/b&gt; &lt;span style=&quot;color: #0000c0;&quot;&gt;&lt;span style=&quot;color: #0000c0;&quot;&gt;deptId&lt;/span&gt;&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;void&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; setDeptId(&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;long&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; deptId) {&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;deptId&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; = deptId;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; String getDeptName() {&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;deptName&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;void&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; setDeptName(String deptName) {&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;deptName&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; = deptName;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; String getLocation() {&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;location&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;void&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; setLocation(String location) {&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #0000c0; font-size: x-small;&quot;&gt;location&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; = location;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
}&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;We need hibernate configuration file for settings related to connecting database. (configuration file contains much more but for simple application, i am only defining minimum required settings)&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
hibernate.cfg.xml&lt;br /&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt; &amp;lt;? xml version&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;1.0&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;encoding&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;!&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;DOCTYPE&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;hibernate-configuration&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: xx-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: xx-small;&quot;&gt;PUBLIC&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&quot;-//Hibernate/Hibernate Configuration DTD/EN&quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #3f7f5f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f5f; font-size: x-small;&quot;&gt;&quot;http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd&quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #3f7f7f;&quot;&gt;hibernate-configuration&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;&lt;span style=&quot;color: #3f7f7f;&quot;&gt;session-factory&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;name&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;dialect&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;org.hibernate.dialect.MySQLDialect&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;name&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;hibernate.connection.driver_class&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;com.mysql.jdbc.Driver&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;name&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;hibernate.connection.url&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;jdbc:mysql://localhost:3306/test&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;name&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;hibernate.connection.username&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;root&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;name&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;hibernate.connection.password&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;root&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;name&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;hibernate.current_session_context_class&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;thread&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f5fbf; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f5fbf; font-size: x-small;&quot;&gt;&lt;!-- Show and print SQL on console --&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #3f5fbf; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f5fbf; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;name&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;hbm2ddl.auto&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;create&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;name&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;show_sql&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;name&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;format_sql&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;name&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;hibernate.use_sql_comments&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;mapping&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;resource&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;com/test/beans/organization.hbm.xml&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;session-factory&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;
&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;hibernate-configuration&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now we need mapping file which defines mapping of Persistance classes with database tables:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;organization.hbm.xml&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &amp;lt; xml &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;version&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;1.0&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;!&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;DOCTYPE&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;hibernate-mapping&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: xx-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: xx-small;&quot;&gt;PUBLIC&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&quot;-//Hibernate/Hibernate Mapping DTD 3.0//EN&quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #3f7f5f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f5f; font-size: x-small;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f5f; font-size: x-small;&quot;&gt;http://www.hibernate.org/dtd&lt;/span&gt;&lt;span style=&quot;color: #3f7f5f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f5f; font-size: x-small;&quot;&gt;/hibernate-mapping-3.0.dtd&quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;hibernate-mapping font=&quot;&quot;&gt;&lt;/hibernate-mapping&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;package&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;com.test.beans&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;class&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;name&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;Department&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;table&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;DEPT&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;id&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;name&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;deptId&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;column&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;dept_id&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;generator&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;class&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;native&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;id&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;name&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;deptName&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;type&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;string&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;column&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;dept_name&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;unique&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;true&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;name&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;location&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;type&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;string&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;column&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;loc&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;class&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;class&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;name&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;Employee&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;table&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i style=&quot;color: #3f7f7f; font-size: small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;EMP&quot;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;id&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;name&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;empId&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;column&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;emp_id&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;generator&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;class&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;native&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;generator&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;id&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;name&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;firstName&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;type&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;string&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;column&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;first_name&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;name&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;lastName&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;type&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;string&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;column&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;last_name&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;name&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;designation&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;type&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;string&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;column&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;degn&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;property&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;name&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;salary&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;type&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;double&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;column&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;sal&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;many-to-one&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;name&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;dept&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;column&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;dept&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f007f; font-size: x-small;&quot;&gt;class&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&quot;Department&quot;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2a00ff; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;class&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;
&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;hibernate-mapping&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-size: x-small;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Hibernate application is ready and let&#39;s create test class to test the application.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black; font-family: Arial, Helvetica, sans-serif; font-size: small;&quot;&gt;&lt;b&gt;Test.java&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;b&gt;package &lt;/b&gt;&lt;span style=&quot;color: black;&quot;&gt;com.test.dao;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;import &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-size: x-small;&quot;&gt;org.hibernate.Session;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;import&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-size: x-small;&quot;&gt;org.hibernate.Transaction;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;import &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-size: x-small;&quot;&gt;com.test.beans.Department;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;import &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-size: x-small;&quot;&gt;com.test.beans.Employee;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;import&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-size: x-small;&quot;&gt;com.test.util.HibernateUtil;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;b&gt;public&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;color: black;&quot;&gt; class&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; Test {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;public&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;static&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;void&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #7f0055; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black; font-size: x-small;&quot;&gt; main(String[] args) {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Employee emp = &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;new&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; Employee();&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;emp.setFirstName(&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&quot;fName&quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;emp.setLastName(&quot;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;lName&quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;emp.setDesignation(&quot;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Java Developer&quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;emp.setSalary(20000);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Department dept= &lt;b&gt;new&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; Department();&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dept.setDeptName(&quot;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Design&quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;);&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;emp.setDept(dept);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Session sess = HibernateUtil.&lt;i&gt;getSessionFactory&lt;/i&gt;().openSession();&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Transaction tran = sess.beginTransaction();&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sess.save(emp);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black; font-size: x-small;&quot;&gt;  &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sess.flush();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;tran.commit();&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;sess.close();&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black; font-size: x-small;&quot;&gt; }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black; font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;After running above class, Employee and Department data is stored in respective tables. You get console log to understand how hibernate works in background.&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;Console Log:&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;May 31, 2013 7:18:36 PM org.hibernate.annotations.common.Version &lt;clinit&gt;&lt;/clinit&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;INFO: HCANN000001: Hibernate Commons Annotations {4.0.1.Final}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;May 31, 2013 7:18:36 PM org.hibernate.Version logVersion&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
INFO: HHH000412: Hibernate Core {4.2.0.Final}&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
May 31, 2013 7:18:36 PM org.hibernate.cfg.Environment &lt;clinit&gt;&lt;/clinit&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
INFO: HHH000206: hibernate.properties not found&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
May 31, 2013 7:18:36 PM org.hibernate.cfg.Environment buildBytecodeProvider&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
INFO: HHH000021: Bytecode provider name : javassist&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
May 31, 2013 7:18:36 PM org.hibernate.cfg.Configuration configure&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
INFO: HHH000043: Configuring from resource: com/test/resources/hibernate.cfg.xml&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
May 31, 2013 7:18:36 PM org.hibernate.cfg.Configuration getConfigurationInputStream&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
INFO: HHH000040: Configuration resource: com/test/resources/hibernate.cfg.xml&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
May 31, 2013 7:18:36 PM org.hibernate.internal.util.xml.DTDEntityResolver resolveEntity&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
WARN: HHH000223: Recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
May 31, 2013 7:18:36 PM org.hibernate.cfg.Configuration addResource&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
INFO: HHH000221: Reading mappings from resource: com/test/beans/organization.hbm.xml&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
May 31, 2013 7:18:36 PM org.hibernate.internal.util.xml.DTDEntityResolver resolveEntity&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
WARN: HHH000223: Recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
May 31, 2013 7:18:36 PM org.hibernate.cfg.Configuration doConfigure&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
INFO: HHH000041: Configured SessionFactory: null&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
May 31, 2013 7:18:36 PM org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
INFO: HHH000402: Using Hibernate built-in connection pool (not for production use!)&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
May 31, 2013 7:18:36 PM org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
INFO: HHH000115: Hibernate connection pool size: 20&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
May 31, 2013 7:18:36 PM org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
INFO: HHH000006: Autocommit mode: false&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
May 31, 2013 7:18:36 PM org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
INFO: HHH000401: using driver [com.mysql.jdbc.Driver] at URL [jdbc:mysql://localhost:3306/test]&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
May 31, 2013 7:18:36 PM org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
INFO: HHH000046: Connection properties: {user=root, password=****}&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
May 31, 2013 7:18:36 PM org.hibernate.dialect.Dialect &lt;init&gt;&lt;/init&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
INFO: HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
May 31, 2013 7:18:36 PM org.hibernate.engine.jdbc.internal.LobCreatorBuilder useContextualLobCreation&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
INFO: HHH000423: Disabling contextual LOB creation as JDBC driver reported JDBC version [3] less than 4&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
May 31, 2013 7:18:36 PM org.hibernate.engine.transaction.internal.TransactionFactoryInitiator initiateService&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
INFO: HHH000399: Using default transaction strategy (direct JDBC transactions)&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
May 31, 2013 7:18:36 PM org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory &lt;init&gt;&lt;/init&gt;&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
INFO: HHH000397: Using ASTQueryTranslatorFactory&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
May 31, 2013 7:18:36 PM org.hibernate.tool.hbm2ddl.SchemaExport execute&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
INFO: HHH000227: Running hbm2ddl schema export&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Hibernate: &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;alter table Employee &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;drop &lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;foreign key FK4AFD4ACEF1062AF1&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;Hibernate: &lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;drop table if exists DEPT&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;Hibernate: &lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;drop table if exists Employee&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;Hibernate: &lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;create table DEPT (&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;dept_id bigint not null auto_increment,&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;dept_name varchar(255),&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;loc varchar(255),&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;primary key (dept_id)&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;Hibernate: &lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;create table Employee (&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;MESSAGE_ID bigint not null auto_increment,&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;first_name varchar(255),&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;last_name varchar(255),&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;degn varchar(255),&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;sal double precision,&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;dept bigint,&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;primary key (MESSAGE_ID)&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;Hibernate: &lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;alter table DEPT &lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;add constraint uc_DEPT_1 unique (dept_name)&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;Hibernate: &lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;alter table Employee &lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;add index FK4AFD4ACEF1062AF1 (dept), &lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;add constraint FK4AFD4ACEF1062AF1 &lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;foreign key (dept) &lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;references DEPT (dept_id)&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;May 31, 2013 7:18:37 PM org.hibernate.tool.hbm2ddl.SchemaExport execute&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;INFO: HHH000230: Schema export complete&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;color: black; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Hibernate: &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;/* insert com.test.beans.Department&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;*/ insert &lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;into&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;DEPT&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;(dept_name, loc) &lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;values&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;(?, ?)&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;Hibernate: &lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;/* insert com.test.beans.Employee&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;*/ insert &lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;into&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;Employee&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;(first_name, last_name, degn, sal, dept) &lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;values&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;(?, ?, ?, ?, ?)&lt;/span&gt;&lt;/div&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;/div&gt;
&lt;div align=&quot;LEFT&quot;&gt;
&lt;span style=&quot;color: black; font-size: small;&quot;&gt;To convert same application to use Annotations, Refer next post.&lt;/span&gt;&lt;/div&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;color: #3f7f7f; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://shava28.blogspot.com/feeds/8390267084233641385/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3285107159307150268/8390267084233641385' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/8390267084233641385'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3285107159307150268/posts/default/8390267084233641385'/><link rel='alternate' type='text/html' href='http://shava28.blogspot.com/2013/05/sample-hibernate-application-using.html' title='Sample Hibernate Application Using Eclipse using mapping file'/><author><name>shava28</name><uri>http://www.blogger.com/profile/01033288258605439141</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjootGTShU_S550TwHqps8d34hQTbgA9Rcz6ZBYfnxVA9BBbJkXZlU9Av6T6UD6gTSHu0hMaMP284PQdV8XPMkk5DBwBG4DGVUsBgin-CVfReUdSnZrUNFrGHnr2nRbWVrwcQb72BzggP0W/s72-c/create-project.png" height="72" width="72"/><thr:total>1</thr:total><georss:featurename>Pune, Maharashtra, India</georss:featurename><georss:point>18.5204303 73.856743699999925</georss:point><georss:box>18.2795348 73.534020199999929 18.7613258 74.17946719999992</georss:box></entry></feed>