File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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.


 
wood burning stoves
 
subject: get(Class class, Serializable id) method of Session interface in hibernate??