Watch “Hibernate Part-6 | Inheritance in Hibernate (Gujarati)” on YouTube

We can map the inheritance hierarchy classes with the table of the database.
There are three inheritance mapping strategies defined in the hibernate:

✔️ Table Per Class Hierarchy
➖ Single table is required to map the whole hierarchy, an extra column (discriminator column) is added to identify the class
➖ But, nullable values are stored in the table
✔️ Table Per Subclass Hierarchy
➖ Tables are created as per class but related by foreign key.
➖ So there are no duplicate columns.
✔️ Table Per Concrete class Hierarchy
➖ Tables are created as per class.
➖ But duplicate column is added in subclass tables.

Hibernate Inheritance with Annotation
✔️ Inheritance annotation
✔️ Defines the inheritance strategy to be used for an entity class hierarchy.
It is specified on the entity class that is the root of the entity class hierarchy.

Hibernate Sessions Factory
✔️ SessionFactory is an interface.
✔️ SessionFactory can be created by providing Configuration object, which will contain all DB related property details pulled from either hibernate.cfg.xml file or hibernate.properties file.
✔️ SessionFactory is a factory for Session objects.

Hibernate Sessions
✔️ Unlike SessionFactory, the Session object will be created on demand.
✔️ Session provides a physical connectivity between application and DB.
✔️ It will be established each time an application wants do something with DB.
✔️ All the persistent objects will be saved and retrieved through Session object.
✔️ The session object must be destroyed after using it.
✔️ Session object will be provided by SessionFactory object.

Hibernate Sessions states (life cycle states of an object)
✔️ Transient : A new instance of a persistent class which is not associated with a Session and has no representation in the database and no identifier value is considered transient by Hibernate.
✔️ Persistent : A transient instance is made persistent by associating it with a Session. | A persistent instance has a representation in the database, an identifier value and is associated with a Session.
✔️ Detached : When the Hibernate Session is closed, the persistent instance will become a detached instance.

Follow me @
✍️ https://raviroza.blogspot.com/
✍️ https://www.facebook.com/ravi.oza.it
✍️ https://twitter.com/raviozaIT
📹 https://www.youtube.com/user/ravioza101

#RaviROza #HibernateFramework #AdvanceJava #Jdk #Java #Gujarati

Watch “Hibernate Part-5 | Core Components of Hibernate framework (Gujarati)” on YouTube

Core Components of Hibernate

✔️ Connection Management
✔️ Transaction management
✔️ Object relational mapping

Hibernate Configuration file:
✔️ Hibernate requires some the mapping information that defines the Java classes that relates to the database tables.
✔️ A set of configuration settings related to database and other related parameters are required and stored in a standard Java properties file called hibernate.properties, or as an XML file named hibernate.cfg.xml.

Hibernate Mapping file:
✔️ Mapping and Configuration always co-exist in hibernate as every hibernate program need these two xml files.
✔️ It is the core part of hibernate.
✔️ ORM tool requires mapping which puts an object’s properties into the columns of a table.
✔️ Though, Mapping can be done in the form of an XML or in the form of the annotations

Annotation:
✔️ The hibernate application can be created with annotation.
✔️ There are many annotations that can be used to create hibernate application such as @Entity, @Id, @Table etc. The core advantage of using hibernate annotation is that you don’t need to create mapping (hbm) file.
✔️ Mapping file instructs Hibernate how to map the defined class or classes to the database tables.

Follow me @
✍️ https://raviroza.blogspot.com/
✍️ https://www.facebook.com/ravi.oza.it
✍️ https://twitter.com/raviozaIT
📹 https://www.youtube.com/user/ravioza101

#RaviROza #HibernateFramework #AdvanceJava #Jdk #Java #Gujarati

Watch “Hibernate Part-4 | Architecture of Hibernate framework (Gujarati)” on YouTube

