[rules-users] custom defined types in setter and getters
Steven Williams
stevearoonie at gmail.com
Wed Oct 3 19:30:13 EDT 2007
No - you can use any java object as a fact, so both of your classes are
fine. For instance you could do:
when
Car($p: paint)
then
System.out.println($p.getName());
end
and using MVEL you could do:
when
Car(paint.name == "red")
then
...
On 10/4/07, jack wu <jackxwu at yahoo.com> wrote:
>
> Hi, i suppose the second form of fact is not supported. but i'd like to
> confirm.
>
> in other words, you can only have setters and getters that return basic
> java types. is that right? can i return java collections such as array and
> map? the documentation is not clear on that.
>
> thanks.
>
> public class Paint
> {
> String getName();
> String getColor();
> }
>
>
> public class Car
> {
> int getSize();
> Paint getPaint();
> }
>
>
> jack.
>
>
>
> ------------------------------
> Got a little couch potato?
> Check out fun summer activities for kids.<http://us.rd.yahoo.com/evt=48248/*http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
--
Steven Williams
Supervising Consultant
Object Consulting
Office: 8615 4500 Mob: 0439 898 668 Fax: 8615 4501
steven.williams at objectconsulting.com.au
www.objectconsulting.com.au
consulting | development | training | support
our experience makes the difference
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20071004/acc07732/attachment.html
More information about the rules-users
mailing list