jQuery in Action, 2nd edition*
The moose likes Object Relational Mapping and the fly likes get(Class class, Serializable id) method of Session interface in hibernate?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "get(Class class, Serializable id) method of Session interface in hibernate??" Watch "get(Class class, Serializable id) method of Session interface in hibernate??" New topic
Author

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

viki Bhardwaj
Ranch Hand

Joined: Nov 07, 2011
Posts: 74

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.


 
It is sorta covered in the JavaRanch Style Guide.
 
subject: get(Class class, Serializable id) method of Session interface in hibernate??
 
Similar Threads
automation for new instances within object-instance
Hibernate: one-to-one composite foreign key : Strange Scenario
Display database values in JSP
Stuck on manyToMany association
OneToOne composite key