Hibernate framework Architecture:
It includes many objects such as
✔️ persistent object
✔️ session factory,
✔️ transaction factory,
✔️ connection factory,
✔️ session,
✔️ transaction etc.

The Hibernate architecture is categorized in four layers
✔️Java application layer
✔️Hibernate framework layer
✔️Backend API layer
✔️Database layer

Follow me @
https://raviroza.blogspot.com/
https://www.facebook.com/ravi.oza.it
https://twitter.com/raviozaIT
https://www.youtube.com/user/ravioza101

#RaviROza #HibernateFramework #AdvanceJava #Jdk #Java #Gujarati

Watch “Hibernate Part-3 | Advantages and Disadvantages of Hibernate framework (Gujarati)” on YouTube

Advantages
✔️ Open Source and Lightweight
✔️ Fast Performance
✔️ Database Independent Query
✔️ Automatic Table Creation
✔️ Simplifies Complex Join
✔️ Provides Query Statistics and Database Status

Disadvantages
✔️ It can’t be learnt easily.
✔️ The debugging due to xml files and performance tuning becomes difficult at times.
✔️ Hibernate is a bit slower than pure JDBC as it is generating lots of SQL ✔️ statements in runtime.
✔️ It advisable to use pure JDBC for batch processing.

Follow me @
https://raviroza.blogspot.com/
https://www.facebook.com/ravi.oza.it
https://twitter.com/raviozaIT
https://www.youtube.com/user/ravioza101

#RaviROza #HibernateFramework #AdvanceJava #Jdk #Java #Gujarati

Watch “Hibernate Part-2 | Need of Hibernate Framework (Gujarati)” on YouTube

✔️ Developers use JDBC for communicating with the DB and the java app.
✔️ JDBC programming needs to create SQL statement, execute the statement and then process the results, Also the runtime exceptions are needed to be handled.
✔️ To effectively solve above issue, ORM tool was developed.
✔️ The ORM tool generates the SQL statements, executes the SQL statement and finally processes the result.
✔️ It also handles the exceptions occurred in the program.

Features of Hibernate
✔️ Object/Relational Mapping
✔️ JPA Provider
✔️ Idiomatic (Natural) persistence
✔️ High Performance
✔️ Scalability
✔️ Reliable
✔️ Extensibility

Follow me @
https://raviroza.blogspot.com/
https://www.facebook.com/ravi.oza.it
https://twitter.com/raviozaIT
https://www.youtube.com/user/ravioza101

#RaviROza #HibernateFramework #AdvanceJava #Jdk #Java #Gujarati

Watch “Hibernate Part-1 | Introduction to Hibernate Framework (Gujarati)” on YouTube

➡️ Hibernate is the ORM tool to transfer the data between a java (object) app and a database (Relational) in the form of the objects.  
➡️ It is an open source, light weight tool given by Gavin King.
➡️ It is a non-invasive (don’t force) framework, it doesn’t force the developers to extend/implement any class/interface, there are only POJO classes so its light weight.
➡️ It can run with-in or with-out server, it will suitable for all types of java apps (desktop or servers)
➡️ It is purely for persistence (to store/retrieve data from DB).

Follow me @
https://raviroza.blogspot.com/
https://www.facebook.com/ravi.oza.it
https://twitter.com/raviozaIT
https://www.youtube.com/user/ravioza101

#RaviROza #HibernateFramework #AdvanceJava #Jdk #Java #Gujarati

Watch “EJB Part-3 | EJB Types (Gujarati)” on YouTube

EJB types
➡️ Session Bean : Session bean represents a single client inside the App Server.
➡️ Entity Bean : Entity bean represents a business object in a persistent storage mechanism.
➡️ Message Driven Bean : A message-driven bean is an enterprise bean that allows J2EE applications to process messages asynchronously.

#RaviROza #EJB #AdvanceJava #Jdk #Java #Gujarati

OS : Windows 10
Jdk : Version 8
IDE : Eclipse Mars
Server : Apache Tomcat 7

