Modeling with Java source code as the Model Source
From this version you may create domain models from your written java source. An internal domain model in g9 can be distilled from java source code by specifying Java Code as modeling tool when creating a new g9 UI modeling Project. As source for the model project an eclipse java project must be specified. By default all java files contained in the project will be used as source, but files can be excluded. Files added to java project will automatically be incorporated.
Support for Value Objects in the domain model
The domain model classes have a new boolean property, Value Object. If set to true, the class is treated as a value object. The setting of this property is done when doing an Update from Domain Model:
Enterprise Architect: In Enterprise Architect a value object class is modeled by creating a Data Type element rather than a Class element. When doing an Add Element on a package the New Element dialog contains Data Type as a possible type.
Java source domain model: When Java code is used as the domain model, inner classes are treated as value object classes. Additionally, classes annotated with the JPA @Embeddable annotation or with the g9 class annotation with the isValueObject field set to true, are also treated as value objects.
Ecore/Xcore: A class is considered a value object if the model contains an EDataType wrapping the class. However, EDataType elements annotated as a g9 Usertype are not considered as such wrappers.
Extended Application models
The Application model in g9 now supports all buildable objects. This adds Class, Enumerator, Interface and Database Model to the model.
If you have set up all buildable objects with the right build configuration, you may want to use Eclipse incremental builder to perform the build. Select the Participate in automatic Build checkbox and set Build Automatically on the Project menu to get the build automation active. With these settings the project will build incrementally as files change.
User defined type mappings for the Hibernate generator
The Hibernate generator now supports type mappings. Current Hibernate generator configurations will be upgraded to include the default g9 Type Mappings on a g9 model project upgrade.
The default type mappings are the same as was previously hard coded into the generator. While the default type mappings only contains model types, both model types and g9 Usertypes can be mapped.
Here is g9:
- Use Esitos Eclipse updatesite at http://www.esito.no/updatesite/g9
- Download from http://download.esito.no/downloads/tools/g9-2.3.0.zip
- We recommend “Eclipse for Java and DSL Developers” Mars.2
- Complete Release Notes 2.3.0