On Jul 8, 2009, at 3:21 AM, Johann Werner wrote:

Hi Dave,

this addition to _Entity.java seems very useful. Perhaps it should be added to the standard templates? They would become more sort of "use them and don't care" so perhaps file a jira.

Done. WOL-1035

the snippit of code from the attribute setter method:

#if ($attribute.javaClassName == "java.math.BigDecimal")
                if (${attribute.name} != null) {
${attribute.name} = ${attribute.name}.setScale($ {attribute.scale}, RoundingMode.HALF_UP);
                }
#ends

Here's what the code looks like based on the default templates since they use "value" instead of the actual attribute name:

#if ($attribute.javaClassName == "java.math.BigDecimal")
        if (value != null) {
                value = value.setScale(${attribute.scale}, 
RoundingMode.HALF_UP);
        }
#ends


Dave
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to