Home » Hibernate » Components using hibernate based application

Components using hibernate based application

  1. Pojo class.
  2. Hbm.xml file.
  3. Hibernate configuration . xml file.
  4. Client class of hibernate.

Pojo class It is an ordinary java class having member variable.the pojo class will be mapped with table and member variable will be mapped with table columns in the process of o-r mapping.this class will used by hibernate client application to developed database independence persistence logic.
Hibernate mapping file(hbm.xml) can becomes hibernate mapping file.but it should be specified as the property value of hibernate this file contains xml enteries to perform o-r mapping and also to specify object level releationship.
Hibernate configuration file In earlier version it was a properties file from hibernate 2.2x it is change if no file is explicitly specified it becomes a hibernate-cfg.xml file as the hibernate configuration file this contain following minimum information

  1. jdbc driver class name.
  2. jdbc url.
  3. database username.
  4. database password.
  5. dilect entry point out database.
  6. name of the mapping file.

Hibernate configuration file information needed to connect to persistent layer and the linked mapping documents. You can either specify the data source name or JDBC details that are required for hibernate to make JDBC connection to the database. The element refers to the mapping document that contains mapping for domain object and hibernate mapping document

Hibernate client application.this can be any java/j2ee components or application who actually wants to develop database independent persistence logic using pojo class and hql.this uses core api of hibernate to activate hibernate software and to load hibernate configuratiobn file and pojo class object from the memory.
In configuration file based approach, “hibernate.cfg.xml” is placed in the classpath, Following Hibernate code can be used in this method.

Please follow and like us:
error

Leave a comment

Your email address will not be published.