IBM WebSphere Adapters User Manual page 122

Version 6 release 2
Table of Contents

Advertisement

There are cases in which a simple XML data type must be mapped to the
corresponding Java wrapper class for the Java primitive type:
v an element declaration with the nillable attribute set to True
v an element declaration with the minOccurs attribute set to 0 (zero) and the
v an attribute declaration with the use attribute set to optional or absent and
The following shows examples of each:
v
v
v
The element/attribute declarations for code, code2, code3 above are all mapped to
the java.lang.Integer type.
JavaBean Metadata ASI format: The metadata is derived mostly from the structure of
the bean. Other metadata, such as containedType and maxLength are not normal
parts of a JavaBean structure, so they must be part of the annotation maps.
Annotation maps:
Annotations are not normally part of a JavaBean structure, so JavaBeanRecords
must contain annotations in a specific format to be usable by the metadata API.
The JavaBeanRecord must implement the BeanMetadata interface.
public interface BeanMetadata {
}
Each property (if it needs metadata) will have its own Map, which will be stored
in the propertyAnnotations map, using the property name as key.
Reserved keys in the propertyAnnotations map:
v ContainedType
v PrimaryKey:
v DefaultValue:
v MaxLength:
116
WebSphere Adapters: WebSphere Adapter Toolkit User Guide
Table 2. Mapping between built-in XSD schema and JavaBean properties (continued)
Header
anySimpleType
Any
maxOccurs attribute set to 1 (one) or absent
carrying neither the default nor the fixed attribute
<xsd:element name="code" type="xsd:int" nillable="true"/>
<xsd:element name="code2" type="xsd:int" minOccurs=""></xsd:element>
<xsd:element name="">
<xsd:complexType>
<xsd:sequence/>
<xsd:attribute name="">
</xsd:attribute></xsd:complexType>
</xsd:element>
public Map getObjectAnnotations();
public Map getPropertyAnnotations();
public Set getSetAttributes();
The class of the object that this property contains
Whether this property is key
The default value
The maximum length of this property.
Header
String
String

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Websphere adapter toolkit

Table of Contents