-->
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: Can I pass some parameters into @Formula during runtime?
PostPosted: Wed Jul 12, 2006 6:03 am 
Newbie

Joined: Tue May 30, 2006 9:45 am
Posts: 5
i want to do something like that:

Code:
@Entity
class A {

   private int relevance;
   private int field1;

   public int getField1() {
      return field1;
   }

   public void setField1(int field1) {
      this.field1 = field1;
   }

   @Formula("MY_PACKAGE.RELEVANCE_FUNCTION(field1,:variable)")
   public int getRelevance() {
      return relevance;
   }

   public void setRelevance(int relevance) {
      this.relevance = relevance;
   }

}


as you can see I need to execute RELEVANCE_FUNCTION from MY_PACKAGE, but I also need to pass :variable, which is not a part of A class - it can be resolved only on runtime..

any chance I can do such formula?


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.