Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

get(Class class, Serializable id) method of Session interface in hibernate??

 
viki Bhardwaj
Ranch Hand
Posts: 74
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,

i am a new in hibernate and just started yesterday to learn ,here i have found little bit confusion to understand about get() of org.hibernate.Session interface. it raise questions in my mind --
that how to get Class type reference to pass as argument for this method. and one more question raised ...actually i am learning from notes which is from a renowned faculty and in that i found a couple of line that says that.....
by default java compiler adds public static Class class; in the code
here i would like to take help through that example which is given in the notebook to better explanation regarding my issue...
suppose i have a POJO class which is Product.java



and if i compile it then after compilation code will become-




for the above Product class if we need to get Class object then
Class class=Product.class;

so can anybody help me to resolve my doubt? thanks for your time.


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic