The use of hibernate, implementation of data persistence. Has the following several processes.

One configuration database connection information. Hibernate.config

2 configuration mapping.

3 use: the use of the process are the following steps:

3.1: Get database configuration information. Configuration conf = new Configuration ()

3.2 to obtain a database connection factory. SessionFactory sf = conf.buildSessionFactory ();

3.3 to obtain Database Connection Session session = sf.openSession ()

3.4 for persistent steps:



Difficulty lies in:

Mapping configuration