-->
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: Is there a way to dynamically change formulas?
PostPosted: Tue Apr 26, 2011 1:20 pm 
Newbie

Joined: Fri Jul 24, 2009 4:17 pm
Posts: 2
I have a class that currently has a few properties that are formed using formulas so that queries using the class can be sorted and pages according to the formula-built properties. What I've found out, though, is that I need to dynamically alter some of those formulas based on the user who is retrieving the objects.

To be more specific, I have a search form that returns a list of Policy objects, according to specific criteria. Each Policy object has some totals that are populated as properties with formulas so that the search form can allow a user to order by, and page by, the totals. Some of the subqueries within the total formulas, though, need to be filtered according to user security.

So, is there a way to pass in variables or otherwise change the formulas for the totals on a Policy object? Or is there another way I should set this up? I would put the totals queries in the java class, but then I couldn't sort or page using Hibernate's Criteria builders (as far as I know).

Thanks for any help,


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.