2011/7/31 Mark Proctor mproc...@codehaus.org
On 31/07/2011 19:39, Wolfgang Laun wrote:
2011/7/31 Mark Proctor mproc...@codehaus.org
Implicit mapping I call Managed Object Graphs MOGs. So you can write
Person( address.street == my road )
And that internally would get translated too
$p
On 02/08/2011 07:15, Wolfgang Laun wrote:
2011/7/31 Mark Proctor mproc...@codehaus.org
mailto:mproc...@codehaus.org
On 31/07/2011 19:39, Wolfgang Laun wrote:
2011/7/31 Mark Proctor mproc...@codehaus.org
mailto:mproc...@codehaus.org
Implicit mapping I call Managed Object
:
From: Mark Proctor mproc...@codehaus.org
Subject: Re: [rules-users] Condition syntax to access Map
To: rules-users@lists.jboss.org
Date: Friday, July 29, 2011, 8:52 AM
On 29/07/2011 14:28, Edson Tirelli wrote:
Yes, that is exactly what I think. Pattern matching
2011/7/31 Mark Proctor mproc...@codehaus.org
Implicit mapping I call Managed Object Graphs MOGs. So you can write
Person( address.street == my road )
And that internally would get translated too
$p : Person()
Address( person == $p, street == my road )
As there is no doubt that the
On 31/07/2011 19:39, Wolfgang Laun wrote:
2011/7/31 Mark Proctor mproc...@codehaus.org
mailto:mproc...@codehaus.org
Implicit mapping I call Managed Object Graphs MOGs. So you can write
Person( address.street == my road )
And that internally would get translated too
$p :
Whoa! See below...
2011/7/28 Edson Tirelli ed.tire...@gmail.com
I think we need to differentiate paradigms here. When using rules,
contrary to imperative code, what we are doing is pattern matching.
X( a.b.c == value )
In the above case, we are looking for Xs that make that whole
Lets forget that these are nested accessors and the problems they bring.
Lets look at what they would be if they were real relations:
On 29/07/2011 08:55, Wolfgang Laun wrote:
Whoa! See below...
2011/7/28 Edson Tirelli ed.tire...@gmail.com
mailto:ed.tire...@gmail.com
I think we
Yes, that is exactly what I think. Pattern matching constraints are like
query parameters. They need to exist and evaluate to true in order to match.
So, for this to match:
a.b.c == null
a needs to exist and be non-null, b needs to exist and be non-null, c
needs to exist and be null. So it
On 29/07/2011 14:28, Edson Tirelli wrote:
Yes, that is exactly what I think. Pattern matching constraints are
like query parameters. They need to exist and evaluate to true in
order to match. So, for this to match:
a.b.c == null
a needs to exist and be non-null, b needs to exist and
Ah, other engines don't do nested accessors because they're wimps. WIMPS! :)
--- On Fri, 7/29/11, Mark Proctor mproc...@codehaus.org wrote:
From: Mark Proctor mproc...@codehaus.org
Subject: Re: [rules-users] Condition syntax to access Map
To: rules-users@lists.jboss.org
Date: Friday, July 29
Mark
Thanks for the info - although it was not actually the solution to my
problem, it prompted me to look again at my assertion that there were not
any null values. In actual fact answerData[0] was null ( I should have been
checking for answerData[100]) and this was causing the error.
You
On 28/07/2011 08:26, bolsover wrote:
Mark
Thanks for the info - although it was not actually the solution to my
problem, it prompted me to look again at my assertion that there were not
any null values. In actual fact answerData[0] was null ( I should have been
checking for answerData[100])
Thanks for the pointer to the MVEL documents - I can forsee null-safe
operator user.?manager.name syntax being most useful.
As for making the null test the default action - I'm not sure - I can't say
I have ever actually 'wanted' a nullpointer - but there may be some special
case.
David
--
View
Two points to consider:
(1) If a programmer writes
a.getB().getC() == something
and a NPE happens due to a.getB() == null we may distinguish (a) and (b) -
see below.
(a) The setup is so that this is to be expected but the programmer forgot to
take this possibility into account. Then we have:
On 28/07/2011 13:53, Wolfgang Laun wrote:
Two points to consider:
(1) If a programmer writes
a.getB().getC() == something
and a NPE happens due to a.getB() == null we may distinguish (a) and
(b) - see below.
(a) The setup is so that this is to be expected but the programmer
forgot to
Hi all,
I agree with W. : NPE should be the default, and null cases behaviour should
be planned by programmers.
But I am not sure about using a new operator in rules (and do the update in
Guvnor ...).
Why not using some drools annotations on the getter specifying the behaviour of
an eval on
All,
I think we need to differentiate paradigms here. When using rules,
contrary to imperative code, what we are doing is pattern matching.
X( a.b.c == value )
In the above case, we are looking for Xs that make that whole constraint
true (i.e. match). If a or b are null, the whole
+1
Naw
+billion
--- On Thu, 7/28/11, Edson Tirelli ed.tire...@gmail.com wrote:
From: Edson Tirelli ed.tire...@gmail.com
Subject: Re: [rules-users] Condition syntax to access Map
To: Rules Users List rules-users@lists.jboss.org
Date: Thursday, July 28, 2011, 1:13 PM
All,
I think we
Subject: Re: [rules-users] Condition syntax to access Map
To: Rules Users List rules-users@lists.jboss.org
Date: Thursday, July 28, 2011, 1:13 PM
All,
I think we need to differentiate paradigms here. When using
rules, contrary to imperative code, what we are doing is pattern
convention.
Joe
From: rules-users-boun...@lists.jboss.org
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Mark Proctor
Sent: Thursday, July 28, 2011 1:35 PM
To: rules-users@lists.jboss.org
Subject: Re: [rules-users] Condition syntax to access Map
if we do implicit .? support people
I'm struggling with the syntax to access a mapped object - hoping that
someone can help with this..
I have the following condition in a rule:
$a : Answer(getAnswerData().get(0).getValue_str() == Valves)
Answer is a pojo where answerData is a Maplt;Integer, AnswerDatagt;
object.
AnswerData is
On 27/07/2011 19:45, bolsover wrote:
I'm struggling with the syntax to access a mapped object - hoping that
someone can help with this..
I have the following condition in a rule:
$a : Answer(getAnswerData().get(0).getValue_str() == Valves)
try Drools 5.2 and you should be able to do
Answer(
22 matches
Mail list logo