[rules-dev] call method getXXX or setXXX

mjido m.benlachgar at netfective.ma
Mon Sep 7 05:39:37 EDT 2009


Hi,
But we can have methods that are start with "get" or "set" and are not
getters or setters.
In this case these methods are not showed in list,this is my problem.

mjido wrote:
> 
> Hi,
> When calling a method on an object the choices only showed me methods that
> are not start with "get" or "set" (see ref1). I had to Add free form drl
> to get around it.
> And it makes methods like fields (see ref2).
> This is my class:
> public class TestBO
> {
>     private String first;
>     private String second;
>     private Long testId;
>         public String getFirst()
>     {
>         return first;
>     }
>     public void setFirst(String s)
>     {
>         this.first = s;
>     }
>     public String getSecond()
>     {
>         return second;
>     }
>     public void setSecond(String s)
>     {
>         this.second = s;
>     }
>     public Long getTestId()
>     {
>         return testId;
>     }
>     public void setTestId(Long long1)
>     {
>         this.testId = long1;
>     }
>     public boolean getCompareFirstAndSecond()
>     {
>         return false;
>     }
>     public String getConcatFirstAndSecond()
>     {
>         return this.getFirst()+this.getSecond();
>     }
>     public void hello()
>     {
>         System.out.print("hello world \n");
>     }
> }
> Any help will be very appreciated.
>  http://www.nabble.com/file/p25277517/ref1.JPG ref1.JPG 
> http://www.nabble.com/file/p25277517/ref2.JPG ref2.JPG 
> 

-- 
View this message in context: http://www.nabble.com/call-method-getXXX-or-setXXX-tp25277517p25327576.html
Sent from the drools - dev mailing list archive at Nabble.com.



More information about the rules-dev mailing list