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: Detached Example / Native SQL query support classes
PostPosted: Tue Nov 07, 2006 12:16 am 
Newbie

Joined: Tue Jun 13, 2006 8:58 pm
Posts: 6
I've searched for something similar to DetachedCriteria for a query-by-example (QBE) that uses an instance of Example (to get the functionality of ignoreCase, enableLike, etc.). There does not appear to be a DetachedExample class, which would allow a third tier client to formulate a query using an Example.

The Example class is not easily extended... and there does not appear to be an interface for Example. The Example class leaves one without the ability to determine the QBE's entity class, since there are no accessors to the referenced example object or its class. Using vanilla Example, one would have to have an extra Class parameter to pass in a method.

A similar issue arises for Native SQL queries when detached. Is there a way to compose the query "off-line" and pass the query across tiers in a manner similar to DetachedCriteria?

Maybe I've missed these classes or an alternative approach to these problems. Any suggestions welcome.

P.S. For detached Example QBE, I am considering cloning Example into a DetachedExample class that is explicitly Serializable and can respond to getEntityClass().


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.