I have a database where an object may have a dynamic set of property values
(dynamic list of "fields" if you will) based on configurations done by a
user.
So, object A may have properties: Description, Length, Width and object B
may have properties Description, Input voltage, Power output. I need to be
able to write rules for any object (it can be assumed that the person
writing the rule knows which properties the objects that are acted on have,
but my type declarations have to be able to handle the dynamic properties).
Something like this (lame example, but it illustrates the point)
rule "Test"
when
$obj:DBObject()
eval($e.getProperty("Width") == $e.getProperty("Length"))
then
$e.setProperty("IsSquare", true); //Assume IsSquare is a property
that all objects have
end
--
View this message in context:
http://www.nabble.com/Parameterized-getters-setters--tp20427624p20427624....
Sent from the drools - user mailing list archive at
Nabble.com.