Generation Logic

The following table lists all types of files that can be generated by the generator. Further down you can see for which model element which file is getting generated and also how modeling options affect the generation result.

Target JavaDoc
JavaAnnotation This target generates a Java annotation.
JavaClass This target generates a Java class, nothing more and nothing less. The class can have inner classes, inner interfaces, inner annotations, methods, fields and can make use of Java generics.
JavaEnumeration This target generates a Java enum. The enum can have inner classes, inner interfaces, inner annotations, methods and fields.
JavaInterface This target generates a Java interface. The interface can have inner classes, inner interfaces, inner annotations, methods and static fields.

 

ComplexType

Mapping ComplexType
Remarks With the DSL „Basic“ a „type“ is modeled in order to get a „ComplexType“ as input element. The model converter follows this rule: A „type“ with at least one „field“ results in a „ComplexType“.
Options Option Option-Type Description
None
Platform specific Options None
Options for Member „field“ field-Documentation platform independent DSL … CollectionType Enumerated, single valued Possible value: Array, List, Set, SortedSet. If a value is set here, then the corresponding Java type is going to be used in generated code. In case of List, Set, SortedSet types of the Java Collection Framework are going to be used. If Array is modeled, then a Java array type is used in generated code. Description platform independent DSL …
EqualityRelevance Boolean If this is set to true, then the Java field that gets generated for the modeled „field“ is used for the generation of the implementation of hashCode() and equals(). Description platform independent DSL …
ReadOnly Boolean If this is set to true, for the generated Java field only a getter method is getting generated. Description platform independent DSL …
DefaultValue Quoted Text If possible, a value that is modeled here is going to be used to initialize the generated Java field. Description platform independent DSL …
MultiplicityType Enumerated, single valued Possible value: OneToOne, OneToN, NToOne, MToN. This option is used to further define the semantics of  the „field“, in case the „field“ has a complex type. Using this option always implies that the modeled field represents a bi-directional relationship. If a „field“ for instance has a CollectionType List, the MultiplicityType can have one of the values OneToN or MToN. The difference in the semantics would be as follows:

  • OneToN: A Java object, that is contained in the collection of the generated field, cannot be in a different collection for the same field, at the same time.
  • MToN: A Java object, that is contained in the collection of the generated field, can be in a different collection for the same field, at the same time.

Description platform independent DSL …

Cardinality Numeric This option is relevant only when the CollectionType Array is set. In this case the modeled number defines the size of the array object that initializes the generated Java field. Description platform independent DSL …
Platform specific Options for Member „field“ Java-UsePrimitiveWrapper Boolean If this is set to false, then the standard Java types like Integer, Long, Boolean, Float, Double are used for a generated Java field instead of the Java primitive-type int, long, boolean, float or double.

 

Enumeration

Mapping Enumeration
Remarks
Options Option Option-Type Description
None
Platform specific Options None
Options for Member „field“ field-Documentation platform independent DSL … same as ComplexType
Platform specific Options for Member „field“ same as ComplexType
Options for Member „entry“ entity-Documentation platform independent DSL … None
Platform specific Options for Member „entry“ None

 

Virtual Projects

A virtual project is a logical grouping of types of files to be generated. In a Virtual Developer Cloud-Connector real development projects (e.g. Eclipse projects) are assigned to virtual projects. With this the cloud-connector knows where to write the files to. Further documentation related to the virtual projects offered by the generator can be found on the Virtual Developer Portal.

Generator Options

The inner workings of a generator is not only controlled by the model itself. The generator can also be parameterized by means of so-called generator options. The documentation for the generator options can be found on the Virtual Developer Portal.