-->
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: Primitive Types Vs. Primitive Wrappers
PostPosted: Thu Jul 30, 2009 6:24 am 
Newbie

Joined: Thu Jul 30, 2009 6:11 am
Posts: 1
Hi,

I'm designing a domain model for wicket/spring/hibernate application (a research repository). I have the following domain entity:

Publication
-id: Long
-title: String
-year: short
-month: byte

I've been reading in the forum and it was mentioned that using primitive types is *less* efficient than using their wrappers (eg Short, Byte) in hibernate as accessing them using reflection is slower. It's also mentioned in several online blogs and articles (one example is http://blog.vinodsingh.com/2008/04/prim ... jects.html) that primitive wrappers consume more memory. Does that mean that using primitive types is slower in hibernate but faster in spring/wicket (i'm not sure about spring as it uses reflection too.)? And the opposite for primitive wrappers?

Note: I know that this probably isn't an issue for enterprise applications, but i would like to know for educational purposes.


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.