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.  [ 2 posts ] 
Author Message
 Post subject: Session or database level query
PostPosted: Sat Mar 04, 2006 6:07 pm 
Newbie

Joined: Tue Feb 07, 2006 8:17 pm
Posts: 19
My application has certain access priviliges and certain users can only see certain datasets.

For instance 'salespeople' can only see Territory data for territories they are assigned.

Is there a way to apply criteria at the db or session level as opposed to having to do it for all of our queries?

thanks, Tom


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 04, 2006 7:23 pm 
Beginner
Beginner

Joined: Fri Jul 30, 2004 2:53 pm
Posts: 33
Location: Washington, DC
AFAIK, there is no way to globally apply a filter to all queries. Might be possbile with AOP, but I'm not sure would want to anyway. I think you are going to need to add it to all your queries, put you could create a helper method that returns a Criteria and then just add that Criteria any time you make a Territory-specific query.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

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.