Hibernate Persistence Class
– This is the Class that represents a Database table. What is required of this Class are the corresponding fields, its Setters and Getters, and a Constructor. Other properties of this table are defined in the *.hbm.xml file.
– The Session is the Object used for the database transactions. This is where we can set all our SQL ( or in this case HQL / Hibernate Query Language ) and the Persistence class for Database Transaction. It is advised only create and open a session if needed, and close it after the transaction. The Session Factory is Thread Safe, but Sessions are not.
Hibernate Batch Processing
– Hibernate allows batch processing. To do this, the session must be flush() and clear() in a certain point of the iteration, before doing transaction commit.
also another tip is to set these properties. It sort the inserts and…
View original post 88 mots de plus