DSL grammar for JDL

Now, let's look at the JDL grammar. At the time of writing, JDL supports application development, deployment configurations, and complete entity models with relationships and options such as data transfer objects (DTO), service layers, and so on. The grammar can be broken down into the following:

  • Application declaration
  • Entity declaration
  • Relationship declaration
  • Option declaration
  • Deployment declaration

In the following syntax, [] indicates that something is optional and * indicates that more than one can be specified.

JavaDocs can be added to entity declarations and /** */ Java comments can be added to fields and relationship declarations. JDL-only comments can be added using the // syntax.

It is also possible to define numerical constants in JDL—for example, DEFAULT_MIN_LENGTH = 1.

We will learn about application declaration using JDL later on. For now, let's learn how to declare entities.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.181.231