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: [email protected]
For additional commands, e-mail: [email protected]