Hibernate Entity bean (Pojo) class having 3 states 1. Transient 2. Persistent 3. Detached 1. Transient: Whenever pojo class object created then it will be in the Transient state. Transient state Object does not represent any row of the database, It means not associated with any Session object or no relation with the database its […]
Hibernate HQL Query Language
Hibernate HQL Query Language Hibernate HQL Query Language is one of the query language in the form object object relation mapping query. In the hibernate data base operations are two types they are Single row operations Bulk operations By using save(), load(), update() method, we can perform single row operation. In hibernate there are three […]
Primary Key Generation Algorithms in Hibernate
Primary Key Generation Algorithms in Hibernate Hibernate software generates the primary key value dynamically by choosing an algorithm . We can configure primary key generation algorithm by using <generator> tag. This is sub tag of <ID> tag. In this post we are going to discussing what are the primary key generation algorithms in hibernate. <?xml […]
Classes and Objects interview questions
Classes and Objects interview questions We know a class is a model for creating objects. this means the properties and actions of the objects are written in the class. Properties are represented by variables and actions of the objects are represented by methods. So a class contains variables and methods. The same variables and methods […]
Different ways to create java objects
Different ways to create java objects In this article we are explaining the various ways to create java objects. Java Objects can be created in four ways 1) Using new Operator Employee obj = new Employee(); Here, we are creating Employee class object ‘obj’ using new operator. 2) Using factory methods NumberFormat obj = NumberFormat.getNumberInstance(); […]
Different ways to specify hibernate configuration property values
Different ways to specify hibernate configuration property values In this post I am going to explaining what are the different ways to specify hibernate configuration property values. In the hibernate there are three ways to load the hibernate property values. By using xml file (hibernate.config.xml) By using setProperty() method of configuration By using properties […]
One of the IT Companies Java Interview Questions and Answers-1
One of the IT Companies Java Interview Questions and Answers-1 1) How many objects will be created for the following scenario? Integer a1=10; Integer a1=10; Integer a1=20; Integer a1=15; Ans: 3 objects will be created. Explanation: Java storing value in the cache and while initialization will check in the cache, if it is exist […]
Hibernate Sample Program
Hibernate Sample Program In this post, I am going to explaining hibernate sample program and what type of files are required to create hibernate sample program. Different types of files are required to develop the hibernate sample program. They are Hibernate Jars Hibernate Configuration file Hibernate Mapping file POJO Class Client Application 1) Hibernate […]
What is Hibernate Architecture?
What is Hibernate Architecture? Before going start learning What is Hibernate Architecture? we have to know some of the key points as follows. Persistent The process of storing the data into permanent place is called persistent. Persistent logic The logic that is used to connect with the database is called persistent logic. Ex: JDBC code, […]
Java Setup Hello World Example
In this post, I am explaining the Java Setup to run a Hello World Example for beginners. Java Setup Hello World Example First of all we need to download open source java software from official oracle site. Download You can download java software according your system configuration i.e. 1. Operating system (Linux, Mac OS, Windows, Solaris […]