• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate

 
souha jerbi
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i want to implement a generic method that takes as parameter a query an returns a generic object .in this method, i am supposed to use the dynamic queries methods of the class session of hibernate so to explain , i want to have a method that hides the differences between writing a sql query or an query by criteria and so on... and that returns at any case(a select query , a creation query.....) an object . so i want to have one method that uses and replace the methods session.createQuery(), session.createSQLQuery(),session.createCriteria()...

thanks a lot in advance



i am looking for an english chat room where i can ask directly

 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

so i want to have one method that uses and replace the methods session.createQuery(), session.createSQLQuery(),session.createCriteria()...


Wow that's going to be hard to write! What is your query going to be written in - HQL/SQL or something else?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic