You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Eugene Silin (JIRA)" <ji...@apache.org> on 2010/12/25 16:58:45 UTC

[jira] Created: (AXIS2-4915) Add public getter for "tracker" variable.

Add public getter for "tracker" variable.
-----------------------------------------

                 Key: AXIS2-4915
                 URL: https://issues.apache.org/jira/browse/AXIS2-4915
             Project: Axis2
          Issue Type: Improvement
          Components: codegen
    Affects Versions: 1.5.3
            Reporter: Eugene Silin


Currently, in the case of an optional nilable property (minOccurs="0" nilable="true") it is impossible to to distinguish between null value beign explicitly specified and the property being ommited. In both cases field's getter will return null. We can use tracker variable in order to distinguish between these two cases. Just add a public getter method for it in ADBBeanTemplate.xsl

                           <xsl:if test="$min=0 or $choice">
                           /*  This tracker boolean wil be used to detect whether the user called the set method
                          *   for this attribute. It will be used to determine whether to include this field
                           *   in the serialized XML
                           */
                           protected boolean <xsl:value-of select="$settingTracker"/> = false ;
                           
                           public boolean is<xsl:value-of select="$javaName"/>Specified(){
                               return <xsl:value-of select="$settingTracker"/>;
                           }
                           </xsl:if>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Resolved: (AXIS2-4915) Add public getter for "tracker" variable.

Posted by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4915?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Amila Chinthaka Suriarachchi resolved AXIS2-4915.
-------------------------------------------------

    Resolution: Fixed

fixed the issue with revision 1052902.

> Add public getter for "tracker" variable.
> -----------------------------------------
>
>                 Key: AXIS2-4915
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4915
>             Project: Axis2
>          Issue Type: Improvement
>          Components: codegen
>    Affects Versions: 1.5.3
>            Reporter: Eugene Silin
>   Original Estimate: 0.08h
>  Remaining Estimate: 0.08h
>
> Currently, in the case of an optional nilable property (minOccurs="0" nilable="true") it is impossible to to distinguish between null value beign explicitly specified and the property being ommited. In both cases field's getter will return null. We can use tracker variable in order to distinguish between these two cases. Just add a public getter method for it in ADBBeanTemplate.xsl
>                            <xsl:if test="$min=0 or $choice">
>                            /*  This tracker boolean wil be used to detect whether the user called the set method
>                           *   for this attribute. It will be used to determine whether to include this field
>                            *   in the serialized XML
>                            */
>                            protected boolean <xsl:value-of select="$settingTracker"/> = false ;
>                            
>                            public boolean is<xsl:value-of select="$javaName"/>Specified(){
>                                return <xsl:value-of select="$settingTracker"/>;
>                            }
>                            </xsl:if>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org