Annotation Type WizField
@Inherited @Target(FIELD) @Retention(RUNTIME) @Documented public @interface WizField
Use this annotation to decorate member fields of a data object class (a class that extends
DataObject) or a serializable class (a class that is annotated by or inherits
WizSerializable annotation) that you want to be serialized and shared across the network.
A class field annotated as WizField must be serializable. Any of the following field types is serializable:
XMLGregorianCalendarand their derivatives
- A class that extends
- A class that is annotated by or inherits the
- A class that is annotated by
- A class that implements serialization methods
- Aggregates (array,
Map) of the above types (in case of a Map both the key and the value need to be serializable).
Other than the classes mentioned above, a class is considered serializable if it implements a serialization method and a deserialization method. A serialization method is any of the following:
Serialization Methods Method Serialization Type
String toString()Simple string conversion.
String format(String format)String conversion using a format specifier. The format to use shall be specified by the
Deserialization Methods Method Deserialization TypeClass constructor with a
StringargumentConverts from a string by the class constructor
static <T> fromString(String val)Converts from a string by a static method
static <T> parse(String val, String format)Converts from a string using a format specifier. The format to use shall be specified by the
String formatA format string to be used when the annotated field is serialized.
This element is mandatory when the annotated field is serialized using the
format()method. It specifies the format specifier that the method gets as its argument.
The element is optional when the annotated field is of type
XMLGregorianCalendar. If used, it specifies the pattern used for serialization as defined in
SimpleDateFormat. If not used, the pattern
ddMMyyHHmmsswill be used, which means that milliseconds are truncated to centiseconds.
- a format string or an empty string that indicates default serialization pattern.
int precisionSpecifies the precision to be used when serializing a float or double value.
The field value is interpreted as the number of digits after the decimal point to retain in the serialized string. A negative value indicates that the exact value shall be retained.
- the precision to be used when serializing a float or double value.
boolean ignoreZoneDifferenceSpecifies whether to ignore time zone differences when transferring a
XMLGregorianCalendarvalue across different time zones.
By default when a
XMLGregorianCalendarvalue is serialized, the value is converted to GMT time so that the receiving node will convert it back to local time zone and get it right even if the peer nodes are deployed in different time zones. By setting this element to
trueyou can instruct the serializer (and the deserializer) to ignore time zone differences and transfer the local time value without conversion.
- true if local time shall be transferred without conversion.