Follow me @
https://raviroza.wordpress.com/
https://raviroza.blogspot.com/
https://www.facebook.com/ravi.oza.it
https://twitter.com/raviozaIT

Subscribe my channel to get latest video notification https://www.youtube.com/user/ravioza101

Watch “EJB Part-2 | Usage of EJB (Gujarati)” on YouTube

When to Use Enterprise Java Beans
➡️ To Simplify development of large scale enterprise level app.
➡️ To focus only on business logic of the app.
➡️ When the app is distributed : When the resources and data are distributed across multiple sites, Choose EJB when application will need to support multiple, concurrent users.
➡️ When the app is performance-centric : use of EJBs and the application server provide high performance and very good scalability.
➡️ Manage transactions : When transaction management is required to ensure data integrity, EJBs may be used.
➡️ Manage security : Separation of Business Logic

#RaviROza #EJB #AdvanceJava #Jdk #Java #Gujarati

OS : Windows 10
Jdk : Version 8
IDE : Eclipse Mars
Server : Apache Tomcat 7

Follow me @
https://raviroza.wordpress.com/
https://raviroza.blogspot.com/
https://www.facebook.com/ravi.oza.it
https://twitter.com/raviozaIT

Subscribe my channel to get latest video notification https://www.youtube.com/user/ravioza101

Watch “EJB Part-1 | EJB Introduction (Gujarati)” on YouTube

An Enterprise Java Bean is:
➡️ A reusable component
➡️ A Java object
➡️ An encapsulation of enterprise business logic and data
➡️ Executed in a Containers

What is EJB?
➡️ EJB is an architecture for setting up program components, that run in the server, to develop modular construction of enterprise app.
➡️ It is reusable in multiple apps.
➡️ It is built on the JavaBeans technology to distribute components. It encapsulates the business logic of a web app.
➡️ It provides an architecture to develop and deploy component based enterprise apps.

Summary of video:
➡️ Java Bean Vs Enterprise Java Bean
➡️ Difference between RMI and EJB
➡️ EJB Architecture
➡️ Benefits of EJB
➡️ Restriction on EJB
➡️ Disadvantages of Enterprise Java Beans

RaviROza #EJB #AdvanceJava #Jdk #Java #Gujarati

OS : Windows 10
Jdk : Version 8
IDE : Eclipse Mars
Server : Apache Tomcat 7

Follow me @
https://raviroza.wordpress.com/
https://raviroza.blogspot.com/
https://www.facebook.com/ravi.oza.it
https://twitter.com/raviozaIT

Subscribe my channel to get latest video notification https://www.youtube.com/user/ravioza101

Watch “JSP Part-20 | Java Bean Properties and Methods (Gujarati)” on YouTube

Java Bean
➡️ It is a reusable software component.
➡️ A bean encapsulates many objects into one object, so we can access this object from multiple places.
➡️ It provides the easy maintenance.

Java Bean is a java class that should follow following rules:
➡️ It should have a no-argument or zero argument Constructor.
➡️ It should be Serializable.
➡️ It should provide methods to set and get the values of the properties (getter & setter methods).

Java Bean Property types
➡️ Simple : It has a single value whose changes are independent of changes in any other property.
➡️ Indexed : Such bean supports a range of values instead of a single value.
➡️ Bound : A change to the property results in a notification being sent to some other bean.
➡️ Constrained : Here a change to the property results in validation by another bean in this property. The other bean may reject the change if it is not appropriate.

#RaviROza #JavaBeanPropertiesandMethods #AdvanceJava #Jdk #Java #Gujarati

OS : Windows 10
Jdk : Version 8
IDE : Eclipse Mars
Server : Apache Tomcat 7

Follow me @
https://raviroza.wordpress.com/
https://raviroza.blogspot.com/
https://www.facebook.com/ravi.oza.it
https://twitter.com/raviozaIT

Subscribe my channel to get latest video notification https://www.youtube.com/user/ravioza101