2:52 am - Friday April 19, 2019

Tag Archives: hibernate-mapping

Hibernate Inheritance mapping table per subclass inserting Data Using Eclipse

Project Structure:                     JAR FILES:                         Book.java: package com.candidjava; import java.io.*; import java.util.*; public class Book { int id; String title; String author; double...

Hibernate Inheritance mapping table per concrete class fetching Data Using Eclipse

Project Structure:                   JAR FILES:                       Book.java: package com.candidjava; import java.io.*; import java.util.*; public class Book { int id; String title; String author; double...

Hibernate Inheritance mapping table per concrete class inserting Data Using Eclipse

Project Structure:                       JAR FILES:                       Book.java: package com.candidjava; import java.io.*; import java.util.*; public class Book { int id; String title; String author; double...

Hibernate Inheritance mapping table per class inserting Data Using Eclipse

ProjectStructure:                    JarFiles:                        Book.java: package com.candidjava; import java.io.*; import java.util.*; public class Book { int id; String title; String author; double...

Hibernate Collection mapping array Using Eclipse

Array: <array name=”arrayName” table=”tableName” cascade=”all”> <key column=”anyColumnName” /> <list-index column=”anyColumnName” base=”1″> </list-index> ...

Hibernate Collection mapping Map Using Eclipse

Project Structure:                 JAR Files:                     MainClass.java: package com.candidjava; import java.io.DataInputStream; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import...

Hibernate Collection mapping bag Using Eclipse

Bag: Bag allows duplicates. <bag name=”studentPhoneNumbers” table=”SPHONE_om” cascade=”all”> <key column=”SID” /> <many-to-many column=”PID” unique=”true”...

Hibernate Collection mapping Set Using Eclipse

Set:  Set doesn’t contain duplicates. <set name=”anyName” table=”tableName” cascade=”all”> <key column=”uniqueIdColumnName” /> <many-to-many column=”columnName”...

Hibernate component mapping Fetching Data Using Eclipse

ProjectStructure:                     JarFiles:                           Address.java: package com.candidjava; public class Address implements java.io.Serializable { private long addressId; private String...

Hibernate Association Mapping Using One-To-One to Inserting Data

Project Structure:                         JAR Files:                       CREATE THE FOLLOWING JAVA FILES AND POJO CLASS FILES:         Address.java: package com.candidjava; public class Address implements...

Hibernate Association Mapping Using Many-To-One to Inserting Data

Project Structure:                       JAR Files:       Address.java: package com.candidjava; public class Address implements java.io.Serializable { private long addressId; private String street; private String...

Hibernate Association Mapping Using Many-To-Many to Fetching Data

Project Structure:                             JAR Files:                     Course.java: package com.candidjava; /** * This class contains the course details. * */ public class Course implements java.io.Serializable...

Hibernate Association Mapping using Many-To-Many to Inserting Data

Project Structure:                       JAR Files:                     Course.java: package com.candidjava; /** * This class contains the course details. * */ public class Course implements java.io.Serializable...