5.11.1.1.1.1.12. example-code-instruction-simple-entity-foreach-referenceN.xml

Listing 5.86 examples/example-code-instruction-simple-entity-foreach-referenceN.xml
 1<?xml version="1.0" encoding="UTF-8"?>
 2<java_package xmlns="https://metafactory.io/xsd/v1/java-codeinstruction"
 3              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 4              xsi:schemaLocation="https://metafactory.io/xsd/v1/java-codeinstruction https://metafactory.io/xsd/v1/java-codeinstruction.xsd"
 5              name="${pattern.property.java.package.base}.entities.simple"
 6              path="${pattern.property.java.main.directory}"
 7              package="domain_model">
 8  <class  name="${createSimpleEntityClassName(${object.name})}"
 9          foreach="object">
10    <field	name="${reference.name}"
11            access="rw"
12            foreach="referenceN"
13    >
14      <datatype>
15        <![CDATA[Set<${createSimpleEntityClassName(${reference.type})}>]]>
16      </datatype>
17      <import>java.util.Set</import>
18      <apicommentline>${fmsnippet.examples.exampleCommentForReferenceN}</apicommentline>
19    </field>
20  </class>
21</java_package>