-->
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: Query regarding Type parameter in session.filterCollection()
PostPosted: Fri Jul 13, 2007 4:16 am 
Newbie

Joined: Fri Jul 13, 2007 2:44 am
Posts: 1
Hi All,
I am using
Hibernate version: 2.1.7

I have a collection which I need to filter using certain criteria. I want to do it using session.filter()

The following is the code snippet to give a more clear picture

String filterQuery = "WHERE this.deleteFlag=0 AND this.brand.id in
(SELECT bacl.brand.id
FROM BrandAclentry bacl
WHERE bacl.aclentry.id in (:baclIds)
AND bacl.deleteFlag=0)";

I have a arraylist named say aList containing (1,2,3,4) which i want to be replaced for :baclIds in the filterQuery.

Collection coll = session.filter
(obj.getBrandSpecialities(), filterQuery, aList, ListType(""));

My question is what should be specified in the last parameter, i.e. the Type in the filter() call. I went through the documentation and say a type ListType, but couldn't figure out what should be given as "role" in the constructor for ListType().

Regards,

_________________
Maya


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.