Well, in the end it's all Java, so why should there be a better method? ;-)<br><br>I find that writing the constructors of fact objects so that they avoid<br>null values by setting fields to appropriate "Null" objects improves<br>
things somewhat. In your case perhaps<br><br>CitatioDTO(){<br> charge = Charge.NO_CHARGE;<br> ...<br>}<br><br>and class Charge contains <br><br> public static final NO_CHARGE = Charge( "",... );<br><br>-W<br>
<br><div class="gmail_quote">2009/11/5 Jason Davidson <span dir="ltr"><<a href="mailto:jljdavidson@gmail.com">jljdavidson@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello,<br><br>Is there an easy way to test if a String value is empty? I've been doing this (Drools 4.0.7):<br><span style="font-family: courier new,monospace;"></span><span style="font-family: courier new,monospace;"> when</span><span style="font-family: courier new,monospace;"> CitationDTO</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> ( </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> charge != null && </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> charge.drivingIncidentLegalSpeedRate != null && </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> charge.drivingIncidentLegalSpeedRate != ""</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> )</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> then ......<br></span><span style="font-family: courier new,monospace;"></span><br>
It seems like there has to be a better method.<br><br>Thanks,<br><font color="#888888">Jason<br>
</font><br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br>