-->
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: Filter and FilterDefs annotation
PostPosted: Wed Jul 27, 2011 2:26 pm 
Newbie

Joined: Tue Jul 26, 2011 7:44 pm
Posts: 1
Hi,

I would like to clarify few finding.

1. It's true when define Filter, it's required to define FilterDefs?
There's scenario that i does't required any parameter, because the filter it's self is sufficient.
eg: filterName="filter1" condition="ID in (select id from table1"), filterName="filter2" condition="ID in (select id from table2)"

2. It's true when define a Filter, filter name should not contain dot "." character?
When I define a class name as filterName, hibernate can't find FilterDefs
eg: filterName="org.my.company.Class1" condition="ID in (select id from table1")

3. Is the following condition is correct:
filterName="filter3" condition="ID in (select id from table1 where column1 like '%:param1%')"

question: What I'm tries to do?
Answer: I'm using Spring ACL and I want to query all granted entity for given sid. I had create Spring ACL entity object.
My domain and sid is my ACL session query parameter.
Then I'm using my domain name as a filter name so that a would easily enable the required filter
eg: session.enableFilter(myclass.getCanonicalName());
session.createQuery("select count(distinct aoi.id) from AclObjectIdentity aoi join aoi.entries e where ......"



Thanks


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.