-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Question about efficiency of interceptor instantiate method
PostPosted: Wed Apr 02, 2008 4:00 pm 
Newbie

Joined: Wed Apr 02, 2008 3:52 pm
Posts: 3
The instantiate method's signature is:

public Object instantiate(String entityName,
EntityMode entityMode,
Serializable id)

Inside the method, I'm supposed to call the desired constructor, set the ID, and return the result. I get that. What I don't get is why is a string passed in instead of a Class? I have to reflect the string to a Class on every call. That seems really inefficient. Is there a map of strings to Classes in hibernate I can get to? I haven't found any documentation on such a map. NHibernate passes in a Type.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.