1.

What Is Meant By Method Chaining?

Answer»

METHOD chaining is a programming technique that is supported by many hibernate interfaces. This is LESS READABLE when COMPARED to actual java code. And it is not mandatory to use this format. Look how a SESSIONFACTORY is created when we use method chaining.

SessionFactory sessions = new Configuration()
.addResource("myinstance/MyConfig.hbm.xml")
.setProperties( System.getProperties() )
.buildSessionFactory(); 

Method chaining is a programming technique that is supported by many hibernate interfaces. This is less readable when compared to actual java code. And it is not mandatory to use this format. Look how a SessionFactory is created when we use method chaining.

SessionFactory sessions = new Configuration()
.addResource("myinstance/MyConfig.hbm.xml")
.setProperties( System.getProperties() )
.buildSessionFactory(); 



Discussion

No Comment Found