Atomic properties

An atomic property has a either a primitive type or a non-array, non-list, reference type.

Suppose that field is an optional property of primitive type (int, in this example). The following methods are generated:

Java:

   public int getField() {...}

   //only defined because field is optional
   public boolean isSetField() {...}        

   public void setField(int value) {...}

   //unsets field
   public void setField() {...}

C#:

   public int getField() {...}

   //only defined because field is optional
   public bool isSetField() {...}        

   public void setField(int value) {...}

   //unsets field   public void setField() {...}

Note that a required, primitive-typed atomic property is always considered set, because the underlying field always has some value.

Now, suppose that fieldis an optional property of some reference type, MyComplexType. The following methods are generated:

Java:

   public MyComplexType getField() {...}

   //always defined because default value for reference type is null
   public boolean isSetField() {...}

   //pass null to unsetfield
   public void setField(MyComplexType value) {...}

C#:

   public MyComplexType getField() {...}

   //always defined because default value for reference type is null
   public bool isSetField() {...}

   //pass null to unset field
   public void setField(MyComplexType value) {...}