by Ram Sharma | Aug 10, 2019 | Hibernate
One-to-One Hibernate Mapping In One-to-One association mapping, one object of a persistent class is related to one object of another persistent class. Here, we are going to create an example of one-to-one mapping using annotation. In this case, we are using...
by Ram Sharma | Aug 10, 2019 | Hibernate
One-to-Many Hibernate Mapping Example In One-to-many association mapping, only one object of a persistent class is related to many objects of another persistent class. It is a relationship in which one (parent) is related to many (children). It is a 1 to N...
by Ram Sharma | Aug 10, 2019 | Hibernate
Many-to-One Hibernate Mapping with Example A Many-to-One association mapping is the reverse of One-to-Many association mapping. For example, many (customers) are associated with one (vendor). In Hibernate, Many-to-One association mapping is applied from child class...
by Ram Sharma | Aug 10, 2019 | Hibernate
by Ram Sharma | Aug 10, 2019 | Hibernate
Hibernate Mapping Association- It means that two or more things are related to each other by some specific relation. In other words, it specifies how the objects are associated with each other. Hibernate mapping is one of the essential features of Hibernate. In...
by Ram Sharma | Aug 10, 2019 | Hibernate
Hibernate Dialects Dialect is a Java class available in org.hibernate.dialect package, which helps to map Java Application with the database. To interact with the database, we need to define the required database dialect in the hibernate.cfg.xml file. Hibernate uses...
by Ram Sharma | Aug 10, 2019 | Hibernate
Hibernate GeneratedValue Strategies Hibernate supports some generation strategies to generate a primary key in the database table. We can access the strategy with the help of @GeneratedValue annotation. @GeneratedValue The @GeneratedValue annotation specifies how to...
by Ram Sharma | Aug 9, 2019 | Hibernate
Web Application Example with Hibernate In this section, we create a hibernate web Application. Here we are using a JSP file for presentation. Example of creating a web application using hibernate index.jsp This page will show a registration form. It takes the input...
by Ram Sharma | Aug 4, 2018 | java
This method returns a new character sequence i.e. subsequence of current sequence Syntax: public CharSequence subSequence(int beginIndex, int endIndex) 123 public CharSequence subSequence(int beginIndex, int endIndex) Parameter: beginIndex − begin index,...
by Ram Sharma | Aug 4, 2018 | java
This method replace the first substring with user specified String. Syntax: public String replaceFirst(String Regexp, String Replacement) 123 public String replaceFirst(String Regexp, String Replacement) Parameter: Regexp : Regular Expression Replacement :...