Thanks, Mike, for offering other solutions.
It is always refreshing to see different solutions to the same problem
As to the idea of writing methods to assist, it is not a viable solution
for me because my solution has to be dynamic as the end users can pick
and choose whatever fields of a data
I agree with the same, that adding a method to your Java class would make
the comparisons a lot easier. One thing you might not have noticed or
considered was that your getters/setters are not neccesary in the way you
designed your Java beans. Since your class members are public you can do a
Hi,
My goal is to have logical expressions in rule LHS involving multiple
templates derived from hierarchical Java models:
public class PO {
public Customer customer;
// setter, getter not shown.
}
public class Customer {
public String name;
public Address
(defrule rule
(Customer (address ?address))
(PO (customer ?customer))
(test (= 0 (str-compare ((?customer getAddress) getStreet) (?
address getStreet
=
(bind ?name (?customer getName))
(bind ?addr (?address getStreet))
(printout t ?addr : customer: ?name crlf)