Data Transfer Objects (DTO)  

In order to reduce the dependency to persistence layer, Data Transfer Objects (DTO) are used as abstract layers that combine entity attributes and other DTO.

Since different data sources such as JPA, JDBC, No-SQL, REST, etc. may be available, an abstraction service is needed to transform the data from the data source into a DTO.

DTO DSL

Inheritance

Build subsets and combinations of related sets of entities for special purposes.

Visibility processor 

Use the visibility processor to render context sensitive user interfaces from overlaid DTOs.

Automated transactions

Don't care about transactions or whether to insert or update, DTO takes care of it.

Persistence

Fill a DTO, send it to a remote system and persist it there. Or just synchronize two DTO instances of the same type.

Data Source Abstraction

Decouple database related structures from the upper layers so it is not necessary to know whether the DTO presents data from a database or from other sources.

Variability

Use the same DTO with various data sources at the same time.

Abstraction

Define how to access the underlying data sources and how to map the results into a proper DTO.

Independency 

Abstract from concrete database dialects.

Entity Manager

Generate code required to manage entity instances and their lifecycle.

DSL Grammar