-->
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: Is it possible to vary return types?
PostPosted: Tue May 23, 2006 12:26 pm 
Beginner
Beginner

Joined: Wed May 25, 2005 7:49 pm
Posts: 25
Hi, I was thinking of creating a class that extends PrimitiveType and returns the smallest data type able to hold a given value. For instance, if the value in the database was less than 2^15, it would return a short; if it's less than 2^31, it would return an int; and so on.

Let me just say this first: I realize it might not be the best way to improve performance of an application, so let's just treat it as an academic exercise.

What are people's thoughts on this idea? Do you forsee any problems? Has anybody tried something like this? Am I a complete idiot?


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.