Difference between revisions of "Entity DSL"

From OS.bee documentation
Jump to: navigation, search
(Created page with "= Entity DSL = == Purpose == == Overview == == Entity model files == === package === === import === === datatype === == Entities == === historized === === cacheable =...")
 
Line 1: Line 1:
 
= Entity DSL =
 
= Entity DSL =
 +
 +
== copyright notice ==
 +
 +
All rights are reserved by Compex Systemhaus GmbH. In particular, duplications, translations, microfilming, saving and processing in electronic systems are protected by copyright. Use of this manual is only authorized with the permission of Compex Systemhaus GmbH. Infringements of the law shall be punished in accordance with civil and penal laws.
 +
We have taken utmost care in putting together texts and images. Nevertheless, the possibility of errors cannot be completely ruled out. The Figures and information in this manual are only given as approximations unless expressly indicated as binding. Amendments to the manual due to amendments to the standard software remain reserved. Please note that the latest amendments to the manual can be accessed through our helpdesk at any time. The contractually agreed regulations of the licensing and maintenance of the standard software shall apply with regard to liability for any errors in the documentation. Guarantees, particularly guarantees of quality or durability can only be assumed for the manual insofar as its quality or durability are expressly stipulated as guaranteed.
 +
If you would like to make a suggestion, the Compex Team would be very pleased to hear from you.
 +
 +
(c) 2016 Compex Systemhaus GmbH
 +
  
 
== Purpose ==
 
== Purpose ==
 +
 +
The Entity DSL facilitates the handling of persistence entities. Defining entities using the Entity DSL efficiently creates a clean entity model that contains all relevant semantic elements of the model text file.
 +
This semantic model is used to automatically transform the semantic information into proper Java code with the respective annotations for a persistence provider. Additionally, if the entity model is located within a project with OSBP nature, "Auto-DTOs" and services are generated as well. In this case, attributes that are added to entities will automatically be transferred to the "Auto-DTOs".
  
 
== Overview ==
 
== Overview ==
 +
 +
The main semantic elements of the Compex Entity DSL are the following:
 +
 +
* "Package" - the root element that contains all the other elements. A model can contain multiple packages.
 +
 +
* "Import" declarations - used to import external models or even Java classes.
 +
 +
* "Datatype" declarations - a way to define datatypes that can be used in entities and beans.
 +
 +
* "Entity" - the abstraction of a business model entity. It contains further elements such as properties and references.
 +
 +
* "Bean" - does not compile to a JPA Entity but to a Java Bean (POJO with getter and setter and PropertyChange-Support). Beans may be used as temporary containers in entity operations or can be embedded into JPA Entities.
 +
 +
* "Enum" - the abstraction for Java enums.
 +
 +
* "Property" - a reference to an embedded Bean, an Enum, a Java class or a simple datatype (as defined in the datatype declaration). Offers multiplicity.
 +
 +
* "Reference" - a reference to another Entity (or to another Bean in the case of a Bean). Offers multiplicity.
 +
 +
* "Operations" - similar to Java methods. The Xbase expression language can be used to write high-level code.
 +
 +
* "Annotations" can be placed on Entity, Property and Reference.
 +
 +
* "Comments" can be added to all elements.
 +
  
 
== Entity model files ==
 
== Entity model files ==

Revision as of 09:56, 3 August 2016

Entity DSL

copyright notice

All rights are reserved by Compex Systemhaus GmbH. In particular, duplications, translations, microfilming, saving and processing in electronic systems are protected by copyright. Use of this manual is only authorized with the permission of Compex Systemhaus GmbH. Infringements of the law shall be punished in accordance with civil and penal laws. We have taken utmost care in putting together texts and images. Nevertheless, the possibility of errors cannot be completely ruled out. The Figures and information in this manual are only given as approximations unless expressly indicated as binding. Amendments to the manual due to amendments to the standard software remain reserved. Please note that the latest amendments to the manual can be accessed through our helpdesk at any time. The contractually agreed regulations of the licensing and maintenance of the standard software shall apply with regard to liability for any errors in the documentation. Guarantees, particularly guarantees of quality or durability can only be assumed for the manual insofar as its quality or durability are expressly stipulated as guaranteed. If you would like to make a suggestion, the Compex Team would be very pleased to hear from you.

(c) 2016 Compex Systemhaus GmbH


Purpose

The Entity DSL facilitates the handling of persistence entities. Defining entities using the Entity DSL efficiently creates a clean entity model that contains all relevant semantic elements of the model text file. This semantic model is used to automatically transform the semantic information into proper Java code with the respective annotations for a persistence provider. Additionally, if the entity model is located within a project with OSBP nature, "Auto-DTOs" and services are generated as well. In this case, attributes that are added to entities will automatically be transferred to the "Auto-DTOs".

Overview

The main semantic elements of the Compex Entity DSL are the following:

  • "Package" - the root element that contains all the other elements. A model can contain multiple packages.
  • "Import" declarations - used to import external models or even Java classes.
  • "Datatype" declarations - a way to define datatypes that can be used in entities and beans.
  • "Entity" - the abstraction of a business model entity. It contains further elements such as properties and references.
  • "Bean" - does not compile to a JPA Entity but to a Java Bean (POJO with getter and setter and PropertyChange-Support). Beans may be used as temporary containers in entity operations or can be embedded into JPA Entities.
  • "Enum" - the abstraction for Java enums.
  • "Property" - a reference to an embedded Bean, an Enum, a Java class or a simple datatype (as defined in the datatype declaration). Offers multiplicity.
  • "Reference" - a reference to another Entity (or to another Bean in the case of a Bean). Offers multiplicity.
  • "Operations" - similar to Java methods. The Xbase expression language can be used to write high-level code.
  • "Annotations" can be placed on Entity, Property and Reference.
  • "Comments" can be added to all elements.


Entity model files

package

import

datatype

Entities

historized

cacheable

timedependent

mapped superclass