-->
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: Criteria and Query could implement the same interface
PostPosted: Tue Jun 14, 2005 10:58 am 
Beginner
Beginner

Joined: Wed Sep 17, 2003 10:43 am
Posts: 48
Hi all,

I was wondering: since Criteria and Query share methods like setCacheable, setMaxResults, list etc, why arent they just implement the same interface for it? The signatures could be changed to return instances of that interface to keep allowing chaining of method calls.

This occured to me because i had to create duplicate methods in my session EJBs; i usually construct the query/criteria object while on the web tier, then pass it over to the business/data access which provides things like paging etc. Of course i could create wrapper classes...

Manos


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.