setWithCreate 기능을 사용하여 중첩 비즈니스 오브젝트의 단일 인스턴스를 작성하십시오.
<?xml version="1.0" encoding="UTF-8"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:complexType name="Parent"> <xsd:sequence> <xsd:element name="name" type="xsd:string"/> <xsd:element name="child" type="Child"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="Child"> <xsd:sequence> <xsd:element name="name" type="xsd:string"/> <xsd:element name="grandChild" type="GrandChild"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="GrandChild"> <xsd:sequence> <xsd:element name="name" type="xsd:string"/> </xsd:sequence> </xsd:complexType> </xsd:schema>
DataObject parent = ... DataObject child = parent.createDataObject("child"); DataObject grandchild = child.createDataObject("grandChild"); grandchild.setString("name", "Bob");
DataObject parent = ... parent.setString("child/grandchild/name", "Bob");
하위 레벨 비즈니스 오브젝트 데이터는 중간 레벨 비즈니스 오브젝트를 참조하지 않아도 설정됩니다. 경로가 유효하지 않은 경우 예외가 발생합니다.